Can't Auth after DB Restore

I can’t log in to the Sunstone interface after migrating a db to a new OpenNebula server. I had OpenNebula 5.6.1 running on one server and I needed to move it to another, so I upgraded it to 5.8.1without issue, but when I back up the database using onedb and move it to my new server, I can’t log in to the web interface (Sunstone).

The old OpenNebula is running on Ubuntu 18.04 as is the new one. Both were deployed using the same process (ansible and puppet), so I know the configuration is consistent as are the ssh keys and oneadmin password.

Steps to reproduce: Move database to new OpenNebula server using the onedb backup and restore functionality.

Attempt to log in to sunstone produces the following error on the login screen: OpenNebula is not running or there was a server exception. Please check the server logs.

The error output from oned.log:

Wed Jul 3 13:21:37 2019 [Z0][ReM][D]: Req:3872 UID:0 IP:127.0.0.1 one.user.info invoked , -1
Wed Jul 3 13:21:37 2019 [Z0][ReM][D]: Req:3872 UID:0 one.user.info result SUCCESS, “0<GID…”
Wed Jul 3 13:21:38 2019 [Z0][AuM][D]: Message received: LOG I 2 Command execution failed (exit code: 255): /var/lib/one/remotes/auth/server_cipher/authenticate

Wed Jul 3 13:21:38 2019 [Z0][AuM][I]: Command execution failed (exit code: 255): /var/lib/one/remotes/auth/server_cipher/authenticate
Wed Jul 3 13:21:38 2019 [Z0][AuM][D]: Message received: LOG E 2 bad decrypt

Wed Jul 3 13:21:38 2019 [Z0][AuM][I]: bad decrypt
Wed Jul 3 13:21:38 2019 [Z0][AuM][D]: Message received: AUTHENTICATE FAILURE 2 bad decrypt

Wed Jul 3 13:21:38 2019 [Z0][AuM][E]: Auth Error: bad decrypt
Wed Jul 3 13:21:38 2019 [Z0][ReM][D]: Req:9648 UID:-1 IP:127.0.0.1 one.user.info invoked , -1
Wed Jul 3 13:21:38 2019 [Z0][ReM][E]: Req:9648 UID:- one.user.info result FAILURE [one.user.info] User couldn’t be authenticated, aborting call.

I changed the serveradmin password using oneuser passwd both with the sha1 option and without and updating the auth files with the password.

I do know that oned is seeing all of the hosts and VMs (all of the cli tools work just fine), but I just can’t auth into Sunstone :frowning_face:.

Any insight and help would be greatly appreciated.

Hello @George_Lambson,

Did you copy the sunstone_auth file from /var/lib/one/.one to the same location in the new server?

Well, there we go. Thank you Christian!

You are welcome!