Page 1 of 1

[Solved] Stuck at "connecting to database"

Posted: Tue Aug 27, 2019 8:57 pm
by NorthWestNet
We had a server reboot recently and Unimus server is now stuck at "connecting to database". See pic.

Do you have any suggestions on how to troubleshoot?

We're running Ubuntu 16.04.6 LTS.

Thanks.
unimus-stuck.PNG
unimus-stuck.PNG (48.33 KiB) Viewed 4515 times

Re: Stuck at "connecting to database"

Posted: Tue Aug 27, 2019 10:09 pm
by Tomas
Hello,

Which DB server do you use? This will be in the config file:
Linux: "/etc/unimus/unimus.properties"
Windows: "C:\ProgramData\Unimus\unimus.properties"

The config file will also have the host/port for the DB.
I would suggest testing connecting with the DB client (mysql or postgresql client) from the Unimus server machine to the DB.
As soon as the native client connection works, Unimus should connect as well.

Example for mysql:

Code: Select all

mysql -h remote_server_ip -u db_user -p

Re: Stuck at "connecting to database"

Posted: Wed Aug 28, 2019 11:57 pm
by NorthWestNet
Tomas,

Thanks for the reply. We're using the hsql database. It doesn't seem very robust, though.

I was able to recover by deleting the a log file and rebooting the server.

Do you have instructions for moving to either Postgres or Mysql? I don't want to keep my data in hsql since it seems open to corruption if the VM doesn't shutdown properly.

I'm not sure which database format is preferred -- we're backing up about 50 switches.

Re: Stuck at "connecting to database"

Posted: Thu Aug 29, 2019 7:05 am
by Tomas
As HSQL is a file-based DB, and not a real DB engine, it can indeed suffer from issues on things like unexpected shutdowns, or out-of-space conditions.

As for migration, simply shut down Unimus, delete "/etc/unimus/unimus.properties" and restart the Unimus service.
It will put you into the deployment wizard again, and you can choose a different DB.