[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Web openvpn.net

[Openvpn-users] Management Interface Socket Timing Problem

  • Subject: [Openvpn-users] Management Interface Socket Timing Problem
  • From: openvpn2@xxxxxxxxxxxxxxxxx
  • Date: Mon, 25 Jun 2007 03:41:35 -0400

Hi folks:

I'm using OpenVPN 2.1 RC4 in server mode running on WinXP, and I think 
I've found a timing bug regarding when OpenVPN opens the socket to 
listen for the management interface.  Just recently I started receiving 
this message on startup:

MANAGEMENT: Socket bind failed on local address 
The requested address is not valid in its context.

Then OpenVPN terminates.  This message happens right after the 
parameters are listed, and before the 5 second delay.  Also, this only 
happens when the computer is being booted.  If I subsequently start the 
service everything works fine.  I'm thinking that there is some sort of 
timing problem with having the management interface opening its receive 
socket that early in the boot process.  I'm wondering if there are 
other services just starting on the computer, or if OpenVPN itself is 
also trying to bind to the bridge interface, of which the above address 
is a part, at the same time.  I can't say why it started happening all 
of a sudden, but now it happens every time I boot the computer.  
Unfortunately there doesn't seem to be any way to manually delay or 
otherwise influence the startup sequence of OpenVPN.

In the short term I have circumvented the problem by having OpenVPN's 
management interface listen on, and setting up a pipe proxy 
on the same machine to listen on the interface on 
another port and map any connections to port 4124.  If 
OpenVPN listens on there is never a problem at bootup.

My suggestion would be first, to delay the management interface socket 
connection until after the 5 second delay, and second, not to terminate 
OpenVPN if for some reason the management interface bind failed (or at 
least give an option to not have it fail in that circumstance).  It's a 
little scary that the failure of a non-critical component, the 
management interface, would keep the whole thing from coming up.

If anyone else has had the problem and knows how to fix it "right", I'd 
be very interested.


Openvpn-users mailing list