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

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

Open
7 of 8 tasks
snattack opened this issue Dec 10, 2023 · 6 comments
Open
7 of 8 tasks

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

snattack opened this issue Dec 10, 2023 · 6 comments

Comments

@snattack
Copy link

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

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: 81277fb
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

@pkishino
Copy link
Collaborator

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

@edgd1er
Copy link
Contributor

edgd1er commented Dec 10, 2023

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.

@pkishino
Copy link
Collaborator

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

@derekcentrico
Copy link
Contributor

derekcentrico commented Feb 25, 2024

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.

@snattack
Copy link
Author

snattack commented Jul 2, 2024

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.

@derekcentrico
Copy link
Contributor

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/

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

4 participants