ruimarinho / docker-openvpn-monitor

The trusted multi-platform web-based OpenVPN Monitor docker image.
MIT License
101 stars 27 forks source link

Could not connect to openvpn-udp:5555 #20

Closed PrzemekSkw closed 3 years ago

PrzemekSkw commented 3 years ago

Hello, I try to install openvpn-monitor on my Debian 10 VPS. First I add in my /etc/openvpn/server/server.conf line management 10.8.0.1 5555. I want to connect to openvpn-monitor dashboard only when I'm connected from vpn client. Second I install docker and try:

przemek@OpenVPN:/$ docker run --name openvpn-monitor \
>   -e OPENVPNMONITOR_DEFAULT_DATETIMEFORMAT="%%d/%%m/%%Y" \
>   -e OPENVPNMONITOR_DEFAULT_LATITUDE=-37 \
>   -e OPENVPNMONITOR_DEFAULT_LOGO=logo.jpg \
>   -e OPENVPNMONITOR_DEFAULT_LONGITUDE=144 \
>   -e OPENVPNMONITOR_DEFAULT_MAPS=True \
>   -e OPENVPNMONITOR_DEFAULT_SITE=Test \
>   -e OPENVPNMONITOR_SITES_0_ALIAS=UDP \
>   -e OPENVPNMONITOR_SITES_0_HOST=openvpn-udp \
>   -e OPENVPNMONITOR_SITES_0_NAME=UDP \
>   -e OPENVPNMONITOR_SITES_0_PORT=5555 \
>   -e OPENVPNMONITOR_SITES_0_SHOWDISCONNECT=True \
>   -e OPENVPNMONITOR_SITES_1_ALIAS=TCP \
>   -e OPENVPNMONITOR_SITES_1_HOST=openvpn-udp \
>   -e OPENVPNMONITOR_SITES_1_NAME=TCP \
>   -e OPENVPNMONITOR_SITES_1_PORT=5555 \
> -p 8084:80 ruimarinho/openvpn-monitor
Unable to find image 'ruimarinho/openvpn-monitor:latest' locally
latest: Pulling from ruimarinho/openvpn-monitor
a076a628af6f: Pull complete 
de8081929fad: Pull complete 
181a96cb0617: Pull complete 
c91fe2011cc2: Pull complete 
cb8351d52d89: Pull complete 
cc6b4f150f28: Pull complete 
de9e955a459f: Pull complete 
3a03b3708c5d: Pull complete 
31b5ff6a8d8c: Pull complete 
75f6ae388635: Pull complete 
Digest: sha256:e1c9e57efdd0473e403e3ea8829e3a67f3bc39
Status: Downloaded newer image for ruimarinho/openvpn-monitor:latest
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: INFO Backend set to env
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: INFO Starting confd
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: INFO Backend source(s) set to 
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: DEBUG Loading template resources from confdir /etc/confd
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: DEBUG Found template: /etc/confd/conf.d/openvpn-monitor.toml
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: DEBUG Loading template resource from /etc/confd/conf.d/openvpn-monitor.toml
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: DEBUG Retrieving keys from store
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: DEBUG Key prefix set to /
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: DEBUG Key Map: map[string]string{"/openvpnmonitor/sites/0/host":"openvpn-udp", "/openvpnmonitor/sites/1/name":"TCP", "/openvpnmonitor/sites/1/host":"openvpn-udp", "/openvpnmonitor/sites/0/showdisconnect":"True", "/openvpnmonitor/sites/1/alias":"TCP", "/openvpnmonitor/sites/1/port":"5555", "/openvpnmonitor/sites/0/alias":"UDP", "/openvpnmonitor/default/longitude":"144", "/openvpnmonitor/default/logo":"logo.jpg", "/openvpnmonitor/default/maps":"True", "/openvpnmonitor/sites/0/name":"UDP", "/openvpnmonitor/default/site":"Test", "/openvpnmonitor/default/datetimeformat":"%d/%m/%Y", "/openvpnmonitor/default/latitude":"-37", "/openvpnmonitor/sites/0/port":"5555"}
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: DEBUG Got the following map from store: map[/openvpnmonitor/sites/0/alias:UDP /openvpnmonitor/default/longitude:144 /openvpnmonitor/default/logo:logo.jpg /openvpnmonitor/default/maps:True /openvpnmonitor/sites/0/name:UDP /openvpnmonitor/default/site:Test /openvpnmonitor/default/datetimeformat:%%d/%%m/%%Y /openvpnmonitor/default/latitude:-37 /openvpnmonitor/sites/0/port:5555 /openvpnmonitor/sites/1/port:5555 /openvpnmonitor/sites/0/host:openvpn-udp /openvpnmonitor/sites/1/name:TCP /openvpnmonitor/sites/1/host:openvpn-udp /openvpnmonitor/sites/0/showdisconnect:True /openvpnmonitor/sites/1/alias:TCP]
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: DEBUG Using source template /etc/confd/templates/openvpn-monitor.conf.tmpl
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: DEBUG Compiling source template /etc/confd/templates/openvpn-monitor.conf.tmpl
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: DEBUG Comparing candidate config to /openvpn-monitor/openvpn-monitor.conf
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: INFO /openvpn-monitor/openvpn-monitor.conf has md5sum 45897713062e7559137668e4c2504896 should be 1a5c65fa42bf7b1c5cf89b8f1e9eb91b
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: INFO Target config /openvpn-monitor/openvpn-monitor.conf out of sync
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: DEBUG Overwriting target config /openvpn-monitor/openvpn-monitor.conf
2021-02-17T08:58:51Z de9cd50c2efd confd[6]: INFO Target config /openvpn-monitor/openvpn-monitor.conf has been updated
[OpenVPN-Monitor]
datetime_format=%d/%m/%Y
latitude=-37
logo=logo.jpg
longitude=144
maps=True
site=Test
geoip_data=/var/lib/GeoIP/GeoLite2-City.mmdb

[UDP]
host=openvpn-udp
name=UDP
port=5555
show_disconnect=True

[TCP]
host=openvpn-udp
name=TCP
port=5555
[2021-02-17 08:58:51 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2021-02-17 08:58:51 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1)
[2021-02-17 08:58:51 +0000] [1] [INFO] Using worker: sync
[2021-02-17 08:58:51 +0000] [13] [INFO] Booting worker with pid: 13
INFO: Using config file: ./openvpn-monitor.conf
WARNING: socket error: [Errno -2] Name or service not known
WARNING: socket error: [Errno -2] Name or service not known

I can login to my dashboard but see that errors: Zrzut ekranu z 2021-02-17 10-06-21

I'm new in docker. Can somebody help me with that? Regards, Przemek

rodrigoross commented 3 years ago

Hello, why it was closed @PrzemekSkw did you managed to fix?

PrzemekSkw commented 3 years ago

I manage to make it work with gunicorn method. Regards.