OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Packages
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version lede-17.01
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by helgadeville - 20.06.2017
Last edited by Jo-Philipp Wich - 17.07.2018

FS#859 - OpenVPN is beeing killed with "service openvpn stop" due to short timeout

TP-LINK TL-MR-3220 v.2.x with LEDE 17.01.2 onboard, installed OpenVPN.

Connection opens successfully, however, on stopping with “service openvpn stop”, logread shows:

Tue Jun 20 08:36:35 2017 daemon.info procd: Instance openvpn::instance1 pid 4084 not stopped on SIGTERM, sending SIGKILL instead
Tue Jun 20 08:36:35 2017 daemon.notice netifd: Network device ‘tun0’ link is down
Tue Jun 20 08:36:35 2017 daemon.notice netifd: Interface ‘vyprvpn’ has link connectivity loss

This causes OpenVPN scripts to abort.

If stopping openvpn with “killall -TERM openvpn”, then it gets enough time to end in a nice way and all scripts are OK.

Closed by  Jo-Philipp Wich
17.07.2018 14:06
Reason for closing:  Fixed
Additional comments about closing:  

Fixed with https://g it.openwrt.org/?p=openwrt/openwrt.git;a= commitdiff;h=28d3a1b54b6726a0a93477d75d0 9a25f74ee361f

Admin
Jo-Philipp Wich commented on 20.06.2017 11:47

How long does your openvpn take to properly shutdown? Do you have any complex teardown scripts or similar?

helgadeville commented on 20.06.2017 16:30

It takes around 5 seconds, there are no complex teardown scripts, just one sending echo 0 > brightness to led.
I have resolved this problem on my device using a patch for /etc/init.d/openvpn script (attached), which adds term_timeout parameter to service instance, but this is a part of the problem: another problem is, that /lib/functions/procd.sh ignores term_timeout parameter, so I filed another bug report (see link) and added a small patch for procd.sh script.
Those 2 patches make my installation work as expected with no further workarounds.

Admin
Jo-Philipp Wich commented on 20.06.2017 16:59

Right, I already staged a fix for term_timeout handling, but I wonder what a giod default tineout for openvpn would be. I think about 30s, that should cover most usecases.

helgadeville commented on 21.06.2017 01:42

I agree. I gave it 15 secs, but in case the internet connection is poor, the disconnect process may take longer.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing