Discussion:
[Openvpn-users] Openvpn 2.4 : restart pause and HUP (bug?)
Yevgeny Kosarzhevsky
2017-02-13 00:26:56 UTC
Permalink
Hello,

it looks like significant changes were make on 2.4 version in restart-pause.
If there a way to control it from config file?
Today I have found in the log:


Feb 13 08:18:35 host ovpn-udp[9134]: SIGUSR1[soft,network-unreachable]
received, process restarting
Feb 13 08:18:35 host ovpn-udp[9134]: Restart pause, 300 second(s)

I am not finding how to control this from config file. Do I need to rebuild
source to set it back to 2 sec like it was in previous version?

Also I found that the process ignored HUP signal during this period. Had to
restart it.
I'd consider this a bug.
--
Regards,
Yevgeny
Gert Doering
2017-02-13 08:42:50 UTC
Permalink
Hi,
Post by Yevgeny Kosarzhevsky
it looks like significant changes were make on 2.4 version in restart-pause.
If there a way to control it from config file?
Restart-delay is now exponentially growing - that is: it starts with
a quick restart, and if your server keeps not working, it goes up to
a maximum value, to avoid filling the log files all around with repetitive
messages.

If you look at the man page, you can find

--connect-retry n [max]
Wait n seconds between connection attempts (default=5).
Repeated reconnection attempts are slowed down after 5 retries
per remote by doubling the wait time after each unsuccessful
attempt. The optional argument max specifies the maximum value
of wait time in seconds at which it gets capped (default=300).


[..]
Post by Yevgeny Kosarzhevsky
Also I found that the process ignored HUP signal during this period. Had to
restart it.
I'd consider this a bug.
One could argue that this is a bug indeed (not reacting to SIGHUP while
waiting for connect-retry). So please file one in our trac on
https://community.openvpn.net/

gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany ***@greenie.muc.de
fax: +49-89-35655025 ***@net.informatik.tu-muenchen.de
Yevgeny Kosarzhevsky
2017-02-14 06:16:29 UTC
Permalink
Thank you Gert for a tip, I'll try connect-retry.

As for not responding to HUP, I'll file a bug report. One could find useful
to send HUP signal (like I do through the post-connect script in wicd)
whenever connection reappears so not reacting on it makes to wait
additional time for openvpn to connect.
Post by Yevgeny Kosarzhevsky
Hi,
Post by Yevgeny Kosarzhevsky
it looks like significant changes were make on 2.4 version in
restart-pause.
Post by Yevgeny Kosarzhevsky
If there a way to control it from config file?
Restart-delay is now exponentially growing - that is: it starts with
a quick restart, and if your server keeps not working, it goes up to
a maximum value, to avoid filling the log files all around with repetitive
messages.
If you look at the man page, you can find
--connect-retry n [max]
Wait n seconds between connection attempts (default=5).
Repeated reconnection attempts are slowed down after 5 retries
per remote by doubling the wait time after each unsuccessful
attempt. The optional argument max specifies the maximum value
of wait time in seconds at which it gets capped
(default=300).
[..]
Post by Yevgeny Kosarzhevsky
Also I found that the process ignored HUP signal during this period. Had
to
Post by Yevgeny Kosarzhevsky
restart it.
I'd consider this a bug.
One could argue that this is a bug indeed (not reacting to SIGHUP while
waiting for connect-retry). So please file one in our trac on
https://community.openvpn.net/
gert
--
USENET is *not* the non-clickable part of WWW!
//
www.muc.de/~gert/
Gert Doering - Munich, Germany
muenchen.de
--
Regards,
Yevgeny
Loading...