Error when disabling Multiple sessions per user

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
chort1
OpenVPN User
Posts: 27
Joined: Tue Mar 01, 2022 12:24 pm

Error when disabling Multiple sessions per user

Post by chort1 » Mon Sep 05, 2022 8:55 am

When I set "Multiple Sessions per user" to no and click Save settings, I get an error message

'__DEFAULT__': internet/defer:151,pages/advvpn:120 (KeyError)"

Any suggestions as to what the issue might be?

As an aside, is there a complete reference of command line configuration settings? I imagine some of the default settings are invisible unless changed. I was unable to find the setting for "Multiple sessions per user"

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: Error when disabling Multiple sessions per user

Post by openvpn_inc » Tue Sep 13, 2022 10:59 am

Hello chort1,

From your error message it seems that your user database might just be lacking the __DEFAULT__ user which is very strange because it is always supposed to be present. You could try going to your Access Server's console and logging in with root privileges, then going to /usr/local/openvpn_as/scripts/ directory, and running the command ./sacli userpropget, and see if __DEFAULT__ user is in there at all. If it's not, you might want to reach out to our support ticket system and ask how to restore the __DEFAULT__ user. That would at least resolve the error message and allow for things to likely proceed as they should.

The actual configuration parameter for the multiple session per user setting in the configuration database is "vpn.server.duplicate_cn". You can set it manually on the command line as root user with;
/usr/local/openvpn_as/scripts/sacli --key "vpn.server.duplicate_cn" --value "true" ConfigPut
/usr/local/openvpn_as/scripts/sacli start

You can use false to turn it off, true to turn it on. And if you remove it, it will go to its default which I believe is true;
/usr/local/openvpn_as/scripts/sacli --key "vpn.server.duplicate_cn" ConfigDel
/usr/local/openvpn_as/scripts/sacli start

For documentation see here;
https://openvpn.net/vpn-server-resource ... mmand-line

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

chort1
OpenVPN User
Posts: 27
Joined: Tue Mar 01, 2022 12:24 pm

Re: Error when disabling Multiple sessions per user

Post by chort1 » Wed Sep 14, 2022 8:04 am

Thanks, Johan,

The __DEFAULT__ user was indeed missing. Not sure how that happened, but this was on a lab installation, so it wasn't a big issue. I was able to recreate __DEFAULT__ by comparing with a prod server's config.

The primary goal was to apply the setting to make the config option show up with

Code: Select all

sacli configquery
afterwards. That works now, and you've also provided me with the name for the setting, so thanks again!

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: Error when disabling Multiple sessions per user

Post by openvpn_inc » Wed Sep 14, 2022 4:17 pm

Hi chort1,

You're welcome, have a great day.

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

Post Reply