guillaumedsde / alpine-qbittorrent-openvpn

qBittorrent docker container with OpenVPN client running as unprivileged user on alpine linux
https://guillaumedsde.gitlab.io/alpine-qbittorrent-openvpn/
GNU General Public License v3.0
216 stars 40 forks source link

Error in nordvpn script in latest docker build (tag 869e57e) causing image to exit. #92

Open JGJones opened 3 years ago

JGJones commented 3 years ago

Information

Syntax error (line 88) in nordvpn script, so container fails to start. docker container logs shows the container exits after encountering the error:

$ docker container logs torrents_alpine-qbittorrent-openvpn_1
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-setup-permissions: executing...
[cont-init.d] 01-setup-permissions: exited 0.
[cont-init.d] 02-setup-openvpn: executing...
2021-10-14 11:14:26 TUN/TAP device tun0 opened
2021-10-14 11:14:26 Persist state set to: ON
INFO: Trying to use OpenVPN provider: nordvpn
A    nordvpn
A    nordvpn/configure-openvpn.sh
Exported revision 1268.
Provider nordvpn has a custom startup script, executing it
/var/run/s6/etc/cont-init.d/02-setup-openvpn: /etc/openvpn/nordvpn/configure-openvpn.sh: line 88: syntax error: unexpected "(" (expecting "}")
[cont-init.d] 02-setup-openvpn: exited 2.
[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.

Current setup

docker image tag (ex: python, latest, 32242d1 ...)
tag: 869e57e hash: 8afa3ad9a817

docker-compose.yml file or docker run command

version: "3.3"
services:
  alpine-qbittorrent-openvpn:
    volumes:
      - "/home/user/torrents/downloads:/downloads"
      - "/home/user/torrents/config:/config"
      - "/etc/localtime:/etc/localtime:ro"
    environment:
      - OPENVPN_PROVIDER=nordvpn
      - OPENVPN_CONFIG=
      - OPENVPN_USERNAME=username
      - OPENVPN_PASSWORD=password
      - PUID=1000
      - PGID=1000
      - LAN=10.0.0.0/16
    ports:
      - "8080:8080"
    cap_add:
      - NET_ADMIN
    image: guillaumedsde/alpine-qbittorrent-openvpn:latest

how did you start the container? (don't forget to use backticks for creating a proper code block)

docker-compose up -d

Attempted Fix(es)

What you have tried in order to fix the issue (if anything)

Reverted to a previous docker image build (hash: ea390b2b5915, tag: 305151e) and modified docker-compose.yml file to use the tag 305151e. Container runs as expected.

JonDror commented 3 years ago

Same! As a workaround I removed the OPENVPN_PROVIDER to use the latest downloads config file (which then does not trigger the configure-openvpn.sh file)

ezruneko commented 3 years ago

same issue here:

/var/run/s6/etc/cont-init.d/02-setup-openvpn: /etc/openvpn/nordvpn/configure-openvpn.sh: line 88: syntax error: unexpected "(" (expecting "}")

JonDror commented 3 years ago

@guillaumedsde - This is still happening - any leads on a fix?

Thank you so much!

aaronnad commented 3 years ago

Getting the same thing here

Guear commented 3 years ago

Got the same bug here and did the same workaround as @JonDror

JonDror commented 3 years ago

@Guear at some point that will no longer work.. I reverted to the build @JGJones suggested in my docker compose: image: guillaumedsde/alpine-qbittorrent-openvpn:305151e so a new file will be retrieved.

Guear commented 3 years ago

@Guear at some point that will no longer work.. I reverted to the build @JGJones suggested in my docker compose: image: guillaumedsde/alpine-qbittorrent-openvpn:305151e so a new file will be retrieved.

Yep you're right @JonDror . Will try this previous build.

ezruneko commented 3 years ago

i've just resolved in my pull request https://github.com/guillaumedsde/alpine-qbittorrent-openvpn/pull/98

The last update in the repository https://github.com/haugene/vpn-configs-contrib causes this issue.

JonDror commented 2 years ago

Thanks @ezruneko - Looks like this is just waiting to be merged..