OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Martin Schiller - 28.11.2018

FS#1975 - openvpn: misconfigured instance can't be stopped (procd/respawning)

There is a problem with the “respawn forever” feature of procd in relation with processes which dies right after they were started.

How to reproduce:

1. Create an openvpn config section like this

config openvpn 'test'
        option enabled '1'

Of course, this is not sufficient for a working openvpn instance.

2. Start the openvpn instance

/etc/init.d/openvpn start test

Now you can see in syslog that the instance ist tried to be established in a infinite loop:

Wed Nov 28 10:25:29 2018 daemon.err openvpn(test)[13977]: Options error: In [CMD-LINE]:1: Error opening configuration file: openvpn-test.conf
Wed Nov 28 10:25:29 2018 daemon.warn openvpn(test)[13977]: Use --help for more information.
Wed Nov 28 10:25:34 2018 daemon.err openvpn(test)[14024]: Options error: In [CMD-LINE]:1: Error opening configuration file: openvpn-test.conf
Wed Nov 28 10:25:34 2018 daemon.warn openvpn(test)[14024]: Use --help for more information.
Wed Nov 28 10:25:39 2018 daemon.err openvpn(test)[14360]: Options error: In [CMD-LINE]:1: Error opening configuration file: openvpn-test.conf
Wed Nov 28 10:25:39 2018 daemon.warn openvpn(test)[14360]: Use --help for more information.
ubus call service list '{"name":"openvpn"}'

shows this:

{
        "openvpn": {
                "instances": {
                        "test": {
                                "running": false,
                                "command": [
                                        "\/usr\/sbin\/openvpn",
                                        "--syslog",
                                        "openvpn(test)",
                                        "--status",
                                        "\/var\/run\/openvpn.test.status",
                                        "--cd",
                                        "\/var\/etc",
                                        "--config",
                                        "openvpn-test.conf"
                                ],
                                "term_timeout": 5,
                                "respawn": {
                                        "threshold": 3600,
                                        "timeout": 5,
                                        "retry": -1
                                }
                        }
                }
        }
}

Now this instance can’t be stopped anymore. I’ve tried doing all of the following

/etc/init.d/openvpn stop test
/etc/init.d/openvpn stop
ubus call service delete '{"name":"openvpn","instance":"test"}'

How can we get this instances killed?

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing