[OK] read UDPv4 [ECONNREFUSED]: Connection refused (code=111

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
zeycron
OpenVpn Newbie
Posts: 15
Joined: Wed May 23, 2012 4:46 pm

[OK] read UDPv4 [ECONNREFUSED]: Connection refused (code=111

Post by zeycron » Sun Jun 03, 2012 12:33 pm

Hello,

my installation (bridged) is ok, but when my users are deconnected this message appears in my logs (server side) during few minutes :
read UDPv4 [ECONNREFUSED]: Connection refused (code=111)

is it normal?

Example (server side) after a deconnection of user-1 :
Jun 3 12:47:46 server ovpn-server[15148]: user-1/XX.XX.XX.XX:60900 MULTI: Learn: 3e:d2:21:XX:XX:XX -> user-1/XX.XX.XX.XX:60900
Jun 3 12:49:30 server ovpn-server[15148]: read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Jun 3 12:49:30 server ovpn-server[15148]: read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Jun 3 12:49:30 server ovpn-server[15148]: read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Jun 3 12:49:31 server ovpn-server[15148]: read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Jun 3 12:49:31 server ovpn-server[15148]: read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Jun 3 12:49:32 server ovpn-server[15148]: read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Jun 3 12:49:34 server ovpn-server[15148]: read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Jun 3 12:49:36 server ovpn-server[15148]: read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Jun 3 12:49:36 server ovpn-server[15148]: read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Jun 3 12:49:38 server ovpn-server[15148]: read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Jun 3 12:49:39 server ovpn-server[15148]: NOTE: --mute triggered...
Jun 3 12:53:28 server ovpn-server[15148]: user-1/XX.XX.XX.XX:60900 185 variation(s) on previous 10 message(s) suppressed by --mute
Jun 3 12:53:28 server ovpn-server[15148]: user-1/XX.XX.XX.XX:60900 [p12087] Inactivity timeout (--ping-restart), restarting
Jun 3 12:53:28 server ovpn-server[15148]: user-1/XX.XX.XX.XX:60900 SIGUSR1[soft,ping-restart] received, client-instance restarting
Jun 3 12:53:28 server ovpn-server[15148]: read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
185 variation(s) on previous 10 message(s) suppressed by --mute
it's enorme??

my server.conf is :
local --.--.--.--
port 1194
proto udp
dev tap0
ca ca.crt
cert vpn.crt
key vpn.key
dh dh2048.pem
ifconfig-pool-persist ipp.txt
server-bridge 192.168.1.10 255.255.255.0 192.168.1.100 192.168.1.200
client-config-dir /etc/openvpn/ccd
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS XX.XX.XX.XX"
push "dhcp-option DNS YY.YY.YY.YY"
client-to-client
keepalive 10 120
tls-auth ta.key 0 # This file is secret
crl-verify /etc/openvpn/crl.pem
comp-lzo
max-clients 50
chroot jail
user openvpn
group openvpn
persist-key
persist-tun
status /var/log/openvpn-status.log
verb 4
mute 10
username-as-common-name
plugin /usr/lib/openvpn/openvpn-auth-pam.so openvpn
script-security 2
auth-user-pass-verify /etc/openvpn/test.sh via-env
PS : the last ligne is to check if common_name = username

thanks!
Last edited by zeycron on Mon Jun 04, 2012 7:14 pm, edited 1 time in total.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: read UDPv4 [ECONNREFUSED]: Connection refused (code=111)

Post by janjust » Sun Jun 03, 2012 9:55 pm

when a (UDP) client disconnects the server is not aware of this and will try to contact the client again. Only after a certain interval will the server give up and remove the client from its list of known connections. The messages you are seeing are caused by this.
Add

Code: Select all

push "explicit-exit-notify 3"
to the server config; this instructs the clients to "sign off" when they disconnect.

zeycron
OpenVpn Newbie
Posts: 15
Joined: Wed May 23, 2012 4:46 pm

Re: read UDPv4 [ECONNREFUSED]: Connection refused (code=111)

Post by zeycron » Mon Jun 04, 2012 7:13 pm

great!

thanks a lot

Post Reply