Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Virtual private networks
»
Cannot open TUN/TAP dev /dev/tun1: Device busy (errno=16)
« previous
next »
Print
Pages: [
1
]
Author
Topic: Cannot open TUN/TAP dev /dev/tun1: Device busy (errno=16) (Read 4498 times)
gearboxes
Newbie
Posts: 11
Karma: 0
Cannot open TUN/TAP dev /dev/tun1: Device busy (errno=16)
«
on:
June 04, 2021, 01:54:27 am »
I have posted a few times about issues we are seeing with using Openvpn when using radius authentication and it seems there is a major issue.
Again we are unable to restart openvpn I can delete it, recreate it, reboot the device nothing helps. This is the same issue we had with running it as a VM thinking it was isolated to that. Well now a device we purchased that shipped with Opnsense is doing the same thing.
In this state it still accepts connections that can authenticate locally, but looking at the connection status I see this: "[error] Unable to contact daemon Service not running?" You can't tell who is still connected. Disabling OpenVPN still allows connections.
I think this is a pretty major concern that a few users unable to connect for whatever reason can get the service into this state, especially since it shows the service is down and it still allows connections even after a reboot.
2021-06-03T18:47:22 openvpn[11088] Exiting due to fatal error
2021-06-03T18:47:22 openvpn[11088] Cannot open TUN/TAP dev /dev/tun1: Device busy (errno=16)
2021-06-03T18:47:22 openvpn[11088] TUN/TAP device ovpns1 exists previously, keep at program end
Looks like there is a process pid left behind once deleted and then kill the process with config for server1 in my case allowed the newly configured openvpn server to start.
«
Last Edit: June 04, 2021, 02:17:37 am by gearboxes
»
Logged
franco
Administrator
Hero Member
Posts: 17665
Karma: 1611
Re: Cannot open TUN/TAP dev /dev/tun1: Device busy (errno=16)
«
Reply #1 on:
June 04, 2021, 08:55:38 am »
Hi,
Let's try not to rate severity by the apparent impact (case study) it has without knowing how common the cause is.
So when it should kill the process openvpn is stuck either while trying to process the kill or prior to that?
Can you post relevant output of program tree via "ps auxd" (sanitized, look out for passwords in stuck auth process)?
A "pkill -9 openvpn" clears the process?
Cheers,
Franco
Logged
gearboxes
Newbie
Posts: 11
Karma: 0
Re: Cannot open TUN/TAP dev /dev/tun1: Device busy (errno=16)
«
Reply #2 on:
June 06, 2021, 05:50:34 pm »
Hi Franco,
I can't really say if killing the process would correct the issue because I deleted the openvpn server to reconfigure as stopping / starting or rebooting did not correct the issue. After reconfiguration I was getting the error in the subject. I deleted the config again so no servers were present in the console and was still able to connect with a local account.
When I looked at processes it would show openvpn --server1 (if I remember correctly) even though the openvpn server was deleted. Looking at the the processes in run I noticed the pid. Deleting the pid and killing the process I could configure a new openvpn server to use tun1 again.
This is not an occasional occurrence, but as soon as a few users attempt to connect this happens. As mentioned before we thought this was an issue with the VM we had deployed, but the same is happening on a dedicated device.
It appears the issues start after this error: WARNING: Failed running command (--auth-user-pass-verify): external program exited with error status: 255, but can't say for sure.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Virtual private networks
»
Cannot open TUN/TAP dev /dev/tun1: Device busy (errno=16)