DyonR/docker-nzbgetvpn

NZBGet Autolaunch

Closed this issue · 5 comments

Hi,
Installed the container on Synology 918+ (DSM 6.2.3) and it launches and connects to OpenVPN correctly with the environment variables set as per the readme.
NZBGet is not launched automatically. I must connect a bash session and start the daemon manually using the start.sh script or nzbget -D. NZBGet then runs as expected.
Is this normal behaviour?

The container is running only 3 processes before I launch NZBGet manually:
iptables.sh
openvpn
sleep 1

DyonR commented

Should not be normal, could you maybe post the log of the Docker Container? Make sure to remove any sensitive info

This is all that is in the Synology Docker GUI after I start the container:

2021-05-18 09:52:29
stdout
Tue May 18 09:52:29 2021 library versions: OpenSSL 1.1.1d  10 Sep 2019, LZO 2.10
2021-05-18 09:52:29
stdout
Tue May 18 09:52:29 2021 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Feb 20 2019
2021-05-18 09:52:28
stdout
2021-05-18 09:52:28.725379 [INFO] Starting OpenVPN...
2021-05-18 09:52:28
stdout
2021-05-18 09:52:28.654805 [INFO] Adding 1.0.0.1 to resolv.conf
2021-05-18 09:52:28
stdout
2021-05-18 09:52:28.575072 [INFO] Adding 1.1.1.1 to resolv.conf
2021-05-18 09:52:28
stdout
2021-05-18 09:52:28.513611 [INFO] VPN_OPTIONS not defined (via -e VPN_OPTIONS)
2021-05-18 09:52:28
stdout
2021-05-18 09:52:28.453617 [INFO] NAME_SERVERS defined as '1.1.1.1,1.0.0.1'
2021-05-18 09:52:28
stdout
2021-05-18 09:52:28.373697 [INFO] LAN_NETWORK defined as '192.168.10.0/24'
2021-05-18 09:52:28
stdout
2021-05-18 09:52:28.292639 [INFO] VPN_DEVICE_TYPE defined as 'tun0'
2021-05-18 09:52:28
stdout
2021-05-18 09:52:28.232539 [INFO] VPN_PROTOCOL defined as 'tcp-client'
2021-05-18 09:52:28
stdout
2021-05-18 09:52:28.171937 [INFO] VPN_PORT defined as '80'
2021-05-18 09:52:28
stdout
2021-05-18 09:52:28.110200 [INFO] VPN_REMOTE defined as ‘xxxxxxxx’
2021-05-18 09:52:28
stdout
2021-05-18 09:52:28.048242 [INFO] VPN remote line defined as ‘xxxxxxxxx 80'
2021-05-18 09:52:27
stdout
dos2unix: converting file /config/openvpn/xxxxxxxxxx.ovpn to Unix format...
2021-05-18 09:52:27
stdout
2021-05-18 09:52:27.810678 [INFO] OpenVPN config file is found at /config/openvpn/xxxxxxxxx.ovpn
2021-05-18 09:52:27
stdout
2021-05-18 09:52:27.545640 [INFO] VPN_TYPE defined as 'openvpn'
2021-05-18 09:52:27
stdout
2021-05-18 09:52:27.480776 [INFO] VPN_ENABLED defined as 'yes'
2021-05-18 09:51:31
stdout
Enter Auth Username:

The last line in the dockerfile launches a bash session and openvpn:
CMD ["/bin/bash", "/etc/openvpn/start.sh"]
I can't see where nzbget is called...?

DyonR commented

It seems like it has problems executing, or setting up, the OpenVPN connection.
At line 266 of the start.sh it starts the script to launch nzbget.
I don't get why it doesn't work for you.
Because of this the VPN Connection is also probably not active if you launch it manually

All sorted. Thanks. There was a leading space in the VPN_PASSWORD field which was the culprit, but I had to rebuild from scratch to get it working.