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

Random VPN Shutdowns - event_wait : Interrupted system call (code=4) #422

Open
spencerskinner99 opened this issue May 29, 2023 · 1 comment

Comments

@spencerskinner99
Copy link

Hi,

For some reason my VPN container keeps shutting down after an random number of hours, it's leaving me unable to access the web interfaces of the connected containers.

I am unsure what's causing the VPN to crash, I have attached my logs and my docker compose.

Any help appreciated, thanks!

+ exec sg vpn -c 'openvpn --cd /vpn --config /vpn/vpn.conf --script-security 2 --redirect-gateway def1 --up /etc/openvpn/up.sh --down /etc/openvpn/down.sh --route-up '\''/bin/sh -c " iptables -A OUTPUT -d 127.0.0.11 -j ACCEPT"'\'' --route-pre-down '\''/bin/sh -c " iptables -D OUTPUT -d 127.0.0.11 -j ACCEPT"'\'' --auth-user-pass /vpn/vpn.auth                 '
Mon May 29 05:48:45 2023 WARNING: file '/vpn/vpn.auth' is group or others accessible
Mon May 29 05:48:45 2023 OpenVPN 2.4.9 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Apr 20 2020
Mon May 29 05:48:45 2023 library versions: OpenSSL 1.1.1g  21 Apr 2020, LZO 2.10
Mon May 29 05:48:45 2023 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mon May 29 05:48:45 2023 CRL: loaded 1 CRLs from file /vpn/crl.rsa.2048.pem
Mon May 29 05:48:45 2023 TCP/UDP: Preserving recently used remote address: [AF_INET]191.96.36.46:1198
Mon May 29 05:48:45 2023 UDP link local: (not bound)
Mon May 29 05:48:45 2023 UDP link remote: [AF_INET]191.96.36.46:1198
Mon May 29 05:48:45 2023 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Mon May 29 05:48:45 2023 [toronto415] Peer Connection Initiated with [AF_INET]191.96.36.46:1198
Mon May 29 05:48:46 2023 OpenVPN ROUTE6: OpenVPN needs a gateway parameter for a --route-ipv6 option and no default was specified by either --route-ipv6-gateway or --ifconfig-ipv6 options
Mon May 29 05:48:46 2023 OpenVPN ROUTE: failed to parse/resolve route for host/network: 2000::/3
Mon May 29 05:48:46 2023 TUN/TAP device tun0 opened
Mon May 29 05:48:46 2023 /sbin/ip link set dev tun0 up mtu 1500
Mon May 29 05:48:46 2023 /sbin/ip addr add dev tun0 10.13.112.100/24 broadcast 10.13.112.255
Mon May 29 05:48:46 2023 /etc/openvpn/up.sh tun0 1500 1553 10.13.112.100 255.255.255.0 init
Mon May 29 05:48:46 2023 WARNING: OpenVPN was configured to add an IPv6 route over tun0. However, no IPv6 has been configured for this interface, therefore the route installation may fail or may not work as expected.
Mon May 29 05:48:46 2023 Initialization Sequence Completed
Mon May 29 09:03:31 2023 event_wait : Interrupted system call (code=4)
Mon May 29 09:03:31 2023 /bin/sh -c  iptables -D OUTPUT -d 127.0.0.11 -j ACCEPT tun0 1500 1553 10.13.112.100 255.255.255.0 init
Mon May 29 09:03:31 2023 /sbin/ip addr del dev tun0 10.13.112.100/24
Mon May 29 09:03:31 2023 /etc/openvpn/down.sh tun0 1500 1553 10.13.112.100 255.255.255.0 init
Mon May 29 09:03:31 2023 SIGTERM[hard,] received, process exiting
The use of ROUTE or -r may no longer be needed, try it without!
Dump terminated
vpn:
    container_name: ovpn
    hostname: ovpn
    image: dperson/openvpn-client
    restart: always
    ports:
       - 192.168.2.32:9696:9696
       - 192.168.2.32:8989:8989
       - 192.168.2.32:7878:7878
       - 192.168.2.32:8686:8686
       - 192.168.2.32:8787:8787
    environment:
      AUTH: 'sha1'
      CIPHER: 'aes-128-cbc'  
    sysctls:
      - net.ipv6.conf.all.disable_ipv6=1
    cap_add:
      - NET_ADMIN
    volumes:
      - /Docker_Configs/media-control/OVPN/vpn:/vpn
      - /dev/net/tun:/dev/net/tun
    labels:
       com.centurylinklabs.watchtower.enable: "false"
       autoheal: "true"
@zachg99
Copy link

zachg99 commented Jun 19, 2023

I just ran into this issue and figured out the cause. This is doing a healthcheck to a service that sometimes takes minutes to return but it's only waiting 15seconds before it times out. You need to override the healthcheck rule in your compose file or, like i did, switch to a different vpn client that's being actively maintained.

Issue call:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants