Failed to open TCP connection to localhost:2633 (Connection refused - connect(2) for "localhost" port 2633)

Please suggest how to resolve this error.

Did you check the logs located at /var/log/one/

Copy and paste any errors (tagged by [E]) that you see there.

Hello,
Yes I have checked oned.log file. No error is there.

If you do a systemctl restart opennebula and then do a systemctl status opennebula what does it show? You can’t connect to that port most probably because oned is not running and not binding to that port. You could also issue a netstat -tunlp and see if you see anything similar to this:

tcp 0 0 0.0.0.0:2633 0.0.0.0:* LISTEN 20790/oned

If that entry is not there, then oned is not running

1 Like

[neha@neha-HP-Compaq-8100-Elite-CMT-PC ~]$ sudo su - -c ‘netstat -ntlp’
[neha@neha-HP-Compaq-8100-Elite-CMT-PC ~]$ sudo su - -c ‘systemctl status opennebula’
[neha@neha-HP-Compaq-8100-Elite-CMT-PC ~]$ sudo su - -c ‘systemctl restart opennebula’
[neha@neha-HP-Compaq-8100-Elite-CMT-PC ~]$ sudo su - -c ‘systemctl status opennebula’
[neha@neha-HP-Compaq-8100-Elite-CMT-PC ~]$ sudo su - -c ‘netstat -ntlp’

See how to diagnose problems with systemd services with journalctl here Systemd Essentials: Working with Services, Units, and the Journal | DigitalOcean

Following errors are present in oned.log file.

Thu Aug 17 09:54:28 2017 [Z0][ONE][E]: Database version mismatch ( local_db_versioning). Installed OpenNebula 5.2.1 needs DB version ‘4.90.0’, and existing DB version is ‘4.11.80’.

Thu Aug 17 09:54:28 2017 [Z0][ONE][E]: Use onedb to upgrade DB.

Hello Marcindulak,
I referred the following documents and the above issue (Database version mismatch) has been resolved.
http://docs.opennebula.org/5.2/intro_release_notes/upgrades/upgrade_412.html

Now when I restart opennebula, oned.log file shows new error

Thu Aug 17 10:33:14 2017 [Z0][MAD][E]: MAD did not answer INIT command
Thu Aug 17 10:33:14 2017 [Z0][ONE][E]: Could not load driver

Please help me in this regard.

Are these the only suspicious line in the logs?
May be worth opening another thread “MAD did not answer INIT command”

It may help to get more information in the logs after turning on debugging options ONE_MAD_DEBUG=1 in /etc/one/defaultrc followed by systemctl restart opennebula (see http://lists.opennebula.org/pipermail/users-opennebula.org/2012-August/037575.html) and http://thread.gmane.org/gmane.comp.distributed.opennebula.user/6326 says “We’ve seen this type of error when OpenNebula is started under heavy-load”. I must say I have been running the frontend on a CentOS7 VM with 256M of RAM.

Hi Marcindulak,
New thread has been created “MAD did not answer INIT command”. I have seen both the links and turned on ONE_MAD_DEBUG=1 and then issued systemctl restart opennebula. But the errors in oned.log file are still same.