binhex / arch-rtorrentvpn

Docker build script for Arch Linux base with ruTorrent, rTorrent, autodl-irssi, Privoxy and OpenVPN
GNU General Public License v3.0
239 stars 36 forks source link

#build 0.9.6-3-165. Container seems to get stuck on "OpenVpn started" #47

Closed sjsivert closed 6 years ago

sjsivert commented 6 years ago

In the latest build 0.9.6-3-165 the container seems to be stuck on "starting openvpn". I downgraded to build 0.9.6-3-162 and everything now works again.

docker-compose.yml

torrentVPN:
    image: binhex/arch-rtorrentvpn
    container_name: torrentVPN
    restart: always
    cap_add:
      - net_admin
    devices:
      - "/dev/net/tun"
    ports:
      - 9080:9080
      - 3000:3000
    volumes:
      - /mnt/nas/Mediaserver/data:/data
      - /home/audun/docker/torrentVPN:/config
      - /etc/localtime:/etc/localtime:ro
      - /home/audun/docker/vpn/:/vpn
    environment:
      - VPN_ENABLED=yes
      - VPN_USER=....
      - VPN_PASS=...
      - VPN_PROV=custom
      - ENABLE_AUTODL_IRSSI=yes
      - VPN_OPTIONS="--config /vpn/config.ovpn"
      - ENABLE_FLOOD=false
      - LAN_NETWORK=192.168.1.0/24
      #- NAME_SERVERS=8.8.8.8
      - DEBUG=false
      - PUID=1000
      - PGID=1000

container logs

Created by...,
___.   .__       .__                   ,
\_ |__ |__| ____ |  |__   ____ ___  ___,
 | __ \|  |/    \|  |  \_/ __ \\  \/  /,
 | \_\ \  |   |  \   Y  \  ___/ >    < ,
 |___  /__|___|  /___|  /\___  >__/\_ \,
     \/        \/     \/     \/      \/,
   https://hub.docker.com/u/binhex/,
,
2018-03-05 18:06:06.669646 [info] System information Linux eb5513ee1f71 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 GNU/Linux,
2018-03-05 18:06:06.698857 [info] PUID defined as '1000',
2018-03-05 18:06:07.129194 [info] PGID defined as '1000',
2018-03-05 18:06:07.396831 [warn] UMASK not defined (via -e UMASK), defaulting to '000',
2018-03-05 18:06:07.448023 [info] Permissions already set for volume mappings,
2018-03-05 18:06:07.482741 [info] VPN_ENABLED defined as 'yes',
2018-03-05 18:06:07.523750 [info] OpenVPN config file (ovpn extension) is located at /config/openvpn/65-Sweden.ovpn,
dos2unix: converting file /config/openvpn/config.ovpn to Unix format...,
2018-03-05 18:06:07.555938 [info] VPN remote line defined as '#######',
2018-03-05 18:06:07.586850 [info] VPN_REMOTE defined as '#######',
2018-03-05 18:06:07.616144 [info] VPN_PORT defined as '####',
2018-03-05 18:06:07.644931 [info] VPN_PROTOCOL defined as 'udp',
2018-03-05 18:06:07.674170 [info] VPN_DEVICE_TYPE defined as 'tun0',
2018-03-05 18:06:07.708747 [info] VPN_PROV defined as 'custom',
2018-03-05 18:06:07.745539 [info] LAN_NETWORK defined as '192.168.1.0/24',
2018-03-05 18:06:07.776427 [warn] NAME_SERVERS not defined (via -e NAME_SERVERS), defaulting to Google and FreeDNS name servers,
2018-03-05 18:06:07.809591 [info] VPN_USER defined as '####',
2018-03-05 18:06:07.841022 [info] VPN_PASS defined as '#####',
2018-03-05 18:06:07.872059 [info] VPN_OPTIONS defined as '"--config /vpn/####.ovpn"',
2018-03-05 18:06:07.904501 [warn] ENABLE_PRIVOXY not defined (via -e ENABLE_PRIVOXY), defaulting to 'no',
2018-03-05 18:06:07.940047 [info] ENABLE_FLOOD defined as 'false',
2018-03-05 18:06:07.973678 [info] ENABLE_AUTODL_IRSSI defined as 'yes',
chsh: Shell not changed.,
Changing shell for nobody.,
2018-03-05 18:13:46.883139 [info] Starting Supervisor...,
2018-03-05 18:13:47,029 CRIT Set uid to user 0,
2018-03-05 18:13:47,029 INFO Included extra file "/etc/supervisor/conf.d/rtorrent.conf" during parsing,
2018-03-05 18:13:47,032 INFO supervisord started with pid 7,
2018-03-05 18:13:48,036 INFO spawned: 'start-script' with pid 136,
2018-03-05 18:13:48,038 INFO spawned: 'rutorrent-script' with pid 137,
2018-03-05 18:13:48,040 INFO spawned: 'flood-script' with pid 138,
2018-03-05 18:13:48,041 INFO spawned: 'irssi-script' with pid 139,
2018-03-05 18:13:48,042 INFO spawned: 'rtorrent-script' with pid 140,
2018-03-05 18:13:48,044 INFO spawned: 'privoxy-script' with pid 141,
2018-03-05 18:13:48,044 INFO reaped unknown pid 8,
2018-03-05 18:13:48,049 DEBG 'start-script' stdout output:,
[info] VPN is enabled, beginning configuration of VPN,
,
2018-03-05 18:13:48,049 INFO success: start-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs),
2018-03-05 18:13:48,049 INFO success: rutorrent-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs),
2018-03-05 18:13:48,049 INFO success: flood-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs),
2018-03-05 18:13:48,049 INFO success: irssi-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs),
2018-03-05 18:13:48,050 INFO success: rtorrent-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs),
2018-03-05 18:13:48,050 INFO success: privoxy-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs),
2018-03-05 18:13:48,053 DEBG 'flood-script' stdout output:,
[info] Flood not enabled, skipping starting Flood Web UI,
,
2018-03-05 18:13:48,053 DEBG fd 17 closed, stopped monitoring <POutputDispatcher at 139701821681744 for <Subprocess at 139701821684984 with name flood-script in state RUNNING> (stdout)>,
2018-03-05 18:13:48,053 DEBG fd 21 closed, stopped monitoring <POutputDispatcher at 139701821644096 for <Subprocess at 139701821684984 with name flood-script in state RUNNING> (stderr)>,
2018-03-05 18:13:48,054 INFO exited: flood-script (exit status 0; expected),
2018-03-05 18:13:48,054 DEBG received SIGCLD indicating a child quit,
2018-03-05 18:13:48,055 DEBG 'rtorrent-script' stdout output:,
[info] rTorrent config file already exists, skipping copy,
,
2018-03-05 18:13:48,057 DEBG 'rtorrent-script' stdout output:,
[info] VPN is enabled, checking VPN tunnel local ip is valid,
,
2018-03-05 18:13:48,064 DEBG 'privoxy-script' stdout output:,
[info] Privoxy set to disabled,
,
2018-03-05 18:13:48,065 DEBG fd 32 closed, stopped monitoring <POutputDispatcher at 139701821761152 for <Subprocess at 139701821684408 with name privoxy-script in state RUNNING> (stdout)>,
2018-03-05 18:13:48,065 DEBG fd 36 closed, stopped monitoring <POutputDispatcher at 139701821761584 for <Subprocess at 139701821684408 with name privoxy-script in state RUNNING> (stderr)>,
2018-03-05 18:13:48,065 INFO exited: privoxy-script (exit status 0; expected),
2018-03-05 18:13:48,065 DEBG received SIGCLD indicating a child quit,
2018-03-05 18:13:48,191 DEBG 'start-script' stdout output:,
[info] Default route for container is 172.18.0.1,
,
2018-03-05 18:13:48,195 DEBG 'start-script' stdout output:,
[info] Adding 8.8.8.8 to /etc/resolv.conf,
,
2018-03-05 18:13:48,198 DEBG 'start-script' stdout output:,
[info] Adding 37.235.1.174 to /etc/resolv.conf,
,
2018-03-05 18:13:48,200 DEBG 'start-script' stdout output:,
[info] Adding 8.8.4.4 to /etc/resolv.conf,
,
2018-03-05 18:13:48,204 DEBG 'start-script' stdout output:,
[info] Adding 37.235.1.177 to /etc/resolv.conf,
,
2018-03-05 18:13:48,251 DEBG 'start-script' stdout output:,
[info] Attempting to load tun kernel module...,
,
2018-03-05 18:13:48,252 DEBG 'start-script' stderr output:,
modprobe: FATAL: Module tun not found in directory /lib/modules/4.4.0-116-generic,
,
2018-03-05 18:13:48,252 DEBG 'start-script' stdout output:,
[warn] Unable to load tun kernel module using modprobe, trying insmod...,
,
2018-03-05 18:13:48,253 DEBG 'start-script' stderr output:,
insmod: ERROR: could not load module /lib/modules/tun.ko: No such file or directory,
,
2018-03-05 18:13:48,253 DEBG 'start-script' stdout output:,
[warn] Unable to load tun kernel module, assuming its dynamically loaded,
,
2018-03-05 18:13:48,262 DEBG 'start-script' stdout output:,
[info] Attempting to load iptable_mangle module...,
,
2018-03-05 18:13:48,263 DEBG 'start-script' stderr output:,
modprobe: FATAL: Module iptable_mangle not found in directory /lib/modules/4.4.0-116-generic,
,
2018-03-05 18:13:48,264 DEBG 'start-script' stdout output:,
[warn] Unable to load iptable_mangle module using modprobe, trying insmod...,
,
2018-03-05 18:13:48,264 DEBG 'start-script' stderr output:,
insmod: ERROR: could not load module /lib/modules/iptable_mangle.ko: No such file or directory,
,
2018-03-05 18:13:48,265 DEBG 'start-script' stdout output:,
[warn] Unable to load iptable_mangle module, you will not be able to connect to the applications Web UI or Privoxy outside of your LAN,
[info] unRAID/Ubuntu users: Please attempt to load the module by executing the following on your host: '/sbin/modprobe iptable_mangle',
[info] Synology users: Please attempt to load the module by executing the following on your host: 'insmod /lib/modules/iptable_mangle.ko',
,
2018-03-05 18:13:48,268 DEBG 'start-script' stdout output:,
[info] Adding 192.168.1.0/24 as route via docker eth0,
,
2018-03-05 18:13:48,270 DEBG 'start-script' stdout output:,
[info] ip route defined as follows...,
--------------------,
,
2018-03-05 18:13:48,270 DEBG 'start-script' stdout output:,
default via 172.18.0.1 dev eth0 ,
172.18.0.0/16 dev eth0 proto kernel scope link src 172.18.0.6 ,
,
2018-03-05 18:13:48,271 DEBG 'start-script' stdout output:,
192.168.1.0/24 via 172.18.0.1 dev eth0 ,
--------------------,
,
2018-03-05 18:13:48,297 DEBG 'start-script' stdout output:,
[info] Docker network defined as    172.18.0.0/16,
,
2018-03-05 18:13:48,357 DEBG 'start-script' stdout output:,
[info] iptables defined as follows...,
--------------------,
,
2018-03-05 18:13:48,359 DEBG 'start-script' stdout output:,
-P INPUT DROP,
-P FORWARD ACCEPT,
-P OUTPUT DROP,
-A INPUT -i tun0 -j ACCEPT,
-A INPUT -s 172.18.0.0/16 -d 172.18.0.0/16 -j ACCEPT,
-A INPUT -i eth0 -p udp -m udp --sport 8292 -j ACCEPT,
-A INPUT -i eth0 -p tcp -m tcp --dport 9080 -j ACCEPT,
-A INPUT -i eth0 -p tcp -m tcp --sport 9080 -j ACCEPT,
-A INPUT -i eth0 -p tcp -m tcp --dport 9443 -j ACCEPT,
-A INPUT -i eth0 -p tcp -m tcp --sport 9443 -j ACCEPT,
-A INPUT -s 192.168.1.0/24 -i eth0 -p tcp -m tcp --dport 5000 -j ACCEPT,
-A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT,
-A INPUT -i lo -j ACCEPT,
-A OUTPUT -o tun0 -j ACCEPT,
-A OUTPUT -s 172.18.0.0/16 -d 172.18.0.0/16 -j ACCEPT,
-A OUTPUT -o eth0 -p udp -m udp --dport 8292 -j ACCEPT,
-A OUTPUT -o eth0 -p tcp -m tcp --dport 9080 -j ACCEPT,
-A OUTPUT -o eth0 -p tcp -m tcp --sport 9080 -j ACCEPT,
-A OUTPUT -o eth0 -p tcp -m tcp --dport 9443 -j ACCEPT,
-A OUTPUT -o eth0 -p tcp -m tcp --sport 9443 -j ACCEPT,
-A OUTPUT -d 192.168.1.0/24 -o eth0 -p tcp -m tcp --sport 5000 -j ACCEPT,
-A OUTPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT,
-A OUTPUT -o lo -j ACCEPT,
,
2018-03-05 18:13:48,360 DEBG 'start-script' stdout output:,
--------------------,
,
2018-03-05 18:13:48,360 DEBG 'start-script' stdout output:,
[info] Starting OpenVPN...,
,
2018-03-05 18:13:48,365 DEBG 'start-script' stdout output:,
Options error: Unrecognized option or missing or extra parameter(s) in [CMD-LINE]:1: auth-user-pass (2.4.4),
Use --help for more information.,
,
2018-03-05 18:13:48,366 DEBG 'start-script' stdout output:,
[info] OpenVPN started,
,
binhex commented 6 years ago

You shouldn't be defining this:-

VPN_OPTIONS="--config /vpn/config.ovpn"

As it's already done for you, code searches for ovpn files located in /config/openvpn/, please remove the value and move your ovpn file and certs to the normal location.

sjsivert commented 6 years ago

Thanks this fixed the issue.