Open Jessssuhh opened 1 year ago
It seems like there is an issue with the container or the config. The restarts are probably caused because the container exists but is set to always (or unless-stopped) restart.
Can you post the docker log? (docker logs CONATAINERNAME
)
Hahah wow I can't believe the restart policy didn't occur to me. Thanks for the patience lmfao
So turned the restart policy to never, this is the entire console log. There is also a docker container log in a different area (this is all via portainer) but its gibberish in the same way that an image file would be if you opened it in notepad so I didn't think that was what you meant.
`--------------------
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
--------------------
2023-07-04 22:41:41 [INFO] Adding additional incoming port 8080 for eth0
2023-07-04 22:41:41 [INFO] Adding additional incoming port 8999 for eth0
2023-07-04 22:41:41 [INFO] Adding additional outgoing port 8080 for eth0
2023-07-04 22:41:41 [INFO] Adding additional outgoing port 8999 for eth0
2023-07-04 22:41:41 [DEBUG] iptables table 'filter' defined as follows...
--------------------
-P INPUT DROP
-P FORWARD ACCEPT
-P OUTPUT DROP
-A INPUT -i tun0 -j ACCEPT
-A INPUT -s 172.17.0.0/16 -d 172.17.0.0/16 -j ACCEPT
-A INPUT -s 45.248.77.123/32 -i eth0 -p tcp -m tcp --sport 443 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 8080 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 8080 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 8999 -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A OUTPUT -o tun0 -j ACCEPT
-A OUTPUT -s 172.17.0.0/16 -d 172.17.0.0/16 -j ACCEPT
-A OUTPUT -d 45.248.77.123/32 -o eth0 -p tcp -m tcp --dport 443 -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m tcp --sport 8080 -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m tcp --sport 8080 -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m tcp --sport 8999 -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
--------------------
2023-07-04 22:41:41 [DEBUG] iptables table 'mangle' defined as follows...
--------------------
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
--------------------
[cont-init.d] 03-network.sh: exited 0.
[cont-init.d] 04-qbittorrent-setup.sh: executing...
2023-07-04 22:41:41 [WARNING] ENABLE_SSL is set to , SSL is not enabled. This could cause issues with logging if other apps use the same Cookie name (SID).
2023-07-04 22:41:41 [WARNING] If you manage the SSL config yourself, you can ignore this.
2023-07-04 22:41:41 [WARNING] UMASK not defined (via -e UMASK), defaulting to '002'
[cont-init.d] 04-qbittorrent-setup.sh: exited 0.
[cont-init.d] 05-install.sh: executing...
[cont-init.d] 05-install.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
2023-07-04 22:41:41 [INFO] Logging to /config/qBittorrent/data/logs/qbittorrent.log.
[services.d] done.
2023-07-04 22:41:41 [INFO] Trying to ping 1.1.1.1 and 8.8.8.8 over the docker interface for 500ms each...
Terminated
Terminated
2023-07-04 22:41:43 [INFO] Success: Could not connect. This means the firewall is most likely working properly.
2023-07-04 22:41:43 [INFO] qBittorrent started with PID 550
2023-07-04 22:41:43 [INFO] HEALTH_CHECK_HOST is not set. Using default host one.one.one.one
2023-07-04 22:42:16 [ERROR] Network is down. Exiting..
2023-07-04 22:42:16 [ERROR INFO] 'ip addr show' output:
--------------------
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
5439: eth0@if5440: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 172.17.0.2/16 brd 172.17.255.255 scope global eth0
valid_lft forever preferred_lft forever
--------------------
2023-07-04 22:42:16 [ERROR INFO] 'ip route show table main' output:
--------------------
default via 172.17.0.1 dev eth0
172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.2
192.168.1.0/24 via 172.17.0.1 dev eth0
--------------------
2023-07-04 22:42:16 [ERROR INFO] 'ip rule' output:
--------------------
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
--------------------
2023-07-04 22:42:16 [ERROR INFO] 'netstat -lpn' output:
--------------------
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 172.17.0.2:62703 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:62703 0.0.0.0:* LISTEN -
tcp6 0 0 :::8080 :::* LISTEN -
udp 0 0 172.17.0.2:49117 0.0.0.0:* -
udp 0 0 172.17.0.2:62703 0.0.0.0:* -
udp 0 0 127.0.0.1:62703 0.0.0.0:* -
udp 0 0 0.0.0.0:6771 0.0.0.0:* -
udp 0 0 0.0.0.0:6771 0.0.0.0:* -
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 5078989 - /config/qBittorrent/config/.pWWnwd/s
--------------------
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
`
So adding vpn_enabled yes to the env has stopped QBVPN from crashing, meaning I can modify settings and whatnot without a 10 second timer to worry about. But torrents added error and fail instantly.
edit: vpn_enabled no doesn't prevent QBVPN from erroring out immediately so I don't think its a vpn config issue
Your docker log is not complete but from what you posted it seems like the VPN goes down shortly after the container finishes startup as there is no tun0 in the interface list (ip a). Can you post the complete log and your portainer config?
If the container behaves differently, it would also be helpful if you could post the logs with VPN_ENABLED set to yes or no and without VPN_ENABLED set.
I think the log is only saving the most recent 100 lines as the console display in portainer is set to display the most recent 100 lines by default?
this here is the config part of my ovpn file
client
dev tun
proto tcp
remote _xx.xx.xx.xx_ 443
resolv-retry infinite
remote-random
nobind
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
ping 15
ping-restart 0
ping-timer-rem
reneg-sec 0
comp-lzo no
verify-x509-name CN=au735.nordvpn.com
remote-cert-tls server
verb 3
pull
fast-io
cipher AES-256-CBC
auth SHA512
<ca>
QBVPN VPN enabled.txt QBVPN VPN unset.txt QBVPN VPN disabled.txt
I have not used Portainer before but this config works for me:
Hi!
I'm getting that same circular crash issue that a few others have reported on here the last few years. Not going to lie there is a solid chance this is a configuration issue as I am fresh at this whole linux/debian thing. I haven't tested with a torrent yet but right now I can log into webUI just fine for about 10 seconds at a time. Container seems to crash within about 10 seconds of me logging in, and is fine with a reboot.
Any guidance would be appreciated.. small words please!