OpenVPN / openvpn3-linux

OpenVPN 3 Linux client
GNU Affero General Public License v3.0
564 stars 151 forks source link

Autoload: Session not started. Caused by "No such interface “net.openvpn.v3.sessions”" #130

Closed fdebiesse closed 2 years ago

fdebiesse commented 2 years ago

Hello,

I'm using openvpn3-autoload on a linux machine, through a shell script, but i get this warning:

WARNING: org.freedesktop.DBus.Error.UnknownMethod: No such interface “net.openvpn.v3.sessions” on object at path /net/openvpn/v3/sessions/1b0d5211sc611s492cs9ee4sa71ab6e9c074
WARNING: This configuration may not have been auto-started.

The issue is that the session is not automatically started (which is an issue for my script which will be crontabed)

For now, my script justs launches:

/usr/sbin/openvpn3-autoload --directory $HOME/.openvpn3/autoload
openvpn3 session-manage --disconnect --config VPNConfig.ovpn

In the ~/.openvpn3/autoload folder, i have my 2 files:

{
    "autostart": true,
    "user-auth": {
        "autologin": true,
        "username": "**********************",
        "password": "**********************"
    }
}

Context information:

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
openvpn3 version
OpenVPN 3/Linux v18_beta (openvpn3)
OpenVPN core 3.git:HEAD:c4fa5a69 linux x86_64 64-bit
Copyright (C) 2012-2020 OpenVPN Inc. All rights reserved.

Regards

dsommers commented 2 years ago

This sounds like the openvpn3-service-sessionmgr process doesn't start and settle quickly enough.

That said, we are deprecating openvpn3-autoload. So I would encourage you to use the new systemd unit file approach. In short terms, it means:

I would recommend you to test this approach and see if that works better. If it doesn't please provide the output of this command line:

  # openvpn3-admin version --services

If there are any failures here, then the output from journalctl --since -3m will be quite helpful.

fdebiesse commented 2 years ago

Hello @dsommers

Thank you for your response ! As recommended, I do not use anymore autoload as it will be deprecated. I'm now using auth-user-pass in the config file and I launch the commands you've mentionned. All seems to be working fine now

Thank you!