OpenVPN client: “systmctl stop” timeout, leftover processes

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I set up an openvpn client on Ubuntu 18.04 by creating a work.conf file under /etc/openvpn/



I start it with:



sudo systemctl start openvpn@work.service


When I stop it,



sudo systemctl stop openvpn@work.service


it hangs for exactly 90 seconds before finally shutting down. Checking the logs shows the graceful shutdown timing out, at which point a SIGKILL is issued:



journalctl -n 6 -u openvpn@work.service

12:59:51 systemd[1]: Stopping OpenVPN connection to work...
13:01:21 systemd[1]: openvpn@work.service: State 'stop-sigterm' timed out. Killing.
13:01:21 systemd[1]: openvpn@work.service: Killing process 12379 (openvpn) with signal SIGKILL.
13:01:21 systemd[1]: openvpn@work.service: Main process exited, code=killed, status=9/KILL
13:01:21 systemd[1]: openvpn@work.service: Failed with result 'timeout'.
13:01:21 systemd[1]: Stopped OpenVPN connection to work.


I've noticed a bunch of sleeping openvpn processes, some many days old:



ps ax -o command | grep --count '[o]penvpn'
35

ps ax -o stat,start,command | grep '[S]TAT|[o]penvpn'
STAT STARTED COMMAND
S Aug 21 /bin/bash /etc/openvpn/update-resolv-conf tun0 1500 1553 ... ... init
S Aug 21 run-parts --arg=-a --arg=tun0.openvpn /etc/resolvconf/update.d
...


I see a lot of similar processes in the service's cgroup:



systemd-cgls -u openvpn@work.service | grep --count run-parts
34
systemd-cgls -u openvpn@work.service | grep --count update-resolv-conf
17


I've also noticed that there is an openvpn.service in addition to my openvpn@work.service. I'm not clear on the interaction between the two. I think my @work service is grouped under the other service, but not sure.



I'd like to figure out why the service fails to shutdown cleanly, and how/whether to clean up all those proceses that appear to be duplicates. What would you suggest as a next step?



I can post my conf file if that's useful...










share|improve this question

























    up vote
    0
    down vote

    favorite












    I set up an openvpn client on Ubuntu 18.04 by creating a work.conf file under /etc/openvpn/



    I start it with:



    sudo systemctl start openvpn@work.service


    When I stop it,



    sudo systemctl stop openvpn@work.service


    it hangs for exactly 90 seconds before finally shutting down. Checking the logs shows the graceful shutdown timing out, at which point a SIGKILL is issued:



    journalctl -n 6 -u openvpn@work.service

    12:59:51 systemd[1]: Stopping OpenVPN connection to work...
    13:01:21 systemd[1]: openvpn@work.service: State 'stop-sigterm' timed out. Killing.
    13:01:21 systemd[1]: openvpn@work.service: Killing process 12379 (openvpn) with signal SIGKILL.
    13:01:21 systemd[1]: openvpn@work.service: Main process exited, code=killed, status=9/KILL
    13:01:21 systemd[1]: openvpn@work.service: Failed with result 'timeout'.
    13:01:21 systemd[1]: Stopped OpenVPN connection to work.


    I've noticed a bunch of sleeping openvpn processes, some many days old:



    ps ax -o command | grep --count '[o]penvpn'
    35

    ps ax -o stat,start,command | grep '[S]TAT|[o]penvpn'
    STAT STARTED COMMAND
    S Aug 21 /bin/bash /etc/openvpn/update-resolv-conf tun0 1500 1553 ... ... init
    S Aug 21 run-parts --arg=-a --arg=tun0.openvpn /etc/resolvconf/update.d
    ...


    I see a lot of similar processes in the service's cgroup:



    systemd-cgls -u openvpn@work.service | grep --count run-parts
    34
    systemd-cgls -u openvpn@work.service | grep --count update-resolv-conf
    17


    I've also noticed that there is an openvpn.service in addition to my openvpn@work.service. I'm not clear on the interaction between the two. I think my @work service is grouped under the other service, but not sure.



    I'd like to figure out why the service fails to shutdown cleanly, and how/whether to clean up all those proceses that appear to be duplicates. What would you suggest as a next step?



    I can post my conf file if that's useful...










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I set up an openvpn client on Ubuntu 18.04 by creating a work.conf file under /etc/openvpn/



      I start it with:



      sudo systemctl start openvpn@work.service


      When I stop it,



      sudo systemctl stop openvpn@work.service


      it hangs for exactly 90 seconds before finally shutting down. Checking the logs shows the graceful shutdown timing out, at which point a SIGKILL is issued:



      journalctl -n 6 -u openvpn@work.service

      12:59:51 systemd[1]: Stopping OpenVPN connection to work...
      13:01:21 systemd[1]: openvpn@work.service: State 'stop-sigterm' timed out. Killing.
      13:01:21 systemd[1]: openvpn@work.service: Killing process 12379 (openvpn) with signal SIGKILL.
      13:01:21 systemd[1]: openvpn@work.service: Main process exited, code=killed, status=9/KILL
      13:01:21 systemd[1]: openvpn@work.service: Failed with result 'timeout'.
      13:01:21 systemd[1]: Stopped OpenVPN connection to work.


      I've noticed a bunch of sleeping openvpn processes, some many days old:



      ps ax -o command | grep --count '[o]penvpn'
      35

      ps ax -o stat,start,command | grep '[S]TAT|[o]penvpn'
      STAT STARTED COMMAND
      S Aug 21 /bin/bash /etc/openvpn/update-resolv-conf tun0 1500 1553 ... ... init
      S Aug 21 run-parts --arg=-a --arg=tun0.openvpn /etc/resolvconf/update.d
      ...


      I see a lot of similar processes in the service's cgroup:



      systemd-cgls -u openvpn@work.service | grep --count run-parts
      34
      systemd-cgls -u openvpn@work.service | grep --count update-resolv-conf
      17


      I've also noticed that there is an openvpn.service in addition to my openvpn@work.service. I'm not clear on the interaction between the two. I think my @work service is grouped under the other service, but not sure.



      I'd like to figure out why the service fails to shutdown cleanly, and how/whether to clean up all those proceses that appear to be duplicates. What would you suggest as a next step?



      I can post my conf file if that's useful...










      share|improve this question













      I set up an openvpn client on Ubuntu 18.04 by creating a work.conf file under /etc/openvpn/



      I start it with:



      sudo systemctl start openvpn@work.service


      When I stop it,



      sudo systemctl stop openvpn@work.service


      it hangs for exactly 90 seconds before finally shutting down. Checking the logs shows the graceful shutdown timing out, at which point a SIGKILL is issued:



      journalctl -n 6 -u openvpn@work.service

      12:59:51 systemd[1]: Stopping OpenVPN connection to work...
      13:01:21 systemd[1]: openvpn@work.service: State 'stop-sigterm' timed out. Killing.
      13:01:21 systemd[1]: openvpn@work.service: Killing process 12379 (openvpn) with signal SIGKILL.
      13:01:21 systemd[1]: openvpn@work.service: Main process exited, code=killed, status=9/KILL
      13:01:21 systemd[1]: openvpn@work.service: Failed with result 'timeout'.
      13:01:21 systemd[1]: Stopped OpenVPN connection to work.


      I've noticed a bunch of sleeping openvpn processes, some many days old:



      ps ax -o command | grep --count '[o]penvpn'
      35

      ps ax -o stat,start,command | grep '[S]TAT|[o]penvpn'
      STAT STARTED COMMAND
      S Aug 21 /bin/bash /etc/openvpn/update-resolv-conf tun0 1500 1553 ... ... init
      S Aug 21 run-parts --arg=-a --arg=tun0.openvpn /etc/resolvconf/update.d
      ...


      I see a lot of similar processes in the service's cgroup:



      systemd-cgls -u openvpn@work.service | grep --count run-parts
      34
      systemd-cgls -u openvpn@work.service | grep --count update-resolv-conf
      17


      I've also noticed that there is an openvpn.service in addition to my openvpn@work.service. I'm not clear on the interaction between the two. I think my @work service is grouped under the other service, but not sure.



      I'd like to figure out why the service fails to shutdown cleanly, and how/whether to clean up all those proceses that appear to be duplicates. What would you suggest as a next step?



      I can post my conf file if that's useful...







      systemd openvpn






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 26 at 18:04









      ivan

      662719




      662719

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f464948%2fopenvpn-client-systmctl-stop-timeout-leftover-processes%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f464948%2fopenvpn-client-systmctl-stop-timeout-leftover-processes%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?