2.7.5 doesn't work with 2.7.4 data restored

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
aptalca
OpenVpn Newbie
Posts: 12
Joined: Mon Jun 22, 2015 6:20 pm

2.7.5 doesn't work with 2.7.4 data restored

Post by aptalca » Tue Aug 27, 2019 8:28 pm

I'm restoring 2.7.4 data in 2.7.5 as described in a previous post (docker environment):
1) sqlite3 back up all databases, and copy as.conf to backup folder
2) delete all data, openvpn is not installed at this point
3) Install 2.7.5, both the server and the client packages as a fresh install (subsequently stop openvpn-as)
4) sqlite3 restore databases from backup, copy over old as.conf into data folder
5) start openvpn-as

When I try to log in to admin interface, I get the following error after submitting credentials:
Sorry, a session error has occurred
It is possible that your session has expired or your login credentials do not allow access to this resource. See error text below for further details:
SESSION ERROR: argument of type 'NoneType' is not iterable: flat/twist:24,flat/ten:83,flat/flatstan:103,flat/ten:70,flat/ten:61,flat/flatstan:264,flat/ten:70,flat/ten:61,flat/flatstan:247,flat/flatstan:236,admin/astatus:165,admin/astatus:147 (exceptions.TypeError)
Retry Login

User avatar
novaflash
OpenVPN Inc.
Posts: 1073
Joined: Fri Apr 13, 2012 8:43 pm

Re: 2.7.5 doesn't work with 2.7.4 data restored

Post by novaflash » Tue Aug 27, 2019 8:37 pm

This counts not as an upgrade but as a migration of data.

Are you following the steps laid out here?
https://openvpn.net/vpn-server-resource ... tallation/
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.

User avatar
novaflash
OpenVPN Inc.
Posts: 1073
Joined: Fri Apr 13, 2012 8:43 pm

Re: 2.7.5 doesn't work with 2.7.4 data restored

Post by novaflash » Tue Aug 27, 2019 8:39 pm

Oh and for the record, that error seems to me personally to indicate a lack of data. Since you have backups, you could try ovpn-init to reset the Access Server 2.7.5 so it will start up normally again, and then stop the Access Server service, and then try restoring the data from backups by overwriting/replacing the existing databases of Access Server 2.7.5. It might work then.
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.

aptalca
OpenVpn Newbie
Posts: 12
Joined: Mon Jun 22, 2015 6:20 pm

Re: 2.7.5 doesn't work with 2.7.4 data restored

Post by aptalca » Tue Aug 27, 2019 9:11 pm

Yes, I'm following the steps outlined for migrating data.

I just ran ovpn-init prior to restoring data and I'm getting the same error when logging in

Here's a log: https://pastebin.com/Z8nsLrKB

User avatar
novaflash
OpenVPN Inc.
Posts: 1073
Joined: Fri Apr 13, 2012 8:43 pm

Re: 2.7.5 doesn't work with 2.7.4 data restored

Post by novaflash » Tue Aug 27, 2019 9:37 pm

I can restore data from AS 2.7.4 to AS 2.7.5 and it works fine. Something funky is up with your system or data.

You should contact access server support on the support ticket system and reference this forum post and send /var/log/openvpnas.log and other data you can think of might be useful in debugging this. I'd also advise investigating that log file yourself to see any obvious problems. Please also note that technically we do not release for docker and do not test on it. So it is I suppose at least possible there's a bug when used on docker. Or it could be the way the data is being migrated. I can't tell without more logs and we don't put those on public forums.
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.

aptalca
OpenVpn Newbie
Posts: 12
Joined: Mon Jun 22, 2015 6:20 pm

Re: 2.7.5 doesn't work with 2.7.4 data restored

Post by aptalca » Wed Aug 28, 2019 11:41 pm

Hi novaflash, thanks for your help.

With the help of a user and some luck, we identified the issue. It's not the migration process, but a specific setting we have in as.conf that causes the issue.

When we comment out the line "boot_pam_users.0=admin" in as.conf to prevent pam access and only rely on local authentication, and restart, the local users can no longer login and get the session error described above.

I simply set up a fresh 2.7.5 instance, with a pam admin user in ovpn-init. Logged in as the pam admin user, created a local user with admin rights. Then edited as.conf to comment out the first pam user and restarted. The local admin user can no longer login and gets the session error.

Thanks

User avatar
novaflash
OpenVPN Inc.
Posts: 1073
Joined: Fri Apr 13, 2012 8:43 pm

Re: 2.7.5 doesn't work with 2.7.4 data restored

Post by novaflash » Thu Aug 29, 2019 7:01 am

Good work. So it was some data issue, in as.conf and the OS this time. I would not have expected that to be the problem with such an error message to be honest. I'll make a note of it so we can look into it and perhaps make AS a little more clear about such problems in the future.
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.

User avatar
novaflash
OpenVPN Inc.
Posts: 1073
Joined: Fri Apr 13, 2012 8:43 pm

Re: 2.7.5 doesn't work with 2.7.4 data restored

Post by novaflash » Wed Sep 04, 2019 5:30 pm

We think we have found a way to make sure this won't be a problem in the next Access Server release anymore (the release after 2.7.5).
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.

aptalca
OpenVpn Newbie
Posts: 12
Joined: Mon Jun 22, 2015 6:20 pm

Re: 2.7.5 doesn't work with 2.7.4 data restored

Post by aptalca » Thu Sep 05, 2019 7:08 pm

Thanks, much appreciated

lcasey001
OpenVpn Newbie
Posts: 7
Joined: Thu Oct 10, 2019 8:25 pm

Re: 2.7.5 doesn't work with 2.7.4 data restored

Post by lcasey001 » Fri Oct 18, 2019 7:22 pm

For what it is worth we had similar issues where a 2.7.4 configuration did not work on 2.7.5. Once necessary changes were made and had to rever back to 2.7.4 those configurations did not work as well. It was basically related to default subnets and subnet within user groups.

kkinkopf
OpenVpn Newbie
Posts: 2
Joined: Tue Nov 05, 2019 6:28 pm

Re: 2.7.5 doesn't work with 2.7.4 data restored

Post by kkinkopf » Tue Nov 05, 2019 6:31 pm

I've been running this fine for many years upgrading over time with no issues. I have the exact issue as stated after upgrading from 2.7.4 to 2.7.5
I do not know Unbuntu 18.04. (or any version really)
Since I am running on Hyper-V I just reset back to my backup. This is the third time I am trying as people post work arounds. Can someone give a step by step command line to repair access to the admin console UI? I can use the VPN but no longer can gain access to the admin console.

Thanks a bunch!
Ken

kkinkopf
OpenVpn Newbie
Posts: 2
Joined: Tue Nov 05, 2019 6:28 pm

Re: 2.7.5 doesn't work with 2.7.4 data restored

Post by kkinkopf » Tue Nov 05, 2019 6:31 pm

I've been running this fine for many years upgrading over time with no issues. I have the exact issue as stated after upgrading from 2.7.4 to 2.7.5
I do not know Unbuntu 18.04. (or any version really)
Since I am running on Hyper-V I just reset back to my backup. This is the third time I am trying as people post work arounds. Can someone give a step by step command line to repair access to the admin console UI? I can use the VPN but no longer can gain access to the admin console.

Thanks a bunch!
Ken

Post Reply