I started getting this error after I added an OpenVPN client to my OpenVPN server and restarting the service. Nothing really meaningful happened on screen, but when you do a service OpenVPN status request I saw that the service was not started.

~$ sudo /etc/init.d/openvpn restart
* Stopping virtual private network daemon(s)… * No VPN is running.
* Starting virtual private network daemon(s)… * Autostarting VPN ‘server’ [fail] 

sudo  cat /etc/openvpn/openvpn.log    (Gave me the details as to why the connection was failing):
Wed Oct 5 20:02:22 2011 us=763344 TCP/UDP: Socket bind failed on local address [undef]: Address already in use
Wed Oct 5 20:02:22 2011 us=763375 Exiting

lsof -i | grep open   (showed me that there were too many stale connections that needed to be killed)

I simply had to kill the service/connection by using it’s PID:
kill -9 <PID>

Then restart the service:
sudo /etc/init.d/openvpn restart

Reference:
https://forums.openvpn.net/topic8933.html

Advertisements

One thought on “OpenVPN: TCP/UDP: Socket bind failed on local address already in use

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s