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

Sudden error after update: initial DNS resolution test failed #2410

Closed
8 tasks done
tchit opened this issue Nov 15, 2022 · 49 comments
Closed
8 tasks done

Sudden error after update: initial DNS resolution test failed #2410

tchit opened this issue Nov 15, 2022 · 49 comments
Assignees
Labels
inactivity Used by Stale bot to mark issues that will be closed

Comments

@tchit
Copy link

tchit commented Nov 15, 2022

Is there a pinned issue for this?

  • I have read the pinned issues and could not find my issue

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

  • I have searched the existing issues
  • I have searched the existing discussions

Is there any comment in the documentation for this?

  • I have read the documentation, especially the FAQ and Troubleshooting parts

Is this related to a provider?

  • I have checked the provider repo for issues
  • My issue is NOT related to a provider

Are you using the latest release?

  • I am using the latest release

Have you tried using the dev branch latest?

  • I have tried using dev branch

Docker run config used

"env_variables" : [
{
"key" : "PATH",
"value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
},
{
"key" : "OPENVPN_USERNAME",
"value" : "xxxxxxxxxxxx"
},
{
"key" : "OPENVPN_PASSWORD",
"value" : "xxxxxxxxxxxxxx"
},
{
"key" : "OPENVPN_PROVIDER",
"value" : "NORDVPN"
},
{
"key" : "GLOBAL_APPLY_PERMISSIONS",
"value" : "true"
},
{
"key" : "TRANSMISSION_HOME",
"value" : "/config/transmission-home"
},
{
"key" : "TRANSMISSION_RPC_PORT",
"value" : "9091"
},
{
"key" : "TRANSMISSION_RPC_USERNAME",
"value" : "xxxx"
},
{
"key" : "TRANSMISSION_RPC_PASSWORD",
"value" : "xxxxx"
},
{
"key" : "TRANSMISSION_DOWNLOAD_DIR",
"value" : "/data/completed"
},
{
"key" : "TRANSMISSION_INCOMPLETE_DIR",
"value" : "/data/incomplete"
},
{
"key" : "TRANSMISSION_WATCH_DIR",
"value" : "/data/watch"
},
{
"key" : "CREATE_TUN_DEVICE",
"value" : "true"
},
{
"key" : "ENABLE_UFW",
"value" : "false"
},
{
"key" : "UFW_ALLOW_GW_NET",
"value" : "false"
},
{
"key" : "UFW_DISABLE_IPTABLES_REJECT",
"value" : "false"
},
{
"key" : "PEER_DNS",
"value" : "true"
},
{
"key" : "PEER_DNS_PIN_ROUTES",
"value" : "true"
},
{
"key" : "WEBPROXY_ENABLED",
"value" : "false"
},
{
"key" : "WEBPROXY_PORT",
"value" : "8888"
},
{
"key" : "LOG_TO_STDOUT",
"value" : "false"
},
{
"key" : "HEALTH_CHECK_HOST",
"value" : "google.com"
},
{
"key" : "SELFHEAL",
"value" : "false"
},
{
"key" : "REVISION",
"value" : "de6ec44c4a92311ae0c5ddf72f42bda58cfde20b"
},
{
"key" : "TRANSMISSION_WEB_UI",
"value" : "transmission-web-control"
},
{
"key" : "NORDVPN_PROTOCOL",
"value" : "TCP"
},
{
"key" : "NORDVPN_COUNTRY",
"value" : "DE"
},
{
"key" : "NORDVPN_CATEGORY",
"value" : "P2P"
},
{
"key" : "TRANSMISSION_RPC_AUTHENTICATION_REQUIRED",
"value" : "true"
}
],
"exporting" : false,
"id" : "983339de25d62c75bb11f9ae2591b947ac5f96c12c7f6e4bca7c9cd099270c7c",
"image" : "haugene/transmission-openvpn:latest",
"is_ddsm" : false,
"is_package" : false,
"links" : [],
"memory_limit" : 0,
"name" : "haugene-transmission-openvpn2-copy",
"network" : [
{
"driver" : "bridge",
"name" : "bridge"
}
],
"network_mode" : "bridge",
"port_bindings" : [
{
"container_port" : 8888,
"host_port" : 32770,
"type" : "tcp"
},
{
"container_port" : 9091,
"host_port" : 32771,
"type" : "tcp"
}
],
"privileged" : false,
"shortcut" : {
"enable_shortcut" : false,
"enable_status_page" : false,
"enable_web_page" : false,
"web_page_url" : ""
},
"use_host_network" : false,
"volume_bindings" : [
{
"host_absolute_path" : "45e563424b4ea969f25932686cb930fffc58d64a57983a8756e31fb42ea174c9",
"mount_point" : "/config",
"type" : "rw"
},
{
"host_absolute_path" : "247afe71284bcaabcce112cc7f0ca6dcf79cd5ee34745e81efeaff348cb6cf53",
"mount_point" : "/data",
"type" : "rw"
},
{
"host_volume_file" : "/video/complete",
"mount_point" : "/data/completed/PROWLARR",
"type" : "rw"
},
{
"host_volume_file" : "/video/complete/PROWLARR",
"mount_point" : "/data/completed",
"type" : "rw"
},
{
"host_volume_file" : "/docker/transmission-openvpn/resolv.conf",
"mount_point" : "/etc/resolv.conf",
"type" : "ro"
},
{
"host_volume_file" : "/video/complete/series",
"mount_point" : "/data/completed2",
"type" : "rw"
}
]
}

Current Behavior

Since latest update, I am getting this error on my Synology :

Starting container with revision: de6ec44 | stdout
WARNING: initial DNS resolution test failed
Creating TUN device /dev/net/tun
Using OpenVPN provider: NORDVPN
Running with VPN_CONFIG_SOURCE auto
Provider NORDVPN has a bundled setup script. Defaulting to internal config
Executing setup script for NORDVPN
INFO: OVPN: Checking curl installation
dig: parse of /etc/resolv.conf failed

Expected Behavior

Return back to normal (it had been working flawlessly for years)

How have you tried to solve the problem?

Tried updating and applying
OVERRIDE_DNS_1=8.8.8.8
OVERRIDE_DNS_2=8.8.4.4
but it says the conf file is read only...

Log output

Starting container with revision: de6ec44 | stdout
WARNING: initial DNS resolution test failed
Creating TUN device /dev/net/tun
Using OpenVPN provider: NORDVPN
Running with VPN_CONFIG_SOURCE auto
Provider NORDVPN has a bundled setup script. Defaulting to internal config
Executing setup script for NORDVPN
INFO: OVPN: Checking curl installation
dig: parse of /etc/resolv.conf failed

HW/SW Environment

- OS: DSM 7.1-42661 Update 4
- Docker: 20.10.3-1308

Anything else?

No response

@nwmcsween
Copy link

nwmcsween commented Nov 16, 2022

I'm hitting this as well with a fresh install running the latest docker image, it seems to be stable until traffic goes through it according to the logs.

@nwmcsween
Copy link

@tchit What version worked previously?

@haugene
Copy link
Owner

haugene commented Nov 16, 2022

Just to be clear. When you say "error after update" you mean an update of your Synology, right?
Because the version of the image you're running is two years old. So this is probably on the Synology side.

We've had a slight issue with NordVPN in the newest release as well (but completely unrelated to this) that should be fixed now on the edge tag. Can you change from using the latest tag to edge and print your logs then?

Anyways it seems like the error message is saying that it can't parse the /etc/resolv.conf file that you have mounted. Have you checked the contents of that file to see that it looks good?

@tchit
Copy link
Author

tchit commented Nov 16, 2022 via email

@nwmcsween
Copy link

Tested with edge, getting: SIGTERM[soft,exit-with-notification] received, process exiting then it boot loops with WARNING: initial DNS resolution test failed

@haugene
Copy link
Owner

haugene commented Nov 16, 2022

@tchit I find it a bit unlikely that the logs of the container has got the wrong version number. These are long and unique shas and the one output in in your image is two years old. I wont say it's impossible that there's an error with the build but would like you to do some more testing before we go down that route. Can you try just dropping the volume mount for resolv.conf for now, and change the image from using the :latest tag to :edge? Then paste the logs here.

@nwmcsween No idea what's going on for your setup. Can you share the docker-compose you're using, and some logs please? What version of the image are you running, with which provider?

@WLines84
Copy link

Also got the same issue after upgrading to latest version a few minutes ago:

DNS resolution failed
and the container is on a loop
anywhere i can more logs to help?

@haugene
Copy link
Owner

haugene commented Nov 16, 2022

@WLines84 I need the same from you. Your container config/setup (docker run, docker compose, portainer, watchtower, ...) and logs. Where you find logs depends on how you run your container.

@timshannon
Copy link

I recently updated my docker-compose where I had the image set to :latest. I have some pre scripts that run that couldn't connect to what they need to, which prevented transmission from starting. Not sure if it's exactly the same issue as this, but and I can dive into it more later, but rolling back to image: haugene/transmission-openvpn:4.0 in my docker-compose file resolved the issue for me.

@WLines84
Copy link

im running it on docker-compose

###################Transmission
transmission-vpn:
container_name: transmission-vpn
image: haugene/transmission-openvpn:latest
cap_add:
- NET_ADMIN

devices:

- /dev/net/tun

restart: always
ports:
- "9091:9091"
dns:
- "1.1.1.1"

- 1.0.0.1

volumes:
  - /home/user/transmission-vpn/data:/data
  - /home/user/transmission-vpn/config:/config
  - $DATADIR/downloads:/data/downloads
  - $DATADIR/incomplete:/data/incomplete
  - $DATADIR/completed:/data/completed
networks:
  t2_proxy:

ipv4_address: 172.19.0.8

    ipv4_address: 172.19.0.40
environment:
  - OPENVPN_PROVIDER=NORDVPN
  - OPENVPN_USERNAME=$OPENVPN_USERNAME
  - OPENVPN_PASSWORD=$OPENVPN_PASSWORD
  - NORDVPN_COUNTRY=GB
  - NORDVPN_CATEGORY=legacy_p2p
  - NORDVPN_PROTOCOL=tcp
 # - OPENVPN_OPTS=--inactive 3600 --ping 10 --ping-exit 60
  - LOCAL_NETWORK=172.19.0.0/16
  - TRANSMISSION_RPC_AUTHENTICATION_REQUIRED=true
  - TRANSMISSION_RPC_HOST_WHITELIST="127.0.0.1,172.19.*.*"
  - TRANSMISSION_RPC_PASSWORD=
  - TRANSMISSION_RPC_USERNAME=admin
  - TRANSMISSION_UMASK=002
  - TRANSMISSION_RATIO_LIMIT=1
  - TRANSMISSION_RATIO_LIMIT_ENABLED=true
  - TRANSMISSION_IDLE_SEEDING_LIMIT=11520
  - TRANSMISSION_IDLE_SEEDING_LIMIT_ENABLED=true

logs:

11/16/2022 3:44:28 PM
Starting container with revision: bf4c4e8
11/16/2022 3:44:28 PM
Creating TUN device /dev/net/tun
11/16/2022 3:44:28 PM
INFO: OVPN: Checking curl installation
11/16/2022 3:44:28 PM
Using OpenVPN provider: NORDVPN
11/16/2022 3:44:28 PM
Running with VPN_CONFIG_SOURCE auto
11/16/2022 3:44:28 PM
Provider NORDVPN has a bundled setup script. Defaulting to internal config
11/16/2022 3:44:28 PM
Executing setup script for NORDVPN
11/16/2022 3:44:28 PM
INFO: OVPN: DNS resolution ok
11/16/2022 3:44:29 PM
INFO: OVPN: ok, configurations download site reachable
11/16/2022 3:44:29 PM
INFO: OVPN: Removing existing configs in /etc/openvpn/nordvpn
11/16/2022 3:44:31 PM
Checking NORDPVN API responses
11/16/2022 3:44:31 PM
INFO: OVPN:Selecting the best server...
11/16/2022 3:44:31 PM
INFO: OVPN: Searching for country : GB (227)
11/16/2022 3:44:31 PM
INFO: OVPN: Searching for group: legacy_p2p
11/16/2022 3:44:31 PM
INFO: OVPN:Searching for technology: openvpn_tcp
11/16/2022 3:44:35 PM
INFO: OVPN: Best server : uk1887.nordvpn.com, load: 10
11/16/2022 3:44:35 PM
INFO: OVPN: Downloading config: uk1887.nordvpn.com.ovpn
11/16/2022 3:44:35 PM
INFO: OVPN: Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_tcp/servers/uk1887.nordvpn.com.tcp.ovpn
11/16/2022 3:44:35 PM
Starting OpenVPN using config uk1887.nordvpn.com.ovpn
11/16/2022 3:44:35 PM
Modifying /etc/openvpn/nordvpn/uk1887.nordvpn.com.ovpn for best behaviour in this container
11/16/2022 3:44:35 PM
Modification: Point auth-user-pass option to the username/password file
11/16/2022 3:44:35 PM
Modification: Change ca certificate path
11/16/2022 3:44:35 PM
Modification: Change ping options
11/16/2022 3:44:35 PM
Modification: Update/set resolv-retry to 15 seconds
11/16/2022 3:44:35 PM
Modification: Change tls-crypt keyfile path
11/16/2022 3:44:35 PM
Modification: Set output verbosity to 3
11/16/2022 3:44:35 PM
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
11/16/2022 3:44:35 PM
Modification: Updating status for config failure detection
11/16/2022 3:44:35 PM
Setting OpenVPN credentials...
11/16/2022 3:44:35 PM
adding route to local network 172.19.0.0/16 via 172.19.0.1 dev eth0
11/16/2022 3:44:35 PM
Wed Nov 16 15:44:35 2022 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Mar 22 2022
11/16/2022 3:44:35 PM
Wed Nov 16 15:44:35 2022 library versions: OpenSSL 1.1.1f 31 Mar 2020, LZO 2.10
11/16/2022 3:44:35 PM
Wed Nov 16 15:44:35 2022 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
11/16/2022 3:44:35 PM
Wed Nov 16 15:44:35 2022 NOTE: --fast-io is disabled since we are not using UDP
11/16/2022 3:44:35 PM
Wed Nov 16 15:44:35 2022 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
11/16/2022 3:44:35 PM
Wed Nov 16 15:44:35 2022 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
11/16/2022 3:44:35 PM
Wed Nov 16 15:44:35 2022 TCP/UDP: Preserving recently used remote address: [AF_INET]81.92.203.121:443
11/16/2022 3:44:35 PM
Wed Nov 16 15:44:35 2022 Socket Buffers: R=[131072->131072] S=[16384->16384]
11/16/2022 3:44:35 PM
Wed Nov 16 15:44:35 2022 Attempting to establish TCP connection with [AF_INET]81.92.203.121:443 [nonblock]
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 TCP connection established with [AF_INET]81.92.203.121:443
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 TCP_CLIENT link local: (not bound)
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 TCP_CLIENT link remote: [AF_INET]81.92.203.121:443
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 TLS: Initial packet from [AF_INET]81.92.203.121:443, sid=2db6f692 b150b955
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 VERIFY OK: depth=2, C=PA, O=NordVPN, CN=NordVPN Root CA
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 VERIFY OK: depth=1, C=PA, O=NordVPN, CN=NordVPN CA7
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 VERIFY KU OK
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 Validating certificate extended key usage
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 VERIFY EKU OK
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 VERIFY X509NAME OK: CN=uk1887.nordvpn.com
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 VERIFY OK: depth=0, CN=uk1887.nordvpn.com
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, 4096 bit RSA
11/16/2022 3:44:36 PM
Wed Nov 16 15:44:36 2022 [uk1887.nordvpn.com] Peer Connection Initiated with [AF_INET]81.92.203.121:443
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 SENT CONTROL [uk1887.nordvpn.com]: 'PUSH_REQUEST' (status=1)
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 103.86.96.100,dhcp-option DNS 103.86.99.100,sndbuf 524288,rcvbuf 524288,explicit-exit-notify,comp-lzo no,route-gateway 10.7.0.1,topology subnet,ping 60,ping-restart 180,ifconfig 10.7.0.7 255.255.255.0,peer-id 0,cipher AES-256-GCM'
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 OPTIONS IMPORT: timers and/or timeouts modified
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 OPTIONS IMPORT: --explicit-exit-notify can only be used with --proto udp
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 OPTIONS IMPORT: compression parms modified
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 Socket Buffers: R=[131072->425984] S=[46080->425984]
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 OPTIONS IMPORT: --ifconfig/up options modified
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 OPTIONS IMPORT: route options modified
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 OPTIONS IMPORT: route-related options modified
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 OPTIONS IMPORT: peer-id set
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 OPTIONS IMPORT: adjusting link_mtu to 1659
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 OPTIONS IMPORT: data channel crypto options modified
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 Data Channel: using negotiated cipher 'AES-256-GCM'
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 ROUTE_GATEWAY 172.19.0.1/255.255.0.0 IFACE=eth0 HWADDR=02:42:ac:13:00:28
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 TUN/TAP device tun0 opened
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 TUN/TAP TX queue length set to 100
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 /sbin/ip link set dev tun0 up mtu 1500
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 /sbin/ip addr add dev tun0 10.7.0.7/24 broadcast 10.7.0.255
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 /sbin/ip route add 81.92.203.121/32 via 172.19.0.1
11/16/2022 3:44:37 PM
Error: Nexthop has invalid gateway.
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 ERROR: Linux route add command failed: external program exited with error status: 2
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 /sbin/ip route add 0.0.0.0/1 via 10.7.0.1
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 /sbin/ip route add 128.0.0.0/1 via 10.7.0.1
11/16/2022 3:44:37 PM
Up script executed with device=tun0 ifconfig_local=10.7.0.7
11/16/2022 3:44:37 PM
Updating TRANSMISSION_BIND_ADDRESS_IPV4 to the ip of tun0 : 10.7.0.7
11/16/2022 3:44:37 PM
11/16/2022 3:44:37 PM

11/16/2022 3:44:37 PM
Transmission will run as
11/16/2022 3:44:37 PM

11/16/2022 3:44:37 PM
User name: root
11/16/2022 3:44:37 PM
User uid: 0
11/16/2022 3:44:37 PM
User gid: 0
11/16/2022 3:44:37 PM

11/16/2022 3:44:37 PM
11/16/2022 3:44:37 PM
Updating Transmission settings.json with values from env variables
11/16/2022 3:44:37 PM
Attempting to use existing settings.json for Transmission
11/16/2022 3:44:37 PM
Successfully used existing settings.json /config/transmission-home/settings.json
11/16/2022 3:44:37 PM
Overriding bind-address-ipv4 because TRANSMISSION_BIND_ADDRESS_IPV4 is set to 10.7.0.7
11/16/2022 3:44:37 PM
Overriding download-dir because TRANSMISSION_DOWNLOAD_DIR is set to /data/completed
11/16/2022 3:44:37 PM
Overriding idle-seeding-limit because TRANSMISSION_IDLE_SEEDING_LIMIT is set to 11520
11/16/2022 3:44:37 PM
Overriding idle-seeding-limit-enabled because TRANSMISSION_IDLE_SEEDING_LIMIT_ENABLED is set to true
11/16/2022 3:44:37 PM
Overriding incomplete-dir because TRANSMISSION_INCOMPLETE_DIR is set to /data/incomplete
11/16/2022 3:44:37 PM
Overriding ratio-limit because TRANSMISSION_RATIO_LIMIT is set to 1
11/16/2022 3:44:37 PM
Overriding ratio-limit-enabled because TRANSMISSION_RATIO_LIMIT_ENABLED is set to true
11/16/2022 3:44:37 PM
Overriding rpc-authentication-required because TRANSMISSION_RPC_AUTHENTICATION_REQUIRED is set to true
11/16/2022 3:44:37 PM
Overriding rpc-host-whitelist because TRANSMISSION_RPC_HOST_WHITELIST is set to 127.0.0.1,172.19..
11/16/2022 3:44:37 PM
Overriding rpc-password because TRANSMISSION_RPC_PASSWORD is set to [REDACTED]
11/16/2022 3:44:37 PM
Overriding rpc-port because TRANSMISSION_RPC_PORT is set to 9091
11/16/2022 3:44:37 PM
Overriding rpc-username because TRANSMISSION_RPC_USERNAME is set to admin
11/16/2022 3:44:37 PM
Overriding umask because TRANSMISSION_UMASK is set to 002
11/16/2022 3:44:37 PM
Overriding watch-dir because TRANSMISSION_WATCH_DIR is set to /data/watch
11/16/2022 3:44:37 PM
sed'ing True to true
11/16/2022 3:44:37 PM
STARTING TRANSMISSION
11/16/2022 3:44:37 PM
Transmission startup script complete.
11/16/2022 3:44:37 PM
Wed Nov 16 15:44:37 2022 Initialization Sequence Completed

docker inspect:
sudo docker inspect 0950e12e75bc
[
{
"Id": "0950e12e75bc133e63c1a3bf117e21439c45cd65e3cccdfe86bcc661e2ba192e",
"Created": "2022-11-16T12:30:06.707382662Z",
"Path": "dumb-init",
"Args": [
"/etc/openvpn/start.sh"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 22331,
"ExitCode": 0,
"Error": "",
"StartedAt": "2022-11-16T15:44:28.066572131Z",
"FinishedAt": "2022-11-16T15:44:26.965926738Z",
"Health": {
"Status": "starting",
"FailingStreak": 2,
"Log": [
{
"Start": "2022-11-16T15:39:53.367102423Z",
"End": "2022-11-16T15:40:11.490728088Z",
"ExitCode": 1,
"Output": "DNS resolution failed\n"
},
{
"Start": "2022-11-16T15:41:48.63820784Z",
"End": "2022-11-16T15:42:06.749570134Z",
"ExitCode": 1,
"Output": "DNS resolution failed\n"
},
{
"Start": "2022-11-16T15:43:06.774247169Z",
"End": "2022-11-16T15:43:24.90735369Z",
"ExitCode": 1,
"Output": "DNS resolution failed\n"
},
{
"Start": "2022-11-16T15:45:28.067337727Z",
"End": "2022-11-16T15:45:46.199603942Z",
"ExitCode": 1,
"Output": "DNS resolution failed\n"
},
{
"Start": "2022-11-16T15:46:46.221592662Z",
"End": "2022-11-16T15:47:04.377836217Z",
"ExitCode": 1,
"Output": "DNS resolution failed\n"
}
]
}
},
"Image": "sha256:c4b1f77956964091cf01b21aaee0903edcef5ece32669f02cb739d95b5858914",

@pkishino
Copy link
Collaborator

@WLines84 your issue is this : #2399

@tchit
Copy link
Author

tchit commented Nov 17, 2022

@tchit I find it a bit unlikely that the logs of the container has got the wrong version number. These are long and unique shas and the one output in in your image is two years old. I wont say it's impossible that there's an error with the build but would like you to do some more testing before we go down that route. Can you try just dropping the volume mount for resolv.conf for now, and change the image from using the :latest tag to :edge? Then paste the logs here.

Ok, so I'd like first to apologize because I am really a noob.
Now, by using Portainer I created a duplicate that I tagged as :edge and I removed the volume mount for resolv. conf (I didnt even know this was possible to do without breaking stuff...)
Surprise, it works!

Here is my log file with better formatting this time :

INFO: OVPN: DNS resolution ok
INFO: OVPN: ok, configurations download site reachable
INFO: OVPN: Removing existing configs in /etc/openvpn/nordvpn
Checking NORDPVN API responses
INFO: OVPN:Selecting the best server...
INFO: OVPN: Searching for country : DE (81)
INFO: OVPN: Searching for group: legacy_p2p
INFO: OVPN:Searching for technology: openvpn_tcp
INFO: OVPN: Best server : de1033.nordvpn.com, load: 6
INFO: OVPN: Downloading config: de1033.nordvpn.com.ovpn
INFO: OVPN: Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_tcp/servers/de1033.nordvpn.com.tcp.ovpn
Starting OpenVPN using config de1033.nordvpn.com.ovpn
Modifying /etc/openvpn/nordvpn/de1033.nordvpn.com.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
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
Setting OpenVPN credentials...
2022-11-17 13:00:44 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM). Future OpenVPN version will ignore --cipher for cipher negotiations. Add 'AES-256-CBC' to --data-ciphers or change --cipher 'AES-256-CBC' to --data-ciphers-fallback 'AES-256-CBC' to silence this warning.
2022-11-17 13:00:44 OpenVPN 2.5.5 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jul 14 2022
2022-11-17 13:00:44 library versions: OpenSSL 3.0.2 15 Mar 2022, LZO 2.10
2022-11-17 13:00:44 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2022-11-17 13:00:44 NOTE: --fast-io is disabled since we are not using UDP
2022-11-17 13:00:44 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
2022-11-17 13:00:44 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
2022-11-17 13:00:44 TCP/UDP: Preserving recently used remote address: [AF_INET]185.196.22.7:443
2022-11-17 13:00:44 Socket Buffers: R=[87380->87380] S=[16384->16384]
2022-11-17 13:00:44 Attempting to establish TCP connection with [AF_INET]185.196.22.7:443 [nonblock]
2022-11-17 13:00:44 TCP connection established with [AF_INET]185.196.22.7:443
2022-11-17 13:00:44 TCP_CLIENT link local: (not bound)
2022-11-17 13:00:44 TCP_CLIENT link remote: [AF_INET]185.196.22.7:443
2022-11-17 13:00:44 TLS: Initial packet from [AF_INET]185.196.22.7:443, sid=76ab07e9 2350c292
2022-11-17 13:00:44 VERIFY OK: depth=2, C=PA, O=NordVPN, CN=NordVPN Root CA
2022-11-17 13:00:44 VERIFY OK: depth=1, C=PA, O=NordVPN, CN=NordVPN CA7
2022-11-17 13:00:44 VERIFY KU OK
2022-11-17 13:00:44 Validating certificate extended key usage
2022-11-17 13:00:44 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2022-11-17 13:00:44 VERIFY EKU OK
2022-11-17 13:00:44 VERIFY X509NAME OK: CN=de1033.nordvpn.com
2022-11-17 13:00:44 VERIFY OK: depth=0, CN=de1033.nordvpn.com
2022-11-17 13:00:44 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, peer certificate: 4096 bit RSA, signature: RSA-SHA512
2022-11-17 13:00:44 [de1033.nordvpn.com] Peer Connection Initiated with [AF_INET]185.196.22.7:443
2022-11-17 13:00:44 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 103.86.96.100,dhcp-option DNS 103.86.99.100,sndbuf 524288,rcvbuf 524288,explicit-exit-notify,comp-lzo no,route-gateway 10.7.1.1,topology subnet,ping 60,ping-restart 180,ifconfig 10.7.1.4 255.255.255.0,peer-id 0,cipher AES-256-GCM'
2022-11-17 13:00:44 OPTIONS IMPORT: timers and/or timeouts modified
2022-11-17 13:00:44 OPTIONS IMPORT: --explicit-exit-notify can only be used with --proto udp
2022-11-17 13:00:44 OPTIONS IMPORT: compression parms modified
2022-11-17 13:00:44 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified
2022-11-17 13:00:44 Socket Buffers: R=[357120->425984] S=[46080->425984]
2022-11-17 13:00:44 OPTIONS IMPORT: --ifconfig/up options modified
2022-11-17 13:00:44 OPTIONS IMPORT: route options modified
2022-11-17 13:00:44 OPTIONS IMPORT: route-related options modified
2022-11-17 13:00:44 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2022-11-17 13:00:44 OPTIONS IMPORT: peer-id set
2022-11-17 13:00:44 OPTIONS IMPORT: adjusting link_mtu to 1659
2022-11-17 13:00:44 OPTIONS IMPORT: data channel crypto options modified
2022-11-17 13:00:44 Data Channel: using negotiated cipher 'AES-256-GCM'
2022-11-17 13:00:44 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2022-11-17 13:00:44 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2022-11-17 13:00:44 net_route_v4_best_gw query: dst 0.0.0.0
2022-11-17 13:00:44 net_route_v4_best_gw result: via 172.17.0.1 dev eth0
2022-11-17 13:00:44 ROUTE_GATEWAY 172.17.0.1/255.255.0.0 IFACE=eth0 HWADDR=02:42:ac:11:00:06
2022-11-17 13:00:44 TUN/TAP device tun0 opened
2022-11-17 13:00:44 net_iface_mtu_set: mtu 1500 for tun0
2022-11-17 13:00:44 net_iface_up: set tun0 up
2022-11-17 13:00:44 net_addr_v4_add: 10.7.1.4/24 dev tun0
2022-11-17 13:00:44 net_route_v4_add: 185.196.22.7/32 via 172.17.0.1 dev [NULL] table 0 metric -1
2022-11-17 13:00:44 net_route_v4_add: 0.0.0.0/1 via 10.7.1.1 dev [NULL] table 0 metric -1
2022-11-17 13:00:44 net_route_v4_add: 128.0.0.0/1 via 10.7.1.1 dev [NULL] table 0 metric -1
Up script executed with device=tun0 ifconfig_local=10.7.1.4
Updating TRANSMISSION_BIND_ADDRESS_IPV4 to the ip of tun0 : 10.7.1.4
Using Transmission Web Control UI, overriding TRANSMISSION_WEB_HOME

-------------------------------------
Transmission will run as
-------------------------------------
User name:   root
User uid:    0
User gid:    0
-------------------------------------

Updating Transmission settings.json with values from env variables
Attempting to use existing settings.json for Transmission
Could not read existing settings.json. Generating settings.json for Transmission from environment and defaults /etc/transmission/default-settings.json
Overriding bind-address-ipv4 because TRANSMISSION_BIND_ADDRESS_IPV4 is set to 10.7.1.4
Overriding download-dir because TRANSMISSION_DOWNLOAD_DIR is set to /data/completed
Overriding incomplete-dir because TRANSMISSION_INCOMPLETE_DIR is set to /data/incomplete
Overriding rpc-authentication-required because TRANSMISSION_RPC_AUTHENTICATION_REQUIRED is set to true
Overriding rpc-password because TRANSMISSION_RPC_PASSWORD is set to [REDACTED]
Overriding rpc-port because TRANSMISSION_RPC_PORT is set to 9091
Overriding rpc-username because TRANSMISSION_RPC_USERNAME is set to XXXX
Overriding watch-dir because TRANSMISSION_WATCH_DIR is set to /data/watch
sed'ing True to true
STARTING TRANSMISSION
Transmission startup script complete.
2022-11-17 13:00:44 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2022-11-17 13:00:44 Initialization Sequence Completed


I don't know how to check the version I am using?

Thanks a lot

@tchit
Copy link
Author

tchit commented Nov 17, 2022

Edit: it says revision b33d0fe4c938259a0d4eb844e55468f387456121

@haugene
Copy link
Owner

haugene commented Nov 17, 2022

Glad to hear you got it working 👍
And the b33d... commit is a new one so you're up to date :)

@haugene
Copy link
Owner

haugene commented Nov 17, 2022

Was hoping to dig a bit more into this today, but wasn't able to. But! Had a chat with a friend who's experiencing the same issue and he pointed to: https://askubuntu.com/questions/1405417/20-04-vs-22-04-inside-docker-with-a-16-04-host-thread-start-failures

We compared host OS and Docker versions and were both on Ubuntu 20.04 hosts, but Docker versions diverged. He was on 20.10.2 and I was at 20.10.21. He upgraded Docker and now reports that it works 🎉

Can you try to upgrade your Docker installs, and report if that works. Or if it doesn't - what OS and Docker version are you running?

Or... If upgrading docker is not feasible (part of NAS packages etc) you can try the seccomp option in the link. Adding --security-opt seccomp=unconfined to your docker run ... command or this to your docker-compose:

security_opt:
  - seccomp:unconfined

@glassbase
Copy link

Latest update broke mine too. I am on Unraid and cannot update the docker service. Using --security-opt seccomp=unconfined worked for me.

@peanutlasko
Copy link

peanutlasko commented Nov 18, 2022

FYI @haugene I typically keep my Docker up-to-date, but there is a nasty bug in Mac version of Docker (see here, so I've stayed back on previous versions for now.

Even with the -security_opt it still causes docker for mac to become unstabe for me and reverting to 4.1 fixes the issue.

If you look at the bug reported in my link, this all goes back to something to do with VPNKIT.

@KingIzzymon
Copy link

KingIzzymon commented Nov 18, 2022

@haugene

Hey boss, I hope this helps. My log from today using your docker-compose setup from docker hub with docker, docker-compose and transmission-openvpn all being fully up to date as of this posting (also its Docker on Windows v20.10.5):

Starting container with revision: b33d0fe4c938259a0d4eb844e55468f387456121
One or more OVERRIDE_DNS addresses found. Will use them to overwrite /etc/resolv.conf
/etc/openvpn/start.sh: line 34:    15 Aborted                 nslookup ${HEALTH_CHECK_HOST:-"google.com"} > /dev/null 2>&1
WARNING: initial DNS resolution test failed
Creating TUN device /dev/net/tun
Using OpenVPN provider: EXPRESSVPN
Running with VPN_CONFIG_SOURCE auto
No bundled config script found for EXPRESSVPN. Defaulting to external config
Downloading configs from https://github.com/haugene/vpn-configs-contrib/archive/main.zip into /tmp/tmp.RWE5pQNXUv
curl: (6) getaddrinfo() thread failed to start
./etc/openvpn/fetch-external-configs.sh: line 18: config_repo_temp_dir: unbound variable

@KingIzzymon
Copy link

I missed this part... Adding that to my docker-compose file did the trick! Thanks for the quick fix.

Or... If upgrading docker is not feasible (part of NAS packages etc) you can try the seccomp option in the link. Adding --security-opt seccomp=unconfined to your docker run ... command or this to your docker-compose:

security_opt:
  - seccomp:unconfined

@thegameksk
Copy link

thegameksk commented Nov 20, 2022

I have this too. Yesterday after updating it hit me. Running OMV but it broke the container. I cant make any change to my container without getting an error 400 message. Where do I add the security_opt?

@CurtC2
Copy link

CurtC2 commented Nov 20, 2022

Thank you haugene! In case it helps anyone - I had one long running Ubuntu system mysteriously stop working on or about Thursday this week:

transmission-vpn    | Starting container with revision: b33d0fe4c938259a0d4eb844e55468f387456121
transmission-vpn    | WARNING: initial DNS resolution test failed
transmission-vpn    | Creating TUN device /dev/net/tun
transmission-vpn    | /etc/openvpn/start.sh: line 34:    10 Aborted                 (core dumped) nslookup ${HEALTH_CHECK_HOST:-"google.com"} > /dev/null 2>&1
transmission-vpn    | Using OpenVPN provider: PIA
transmission-vpn    | Running with VPN_CONFIG_SOURCE auto
transmission-vpn    | Provider PIA has a bundled setup script. Defaulting to internal config
transmission-vpn    | Executing setup script for PIA
transmission-vpn    | Downloading OpenVPN config bundle openvpn into temporary file /tmp/tmp.RbIUPs3EnM
transmission-vpn    | curl: (6) getaddrinfo() thread failed to start

Saw your note here about a docker upgrade potentially fixing - and that appear to fix things (version references):

Get:1 https://download.docker.com/linux/ubuntu bionic/stable amd64 containerd.io amd64 1.6.10-1 [27.7 MB]
Get:2 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-ce-cli amd64 5:20.10.21~3-0~ubuntu-bionic [41.5 MB]
Get:3 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-ce amd64 5:20.10.21~3-0~ubuntu-bionic [20.5 MB]
Get:4 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-scan-plugin amd64 0.21.0~ubuntu-bionic [3,622 kB]
Fetched 93.3 MB in 4s (25.1 MB/s)             
(Reading database ... 113102 files and directories currently installed.)
Preparing to unpack .../containerd.io_1.6.10-1_amd64.deb ...
Unpacking containerd.io (1.6.10-1) over (1.4.11-1) ...
Preparing to unpack .../docker-ce-cli_5%3a20.10.21~3-0~ubuntu-bionic_amd64.deb ...
Unpacking docker-ce-cli (5:20.10.21~3-0~ubuntu-bionic) over (5:20.10.9~3-0~ubuntu-bio
nic) ...
Preparing to unpack .../docker-ce_5%3a20.10.21~3-0~ubuntu-bionic_amd64.deb ...
Unpacking docker-ce (5:20.10.21~3-0~ubuntu-bionic) over (5:20.10.9~3-0~ubuntu-bionic)
 ...
Preparing to unpack .../docker-scan-plugin_0.21.0~ubuntu-bionic_amd64.deb ...
Unpacking docker-scan-plugin (0.21.0~ubuntu-bionic) over (0.8.0~ubuntu-bionic) ...
Setting up containerd.io (1.6.10-1) ...
Installing new version of config file /etc/containerd/config.toml ...
Setting up dockeGet:1 https://download.docker.com/linux/ubuntu bionic/stable amd64 containerd.io amd64 1.6.10-1 [27.7 MB]
Get:2 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-ce-cli amd64 5:20.10.21~3-0~ubuntu-bionic [41.5 MB]
Get:3 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-ce amd64 5:20.10.21~3-0~ubuntu-bionic [20.5 MB]
Get:4 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-scan-plugin amd64 0.21.0~ubuntu-bionic [3,622 kB]
Fetched 93.3 MB in 4s (25.1 MB/s)             
(Reading database ... 113102 files and directories currently installed.)
Preparing to unpack .../containerd.io_1.6.10-1_amd64.deb ...
Unpacking containerd.io (1.6.10-1) over (1.4.11-1) ...
Preparing to unpack .../docker-ce-cli_5%3a20.10.21~3-0~ubuntu-bionic_amd64.deb ...
Unpacking docker-ce-cli (5:20.10.21~3-0~ubuntu-bionic) over (5:20.10.9~3-0~ubuntu-bio
nic) ...
Preparing to unpack .../docker-ce_5%3a20.10.21~3-0~ubuntu-bionic_amd64.deb ...
Unpacking docker-ce (5:20.10.21~3-0~ubuntu-bionic) over (5:20.10.9~3-0~ubuntu-bionic)
 ...
Preparing to unpack .../docker-scan-plugin_0.21.0~ubuntu-bionic_amd64.deb ...
Unpacking docker-scan-plugin (0.21.0~ubuntu-bionic) over (0.8.0~ubuntu-bionic) ...
Setting up containerd.io (1.6.10-1) ...
Installing new version of config file /etc/containerd/config.toml ...
Setting up docker-scan-plugin (0.21.0~ubuntu-bionic) ...
Setting up docker-ce-cli (5:20.10.21~3-0~ubuntu-bionic) ...
Setting up docker-ce (5:20.10.21~3-0~ubuntu-bionic) ...
Processing triggers for systemd (237-3ubuntu10.56) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
ureadahead will be reprofiled on next rebootr-scan-plugin (0.21.0~ubuntu-bionic) ...
Setting up docker-ce-cli (5:20.10.21~3-0~ubuntu-bionic) ...
Setting up docker-ce (5:20.10.21~3-0~ubuntu-bionic) ...
Processing triggers for systemd (237-3ubuntu10.56) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
ureadahead will be reprofiled on next reboot

@thegameksk
Copy link

FYI @haugene I typically keep my Docker up-to-date, but there is a nasty bug in Mac version of Docker (see here, so I've stayed back on previous versions for now.

Even with the -security_opt it still causes docker for mac to become unstabe for me and reverting to 4.1 fixes the issue.

If you look at the bug reported in my link, this all goes back to something to do with VPNKIT.

Hey. How would I go back to a previous working version?

@haugene
Copy link
Owner

haugene commented Nov 20, 2022 via email

@thegameksk
Copy link

Thank you. I reverted and its working. Ill just turn off my auto updater containers for now.

@matthewpetro
Copy link

Was hoping to dig a bit more into this today, but wasn't able to. But! Had a chat with a friend who's experiencing the same issue and he pointed to: https://askubuntu.com/questions/1405417/20-04-vs-22-04-inside-docker-with-a-16-04-host-thread-start-failures

We compared host OS and Docker versions and were both on Ubuntu 20.04 hosts, but Docker versions diverged. He was on 20.10.2 and I was at 20.10.21. He upgraded Docker and now reports that it works 🎉

Can you try to upgrade your Docker installs, and report if that works. Or if it doesn't - what OS and Docker version are you running?

Or... If upgrading docker is not feasible (part of NAS packages etc) you can try the seccomp option in the link. Adding --security-opt seccomp=unconfined to your docker run ... command or this to your docker-compose:

security_opt:
  - seccomp:unconfined

I was running into issues with the container starting when I updated to version 4.3. Upgrading my Docker version to 20.10.20 fixed my problem. Thank you!

@RoccoMathijn
Copy link

RoccoMathijn commented Nov 28, 2022

Thanks! Updating all packages on my Ubuntu server was long overdue anyway.

My errors looked like this:

Nov 22 08:27:55 dozer docker[31912]: No bundled config script found for PIA. Defaulting to external config
Nov 22 08:27:55 dozer docker[31912]: Downloading configs from https://github.com/haugene/vpn-configs-contrib/archive/main.zip into /tmp/tmp.sdXBj1BwMb
Nov 22 08:27:55 dozer docker[31912]: curl: (6) getaddrinfo() thread failed to start
Nov 22 08:27:55 dozer docker[31912]: ./etc/openvpn/fetch-external-configs.sh: line 18: config_repo_temp_dir: unbound variable
Nov 22 08:27:55 dozer systemd[1]: transmission-openvpn.service: Main process exited, code=exited, 

Curl command from within the container:

root@6cadc1dad89c:/# curl -v google.com
* getaddrinfo() thread failed to start
* Could not resolve host: google.com
* Closing connection 0
curl: (6) getaddrinfo() thread failed to start

@haugene
Copy link
Owner

haugene commented Dec 2, 2022

Judging by all of you who have tested both upgrading Docker and using the seccomp:unconfined if upgrading is not an option, it seems we've found a fix for the problem 🎉 It's not ideal, but the last time I downgraded Transmission in the image it caused a lot of headache for more users so I would rather not do it again.

So we'll stay on ubuntu:22.04 as the base image for now and I've made a note of it in the main README. As time passes more and more users should be on newer versions of Docker and this will hopefully blow over.

Closing this issue for now - but feel free to re-open or submit a new one if it re-appears or you find some other issue with the solution.

@haugene haugene closed this as completed Dec 2, 2022
@friedricho
Copy link

In case this helps anyone I am using Dockers on Windows and neither of these workarounds helped (reverting to older Transmission image or updating docker-compose file with seccomp:unconfined). I ended up rolling back Docker for Windows version 14.15 to version 14.12 to resolve.

@dcliff9
Copy link

dcliff9 commented Jan 20, 2023

Getting "DNS Resolution Failed". Came here and saw this thread. I have tried switching versions (4.0, 4.1, 4.2, 4.3, latest, dev). Added security_opt: - seccomp:unconfined to my docker-compose. Added DNS overrides. Made sure Docker is updated and even updated my OS. Still getting the same problem. Interestingly, if I use 4.0, I actually get a ping response from google but it still errors out with DNS Resolution Failed.

Ubuntu 20.04.5 LTS
Docker version 20.10.23, build 7155243

My current yml.

    transmission-openvpn:
    container_name: "transmission"
    cap_add:
      - NET_ADMIN
    restart: always
    volumes:
      - '/media/NASmedia/Torrents/:/data'
    environment:
      - OPENVPN_PROVIDER=PIA
      - OPENVPN_CONFIG=us_seattle,us_denver,us_west,ca_vancouver
      - OPENVPN_USERNAME=XXXXX
      - OPENVPN_PASSWORD=XXXX
      - LOCAL_NETWORK=192.168.2.0/24
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - TRANSMISSION_RPC_PASSWORD=XXXX
      - TRANSMISSION_RPC_USERNAME=XXXX
      - TRANSMISSION_RPC_AUTHENTICATION_REQUIRED=true
      - TRANSMISSION_RATIO_LIMIT=0.01
      - TRANSMISSION_SPEED_LIMIT_DOWN_ENABLED=true
      - OVERRIDE_DNS_1=8.8.8.8
      - OVERRIDE_DNS_2=8.8.4.4
    logging:
       driver: json-file
       options:
           max-size: 10m
    ports:
       - '9104:9091'
    image: haugene/transmission-openvpn:4.2
    security_opt:
       - seccomp:unconfined

Logs :

Starting container with revision: f9cb4dea2da1a3aa63bd3945e0162c9b8a9789a4
One or more OVERRIDE_DNS addresses found. Will use them to overwrite /etc/resolv.conf
Creating TUN device /dev/net/tun
Using OpenVPN provider: PIA
Running with VPN_CONFIG_SOURCE auto
Provider PIA has a bundled setup script. Defaulting to internal config
Executing setup script for PIA
Downloading OpenVPN config bundle openvpn into temporary file /tmp/tmp.ehCbcTINsA
Extract OpenVPN config bundle into PIA directory /etc/openvpn/pia
4 servers found in OPENVPN_CONFIG, us_denver chosen randomly
Starting OpenVPN using config us_denver.ovpn
Modifying /etc/openvpn/pia/us_denver.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
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
Setting OpenVPN credentials...
adding route to local network 192.168.2.0/24 via 172.22.0.1 dev eth0
Fri Jan 20 12:00:55 2023 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Mar 22 2022
Fri Jan 20 12:00:55 2023 library versions: OpenSSL 1.1.1f  31 Mar 2020, LZO 2.10
Fri Jan 20 12:00:55 2023 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Fri Jan 20 12:00:55 2023 TCP/UDP: Preserving recently used remote address: [AF_INET]181.41.206.78:1198
Fri Jan 20 12:00:55 2023 Socket Buffers: R=[212992->212992] S=[212992->212992]
Fri Jan 20 12:00:55 2023 UDP link local: (not bound)
Fri Jan 20 12:00:55 2023 UDP link remote: [AF_INET]181.41.206.78:1198
Fri Jan 20 12:00:55 2023 TLS: Initial packet from [AF_INET]181.41.206.78:1198, sid=620d0743 9815a2fd
Fri Jan 20 12:00:55 2023 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Fri Jan 20 12:00:55 2023 VERIFY OK: depth=1, C=US, ST=CA, L=LosAngeles, O=Private Internet Access, OU=Private Internet Access, CN=Private Internet Access, name=Private Internet Access, emailAddress=secure@privateinternetaccess.com
Fri Jan 20 12:00:55 2023 VERIFY KU OK
Fri Jan 20 12:00:55 2023 Validating certificate extended key usage
Fri Jan 20 12:00:56 2023 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Fri Jan 20 12:00:56 2023 VERIFY EKU OK
Fri Jan 20 12:00:56 2023 VERIFY OK: depth=0, C=US, ST=CA, L=LosAngeles, O=Private Internet Access, OU=Private Internet Access, CN=denver421, name=denver421
Fri Jan 20 12:00:56 2023 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, 2048 bit RSA
Fri Jan 20 12:00:56 2023 [denver421] Peer Connection Initiated with [AF_INET]181.41.206.78:1198
Fri Jan 20 12:00:57 2023 SENT CONTROL [denver421]: 'PUSH_REQUEST' (status=1)
Fri Jan 20 12:00:57 2023 PUSH: Received control message: 'PUSH_REPLY,comp-lzo no,redirect-gateway def1,route-ipv6 2000::/3,dhcp-option DNS 10.0.0.243,route-gateway 10.2.112.1,topology subnet,ping 10,ping-restart 60,ifconfig 10.2.112.211 255.255.255.0,peer-id 1,cipher AES-128-GCM'
Fri Jan 20 12:00:57 2023 OPTIONS IMPORT: timers and/or timeouts modified
Fri Jan 20 12:00:57 2023 OPTIONS IMPORT: compression parms modified
Fri Jan 20 12:00:57 2023 OPTIONS IMPORT: --ifconfig/up options modified
Fri Jan 20 12:00:57 2023 OPTIONS IMPORT: route options modified
Fri Jan 20 12:00:57 2023 OPTIONS IMPORT: route-related options modified
Fri Jan 20 12:00:57 2023 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Fri Jan 20 12:00:57 2023 OPTIONS IMPORT: peer-id set
Fri Jan 20 12:00:57 2023 OPTIONS IMPORT: adjusting link_mtu to 1625
Fri Jan 20 12:00:57 2023 OPTIONS IMPORT: data channel crypto options modified
Fri Jan 20 12:00:57 2023 Data Channel: using negotiated cipher 'AES-128-GCM'
Fri Jan 20 12:00:57 2023 Outgoing Data Channel: Cipher 'AES-128-GCM' initialized with 128 bit key
Fri Jan 20 12:00:57 2023 Incoming Data Channel: Cipher 'AES-128-GCM' initialized with 128 bit key
Fri Jan 20 12:00:57 2023 ROUTE_GATEWAY 172.22.0.1/255.255.0.0 IFACE=eth0 HWADDR=02:42:ac:16:00:0e
Fri Jan 20 12:00:57 2023 GDG6: remote_host_ipv6=n/a
Fri Jan 20 12:00:57 2023 ROUTE6: default_gateway=UNDEF
Fri Jan 20 12:00:57 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
Fri Jan 20 12:00:57 2023 OpenVPN ROUTE: failed to parse/resolve route for host/network: 2000::/3
Fri Jan 20 12:00:57 2023 TUN/TAP device tun0 opened
Fri Jan 20 12:00:57 2023 TUN/TAP TX queue length set to 100
Fri Jan 20 12:00:57 2023 /sbin/ip link set dev tun0 up mtu 1500
Fri Jan 20 12:00:57 2023 /sbin/ip addr add dev tun0 10.2.112.211/24 broadcast 10.2.112.255
Fri Jan 20 12:00:57 2023 /sbin/ip route add 181.41.206.78/32 via 172.22.0.1
Fri Jan 20 12:00:57 2023 /sbin/ip route add 0.0.0.0/1 via 10.2.112.1
Fri Jan 20 12:00:57 2023 /sbin/ip route add 128.0.0.0/1 via 10.2.112.1
Fri Jan 20 12:00:57 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.
Up script executed with device=tun0 ifconfig_local=10.2.112.211
Updating TRANSMISSION_BIND_ADDRESS_IPV4 to the ip of tun0 : 10.2.112.211
TRANSMISSION_HOME is currently set to: /config/transmission-home
WARNING: Deprecated. Found old default transmission-home folder at /data/transmission-home, setting this as TRANSMISSION_HOME. This might break in future versions.
We will fallback to this directory as long as the folder exists. Please consider moving it to /config/<transmission-home>
Enforcing ownership on transmission config directory
Applying permissions to transmission config directory
Setting owner for transmission paths to 1000:1001
Setting permissions for download and incomplete directories
�
2
Directories: 775
Files: 664

@pkishino
Copy link
Collaborator

@dcliff9 no dns problems per log can be seen

@dcliff9
Copy link

dcliff9 commented Jan 21, 2023

@dcliff9 no dns problems per log can be seen

Thank you. Yes. That is correct. Nonetheless, I'm getting "DNS Resolution Failed" failures. The container gets marked as unhealthy after the 3rd failure. Pinging google.com from inside the container gives name resolution failures.

When using 4.0, I do get this output which seems contradictory.

DNS Resolution Failure Count 1 : PING google.com (142.250.69.206) 56(84) bytes of data. 64 bytes from sea30s08-in-f14.1e100.net (142.250.69.206): icmp_seq=1 ttl=57 time=14.7 ms 64 bytes from sea30s08-in-f14.1e100.net (142.250.69.206): icmp_seq=2 ttl=57 time=16.4 ms --- google.com ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 14.727/15.544/16.362/0.817 ms Network is up transmission-daemon process not running

@Nosh118
Copy link

Nosh118 commented Jan 25, 2023

On Mac with Docker v20.10.22 and having the exact same issues. seccomp nor manually overriding dns either in docker compose or docker run does nothing to fix it.

WARNING: initial DNS resolution test failed
and then some PIA setup
and then final line is
curl: (6) Could not resolve host: www.privateinternetaccess.com

Worth noting this worked for a little while when my Mac was using default ISP DNS and the whole docker application was running through the PIA desktop app. Since changing Mac DNS, now refuses to resolve on any Wi-Fi network even with the desktop VPN running.

Any advice much appreciated!

@Nosh118
Copy link

Nosh118 commented Jan 25, 2023

@haugene worth reopening maybe? None of the fixes have worked for me.

@noogai15
Copy link

Adding to @Nosh118 , I'm having the exact same issue

@SunnyM-ha
Copy link

SunnyM-ha commented Feb 14, 2023

I upgraded to Ubuntu 22.04 and have had this hanging issue ever since then, to the point that I've moved away from this image and using 2 separate VPN and qBittorrent images :(
I'm running Docker v23.0.1 btw

@haugene
Copy link
Owner

haugene commented Feb 14, 2023

If I have understood this correctly you're all facing this issue with versions of the image that are 4.3 and above, right? It works with the 3.7.1, 4.0, 4.1 and 4.2 tags? If the move to ubuntu:22.04 as base image in 4.3 is causing this much troubles then I guess we have to re-visit that choice. We had alpine as base image a couple of years ago but that wasn't always a joyride either...

Before then, I'm curious to see if a newer version of the ubuntu base image might fix something. It's a long shot but...
I've created a new branch for the 22.10 (kinetic) release. Anyone up for pulling the kinetic tag of the image and see if that works any better?

@haugene haugene reopened this Feb 14, 2023
@SunnyM-ha
Copy link

SunnyM-ha commented Feb 14, 2023

I've been using your latest image for months now (update every week or so) but only started to see the issue when I upgraded my home Linux server from Ubuntu 20.04 to 22.04 where Docker (v23.0.1) is running and hosting your image. I didn't try downgrading your image to an earlier one to test.

Let me try with the :kinetic tag now. All configured now and working, I'll do a test download of something to see how it behaves.

Edit: seems to be working (tho the settings pages are all blank so cant change anything? Maybe a Flood WEB_UI thing?) - will keep an eye on it for a few days and see if I get the hanging again

@haugene
Copy link
Owner

haugene commented Feb 15, 2023

In addition to the kinetic tag I now also tried rolling back to focal as the base image and installing Transmission via the ppa so that we still stay on Transmission 3.00. So you can also try using tag focal and see if that's better.

@jrodmonaco
Copy link

I tried both focal and kinetic with same results. It was working fine yesterday, guess got updated with watchtower.

Here is the loop log it gets stuck with:

Starting container with revision: b33d0fe
WARNING: initial DNS resolution test failed
Creating TUN device /dev/net/tun
Using OpenVPN provider: WINDSCRIBE
Running with VPN_CONFIG_SOURCE auto
No bundled config script found for WINDSCRIBE. Defaulting to external config
Downloading configs from https://github.com/haugene/vpn-configs-contrib/archive/main.zip into /tmp/tmp.o0rz35sLev
curl: (6) Could not resolve host: github.com
./etc/openvpn/fetch-external-configs.sh: line 18: config_repo_temp_dir: unbound variable

@haugene
Copy link
Owner

haugene commented Feb 16, 2023

The commit from your logs are not from kinetic or focal @jrodmonaco, but the logs are exactly the same when running with those tag?

EDIT: And what does your docker run/compose setup look like?

@SunnyM-ha
Copy link

On kinetic: still getting the hanging, web interface not responsive and even trying to stop/kill the container gives me a 500 error and its stuck again.
Will try focal now.

@SunnyM-ha
Copy link

Just an update, I upgraded my home linux server to ubuntu 22.10 (kinetic) and went back to using your :latest tag and everything seems fine now - so maybe an issue on my side with 22.04+docker interaction? (the docker version is the same - 23.0.1)

@Forage Forage mentioned this issue Mar 18, 2023
8 tasks
@robalees
Copy link

robalees commented May 9, 2023

Hey @haugene

Been running into this issue with OMV6 (6.3.10-2 (Shaitan) Linux 6.1.0-0.deb11.6-amd64) and I am using Docker 23.0.6 with the Kinetic image tag.

Here is my docker run

docker run --cap-add=NET_ADMIN -d \
              -v /home/macminiserver/:/data \
              -e OPENVPN_PROVIDER=PIA \
              -e OPENVPN_CONFIG=mexico \
              -e OPENVPN_USERNAME=NULL \
              -e OPENVPN_PASSWORD=NULL \
              -e LOCAL_NETWORK=10.0.1.0/24 \
              --log-driver json-file \
              --log-opt max-size=10m \
              -p 9091:9091 \
              haugene/transmission-openvpn:kinetic

And I am continuing to see

2023-05-09T21:20:12.791025577Z Creating TUN device /dev/net/tun
2023-05-09T21:20:12.803254620Z Using OpenVPN provider: PIA
2023-05-09T21:20:12.803562689Z Running with VPN_CONFIG_SOURCE auto
2023-05-09T21:20:12.803640872Z Provider PIA has a bundled setup script. Defaulting to internal config
2023-05-09T21:20:12.803742634Z Executing setup script for PIA
2023-05-09T21:20:12.809712204Z Downloading OpenVPN config bundle openvpn into temporary file /tmp/tmp.8gaQ44Y2mB
2023-05-09T21:20:24.528526387Z curl: (6) Could not resolve host: www.privateinternetaccess.com
2023-05-09T21:20:25.424827583Z Starting container with revision: 325cefc93bea6ae8edbaf8eb9dff5acbdaa31bec
2023-05-09T21:20:25.424879310Z TRANSMISSION_HOME is currently set to: /config/transmission-home
2023-05-09T21:20:40.482496242Z WARNING: initial DNS resolution test failed

Anything additional I can provide to help troubleshoot or do you have any suggestions for a workaround?

@edgd1er
Copy link
Contributor

edgd1er commented May 10, 2023

2023-05-09T21:20:24.528526387Z curl: (6) Could not resolve host: www.privateinternetaccess.com

https://haugene.github.io/docker-transmission-openvpn/faq/#error_resolving_host_address

@Zechositus
Copy link

Latest update broke mine too. I am on Unraid and cannot update the docker service. Using --security-opt seccomp=unconfined worked for me.

Where di dyou include this in unraid? I have yet to get this resolved. It constantly restarts. thank you for taking the time.

@stale
Copy link

stale bot commented Sep 17, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the inactivity Used by Stale bot to mark issues that will be closed label Sep 17, 2023
@stale
Copy link

stale bot commented Oct 15, 2023

Feel free to re-open this issue if you think it deserves another look.

@stale stale bot closed this as completed Oct 15, 2023
@PSFW
Copy link

PSFW commented Jan 5, 2024

Thank you for this comment @haugene, this fixed my problem.

I've been struggling with this for an embarrassing amount of time.
I thought it was an issue with nslookup not resolving correctly, and I was getting no logs out so I tried:

  • applying dns section within docker compose
  • applying OVERRIDE_DNS_1 environment variable
  • Binding /etc/resolv.conf:/etc/resolv.conf from the host (then in my confusion thinking that I couldn't bind a single file in this way)
  • Setting network_mode to "host" for debugging

In the end I just ran nslookup within a custom script, and realised the error was 'Operation not permitted' and it was being obscured before.
To do this I created a new Dockerfile, extended haugene/transmission-openvpn:5.3.1, realised I couldn't use dumb-init because it wouldn't install within my Dockerfile extension, so I instead used tini (included with Docker) to run a new process and to do that I had to set init: true in docker compose, and then call my script with CMD [ "/directory-to-script-within-container/custom-script.sh" ] .

@MrAurel MrAurel mentioned this issue May 7, 2024
8 tasks
@bangity
Copy link

bangity commented Jul 12, 2024

I am having the same issue on OMV7 with Rock5B. Pihole container runs fine.
I have the exact same setting working on OMV7 on an OdroidHC2.

Not sure what's causing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactivity Used by Stale bot to mark issues that will be closed
Projects
None yet
Development

No branches or pull requests