haugene / vpn-configs-contrib

A collection of configs for various VPN providers
GNU General Public License v3.0
176 stars 739 forks source link

Container exits: "can't read /etc/openvpn/mullvad/default.ovpn: No such file or directory" #193

Closed bitsandbooks closed 1 year ago

bitsandbooks commented 1 year ago

Is there a pinned issue for this?

Is there an existing or similar issue/discussion for this?

Is there any comment in the documentation for this?

Is this related to a provider?

Are you using the latest release?

Have you tried using the dev branch latest?

Docker run config used

---
version: "3.6"

secrets:
  OPENVPN_LOCATION:
    file: "/path/to/secrets/openvpn-location.txt"
  OPENVPN_USER:
    file: "/path/to/secrets/openvpn-user.txt"
  OPENVPN_PASSWORD:
    file: "/path/to/secrets/openvpn-password.txt"

services:
  transmission:
    container_name: "transmission"
     image: "docker.io/haugene/transmission-openvpn:4.3.2"
    volumes:
      - "/path/to/apps/transmission:/config:rw"
      - "/path/to/media/incoming:/data:rw"
      - "/usr/share/zoneinfo/Etc/UTC:/etc/localtime:ro"
    secrets:
      - OPENVPN_LOCATION
      - OPENVPN_USER
      - OPENVPN_PASSWORD
    environment:
      CREATE_TUN_DEVICE: "true"
      OPENVPN_PROVIDER: "MULLVAD"
      OPENVPN_CONFIG__FILE: /run/secrets/OPENVPN_LOCATION
      OPENVPN_USERNAME__FILE: /run/secrets/OPENVPN_USER
      OPENVPN_PASSWORD__FILE: /run/secrets/OPENVPN_PASSWORD
      OPENVPN_OPTS: " --inactive 3600 --ping 10 --ping-exit 60 "
      LOCAL_NETWORK: "192.168.0.0/16"
      PUID: "< snip >"
      PGID: "< snip >"
      WEBPROXY_ENABLED: "false"
      HEALTH_CHECK_HOST: "yahoo.com"
      TRANSMISSION_RPC_URL: "/transmission/"
      TRANSMISSION_ALT_SPEED_DOWN: 56
      TRANSMISSION_ALT_SPEED_ENABLED: "true"
      TRANSMISSION_ALT_SPEED_TIME_BEGIN: 540 # minutes since midnight
      TRANSMISSION_ALT_SPEED_TIME_ENABLED: "true"
      TRANSMISSION_ALT_SPEED_TIME_END: 1430
      TRANSMISSION_ALT_SPEED_UP: 56
      TRANSMISSION_DOWNLOAD_QUEUE_SIZE: 6
      TRANSMISSION_PEER_PORT: "50191"
      TRANSMISSION_PORT_FORWARDING_ENABLED: "true"
      TRANSMISSION_RATIO_LIMIT: 3
      TRANSMISSION_RATIO_LIMIT_ENABLED: "true"
      TRANSMISSION_RPC_HOST_WHITELIST: "127.0.0.1,192.168.*.*"
      TRANSMISSION_SPEED_LIMIT_DOWN_ENABLED: "false"
      TRANSMISSION_SPEED_LIMIT_UP_ENABLED: "false"
      TRANSMISSION_TRASH_ORIGINAL_TORRENT_FILES: "true"
      TRANSMISSION_WEB_UI: transmission-web-control
      TRANSMISSION_UMASK: "022"
      TZ: "Etc/UTC"
    logging:
      driver: json-file
      options:
        max-size: 10m
    dns:
      - 1.1.1.1
      - 1.0.0.1
      - 8.8.8.8
      - 8.8.4.4
    ports:
      - "9091:9091"
      - "50191:50191"
    cap_add:
      - NET_ADMIN
    sysctls:
      - "net.ipv6.conf.all.disable_ipv6=0"
    deploy:
      resources:
        limits:
          cpus: "8.0"
          memory: 8G
      restart_policy:
        condition: on-failure
        max_attempts: 10

Current Behavior

The container fails to run, and exits with several sed: can't read /etc/openvpn/mullvad/default.ovpn: No such file or directory errors.

Expected Behavior

Container was working with above docker-compose file, using image tagged :4.0. It stopped working after a recent pull.

How have you tried to solve the problem?

  1. Switched from :4.0 tag to :latest and a few different point releases up to :4.3.2.
  2. Checked that my OS (Ubuntu jammy) was up to date; rebooted.
  3. Tried recreating the container, with same effects

Log output

Starting container with revision: b33d0fe4c938259a0d4eb844e55468f387456121
Creating TUN device /dev/net/tun
Using OpenVPN provider: MULLVAD
Running with VPN_CONFIG_SOURCE auto
No bundled config script found for MULLVAD. Defaulting to external config
Downloading configs from https://github.com/haugene/vpn-configs-contrib/archive/main.zip into /tmp/tmp.igi7L6pLQZ
Extracting configs to /tmp/tmp.5O4iqLZX3v
Found configs for MULLVAD in /tmp/tmp.5O4iqLZX3v/vpn-configs-contrib-main/openvpn/mullvad, will replace current content in /etc/openvpn/mullvad
Cleanup: deleting /tmp/tmp.igi7L6pLQZ and /tmp/tmp.5O4iqLZX3v
No VPN configuration provided. Using default.
Modifying /etc/openvpn/mullvad/default.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
sed: can't read /etc/openvpn/mullvad/default.ovpn: No such file or directory
Modification: Change ca certificate path
sed: can't read /etc/openvpn/mullvad/default.ovpn: No such file or directory
Modification: Change ping options
sed: can't read /etc/openvpn/mullvad/default.ovpn: No such file or directory
sed: can't read /etc/openvpn/mullvad/default.ovpn: No such file or directory
sed: can't read /etc/openvpn/mullvad/default.ovpn: No such file or directory
sed: can't read /etc/openvpn/mullvad/default.ovpn: No such file or directory
Modification: Update/set resolv-retry to 15 seconds
Modification: Change tls-crypt keyfile path
Modification: Set output verbosity to 3
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Modification: Updating status for config failure detection
Found existing OPENVPN credentials at /config/openvpn-credentials.txt
adding route to local network 192.168.0.0/16 via 172.18.0.1 dev eth0
2023-02-13 16:50:22 Cipher negotiation is disabled since neither P2MP client nor server mode is enabled
Options error: You must define TUN/TAP device (--dev)
Use --help for more information.

HW/SW Environment

- OS: Ubuntu 22.04
- Docker: 20.10.12, build 20.10.12-0ubuntu4

Anything else?

No response

pkishino commented 1 year ago

This is provider related, wrong repo.. and has been fixed. Please see the provider report

pkishino commented 1 year ago

167