Closed Sanrax closed 2 years ago
have the same issue using latest docker release. lots of redundant noise gets added into conf file
Are you on Dev branch? this line sed: cannot rename /etc/openvpn/custom/sedy7Hb5i: Device or resource busy indicates problems reading the file.. please check for file consistency/permissions
Are you on Dev branch? this line sed: cannot rename /etc/openvpn/custom/sedy7Hb5i: Device or resource busy indicates problems reading the file.. please check for file consistency/permissions
Where even is this file? Inside the container, I assume, right?
The OpenVPN file I mount should be fine. It's stored in my home directory with my user's permissions, shouldn't be a problem. It's also clearly read writable, since the container adds those line to it and is also able to connect using the config. I assume something is broken inside the container itself.
well, you are mounting the file -v /home/pi/vpn-config-file.ovpn:/etc/openvpn/custom/default.ovpn \ into the container Check from inside the container that the permissions etc are ok for the file a quick google shows this is most certainly related to docker permissions
I just discovered my VPN configuration file filled up with the same parameters added at each start attempt (which means a lot, docker image restarting every minute because of my VPN server down...) :
inactive 3600
ping 10
ping-exit 60
resolv-retry 15
verb 3
remap-usr1 SIGTERM
I also see the sed error :
sed: cannot rename /etc/openvpn/custom/sedXXXXXX: Device or resource busy
A workaround is to share a folder within docker and not only the configuration file, naming everything correctly (default.ovpn) :
-v /home/user/vpn-conf-dir/:/etc/openvpn/custom/
containing default.ovpn
I just discovered my VPN configuration file filled up with the same parameters added at each start attempt (which means a lot, docker image restarting every minute because of my VPN server down...) :
inactive 3600 ping 10 ping-exit 60 resolv-retry 15 verb 3 remap-usr1 SIGTERM
I also see the sed error :
sed: cannot rename /etc/openvpn/custom/sedXXXXXX: Device or resource busy
A workaround is to share a folder within docker and not only the configuration file, naming everything correctly (default.ovpn) :
-v /home/user/vpn-conf-dir/:/etc/openvpn/custom/
containing default.ovpn
Awesome, I'll go ahead and modify my docker run to mount this way, and to confirm that this workaround fixes the issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Feel free to re-open this issue if you think it deserves another look.
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
Current Behavior
Currently, my OpenVPN file is not being modified correctly on container start-up. It i supposed to be modified by sed in the script to change values like auth-user-pass to point to a file, but it is not able to do so. I had to modify it manually to get the container to start and connect to the VPN. I also see my .ovpn file being spammed with these lines on every single container start-up:
So for example, after a couple start-ups, my ovpn file looks like this:
Expected Behavior
I expect the OpenVPN file to be modified correctly, and not end up with a mile-long ovpn file after a couple reboots. The logs should also not have those sed errors.
How have you tried to solve the problem?
1) Updated container to latest 2) Updated docker 3) Checked existing issues
Log output
HW/SW Environment
Anything else?
No response