Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shutdown OpenVPN management connection #265

Closed
patrickermer opened this issue May 8, 2024 · 2 comments · Fixed by #267
Closed

shutdown OpenVPN management connection #265

patrickermer opened this issue May 8, 2024 · 2 comments · Fixed by #267
Labels
❓ question Further information is requested

Comments

@patrickermer
Copy link

patrickermer commented May 8, 2024

I am getting error I can't seem to get through.
May 8 18:18:53 openvpn2 openvpn-auth-oauth2[6722]: time=2024-05-08T18:18:53.519Z level=ERROR msg="OpenVPN: OpenVPN management error: error from version command: error response: >INFO:OpenVPN Management Interface Version 3 -- type 'help' for more info\r\n"

Syslog:
May 8 18:18:53 openvpn2 systemd[1]: openvpn-auth-oauth2.service: Scheduled restart job, restart counter is at 38.
May 8 18:18:53 openvpn2 systemd[1]: Stopped OpenVPN authenticator.
May 8 18:18:53 openvpn2 systemd[1]: Started OpenVPN authenticator.
May 8 18:18:53 openvpn2 openvpn-auth-oauth2[6722]: time=2024-05-08T18:18:53.469Z level=INFO msg="discover oidc auto configuration with provider generic for issuer https://login.microsoftonline.com//v2.0"
May 8 18:18:53 openvpn2 openvpn-auth-oauth2[6722]: time=2024-05-08T18:18:53.518Z level=INFO msg="connect to openvpn management interface unix:///run/openvpn/server.sock"
May 8 18:18:53 openvpn2 ovpn-myserver[1206]: MANAGEMENT: Client connected from /run/openvpn/server.sock
May 8 18:18:53 openvpn2 ovpn-myserver[1206]: MANAGEMENT: CMD 'version'
May 8 18:18:53 openvpn2 openvpn-auth-oauth2[6722]: time=2024-05-08T18:18:53.518Z level=INFO msg="connection to OpenVPN management interface established."
May 8 18:18:53 openvpn2 openvpn-auth-oauth2[6722]: time=2024-05-08T18:18:53.518Z level=INFO msg="openvpn-auth-oauth2 started with base url https://url:9000/"
May 8 18:18:53 openvpn2 openvpn-auth-oauth2[6722]: time=2024-05-08T18:18:53.519Z level=INFO msg="shutdown OpenVPN management connection"
May 8 18:18:53 openvpn2 openvpn-auth-oauth2[6722]: time=2024-05-08T18:18:53.519Z level=ERROR msg="OpenVPN: OpenVPN management error: error from version command: error response: >INFO:OpenVPN Management Interface Version 3 -- type 'help' for more info\r\n"
May 8 18:18:53 openvpn2 ovpn-myserver[1206]: MANAGEMENT: Client disconnected
May 8 18:18:53 openvpn2 openvpn-auth-oauth2[6722]: time=2024-05-08T18:18:53.521Z level=INFO msg="start HTTPS server listener on :9000"
May 8 18:18:53 openvpn2 openvpn-auth-oauth2[6722]: time=2024-05-08T18:18:53.521Z level=INFO msg="start graceful shutdown of http server listener"
May 8 18:18:53 openvpn2 openvpn-auth-oauth2[6722]: time=2024-05-08T18:18:53.521Z level=INFO msg="http server listener successfully terminated"
May 8 18:18:53 openvpn2 systemd[1]: openvpn-auth-oauth2.service: Main process exited, code=exited, status=1/FAILURE
May 8 18:18:53 openvpn2 systemd[1]: openvpn-auth-oauth2.service: Failed with result 'exit-code'.

openvpn-auth-oauth2 config file:

This file is sourced by the openvpn-auth-oauth2.service

CONFIG_FILE is the path to the configuration file and used in the systemd service file only.

CONFIG_FILE=/etc/openvpn-auth-oauth2/config.yaml

https://github.com/jkroepke/openvpn-auth-oauth2/wiki/Configuration

CONFIG_HTTP_BASEURL=https://url:9000/
CONFIG_HTTP_LISTEN=:9000
CONFIG_OAUTH2_ISSUER=https://login.microsoftonline.com//v2.0
CONFIG_OAUTH2_CLIENT_ID=
CONFIG_OAUTH2_CLIENT_SECRET=
CONFIG_HTTP_TLS=true
CONFIG_HTTP_KEY=/etc/openvpn-auth-oauth2/.key
CONFIG_HTTP_CERT=/etc/openvpn-auth-oauth2/.crt
CONFIG_HTTP_SECRET=

openvpn-auth-oauth2 config file

CONFIG_OPENVPN_ADDR=unix:///run/openvpn/server.sock
CONFIG_OPENVPN_PASSWORD`

Environment

  • openvpn-auth-oauth2 Version: 1.21.1
  • OpenVPN Server Version: 2.5.9-0ubuntu0.22.04.2
  • Server OS: Ubuntu 22.04
  • OpenVPN Client (flavor, OS):
@patrickermer patrickermer added the ❓ question Further information is requested label May 8, 2024
@jkroepke
Copy link
Owner

jkroepke commented May 8, 2024

OpenVPN Server Version: 2.5.9-0ubuntu0.22.04.2

Server 2.6.2 or higher is required: https://github.com/jkroepke/openvpn-auth-oauth2/wiki/OpenVPN

@patrickermer
Copy link
Author

Thank you for pointing that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants