docker-transmission-openvpn icon indicating copy to clipboard operation
docker-transmission-openvpn copied to clipboard

mkdir: cannot create directory '/tmp/ovpnxtract/': File exists

Open snattack opened this issue 1 year ago • 7 comments

Is there a pinned issue for this?

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

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

  • [X] I have searched the existing issues
  • [X] I have searched the existing discussions

Is there any comment in the documentation for this?

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

Is this related to a provider?

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

Are you using the latest release?

  • [X] I am using the latest release

Have you tried using the dev branch latest?

  • [ ] I have tried using dev branch

Docker run config used

docker run --cap-add=NET_ADMIN -d
-v /XYZ/Transmission:/data
-v /XYZ/Transmission:/config
-e OPENVPN_PROVIDER=OVPN
-e OPENVPN_CONFIG=standard.se.stockholm.tcp.ovpn
-e OVPN_PROTOCOL=tcp
-e OVPN_COUNTRY=se
-e OVPN_CITY=stockholm
-e OVPN_CONNECTION=standard
-e OPENVPN_USERNAME=
-e OPENVPN_PASSWORD=
-e LOCAL_NETWORK=1.2.3.4/24
-e TRANSMISSION_RPC_USERNAME=
-e TRANSMISSION_RPC_PASSWORD=
-e TRANSMISSION_RPC_AUTHENTICATION_REQUIRED=true
--log-driver json-file
--log-opt max-size=10m
-p 1234:1234
haugene/transmission-openvpn

(Ports, IPs, locations, etc, have been hidden)

Current Behavior

It seems the /tmp/ovpnxtract can be left created, and therefore prevent the container for starting up.

Expected Behavior

There should be a check in the config to see if the directory already exists.

How have you tried to solve the problem?

Removing/Re-adding the container.

Log output

Starting container with revision: 81277fb6f8ae6aeb57f913172d4d45c7af8c0b31 TRANSMISSION_HOME is currently set to: /config/transmission-home Creating TUN device /dev/net/tun Using OpenVPN provider: OVPN Running with VPN_CONFIG_SOURCE auto Provider OVPN has a bundled setup script. Defaulting to internal config Executing setup script for OVPN creating temp folder mkdir: cannot create directory '/tmp/ovpnxtract/': File exists

HW/SW Environment

- OS: Ubuntu 20.04
- Docker: Docker version 20.10.21, build 20.10.21-0ubuntu1~20.04.2

Anything else?

No response

snattack avatar Dec 10 '23 00:12 snattack

just submitted a quick fix to the dev branch for the ovpn script..please check when it has finished building on the dev branch

pkishino avatar Dec 10 '23 07:12 pkishino

just submitted a quick fix to the dev branch for the ovpn script..please check when it has finished building on the dev branch

I'm afraid the quick fix will work once, when no folder will be present, there will be an error resulting the script to exit before completion. something like [[ ! -d /tmp/ovpnxtract/ ]] && mkdir /tmp/ovpnxtract/ || true should fix the problem.

edgd1er avatar Dec 10 '23 07:12 edgd1er

hmm, with no folder present, because of the -f no error should occur..at least not when I tested it..

pkishino avatar Dec 10 '23 07:12 pkishino

Yeah this is just bizarre and I didn't find an issue with my original script.

It occurs for me whenever OVPN crashes and it tries to rexonnect. Restarting the container results in this issue. I ended up just making a down detector cronjob to remove the container and readd it when it's down.

derekcentrico avatar Feb 25 '24 18:02 derekcentrico

So we're 7 months down the line and this issue is still plaguing me. Any ideas how to fix this? Apparently the workarounds mentioned here won't work. The workaround I've done so far is re-creating the container from scratch every time I boot, but it randomly gets this error upon initial creation as well.

snattack avatar Jul 02 '24 18:07 snattack

Sure, so I can tell you that using the Ubuntu PPA repository's docker builds I had this issue. Switching to docker's own PPA eliminated it. Ubuntu's repo is very far behind. Your distro may be the same. Give it a go and try?

https://docs.docker.com/engine/install/ubuntu/

derekcentrico avatar Jul 02 '24 18:07 derekcentrico