daemon.info init: Id “vpn” respawning too fast: disabled for 5 minutes

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











up vote
0
down vote

favorite












I want my openvpn daemon to be started in boot and restarted when it crashs, so I added the following in /etc/inittab



vpn:2345:respawn:/etc/init.d/openvpn restart


but it is restarting every 5 min due to I guess:



daemon.info init: Id "vpn" respawning too fast: disabled for 5 minutes


here are more debug messages:



Sep 25 14:57:35 Wirgrid daemon.info ntpd[1061]: Deleting interface #9 tun0, 10.8.0.6#123, interface stats: received=0, sent=0, dropped=0, active_time=228 secs
Sep 25 14:57:49 Wirgrid daemon.info init: Id "vpn" respawning too fast: disabled for 5 minutes
Sep 25 14:59:04 Wirgrid daemon.info ntpd[1061]: Listen normally on 10 tun0 10.8.0.6:123
Sep 25 14:59:04 Wirgrid daemon.debug ntpd[1061]: new interface(s) found: waking up resolver
Sep 25 15:02:51 Wirgrid daemon.info ntpd[1061]: Deleting interface #10 tun0, 10.8.0.6#123, interface stats: received=0, sent=0, dropped=0, active_time=227 secs
Sep 25 15:03:05 Wirgrid daemon.info init: Id "vpn" respawning too fast: disabled for 5 minutes
Sep 25 15:04:19 Wirgrid daemon.info ntpd[1061]: Listen normally on 11 tun0 10.8.0.6:123
Sep 25 15:04:19 Wirgrid daemon.debug ntpd[1061]: new interface(s) found: waking up resolver


Here is the script /etc/init.d/openvpn:



#!/bin/sh -e
#
# Original version by Robert Leslie
# <rob@mars.org>, edited by iwj and cs
# Modified for openvpn by Alberto Gonzalez Iniesta <agi@agi.as>
# Modified for restarting / starting / stopping single tunnels by Richard Mueller <mueller@teamix.net>

test $DEBIAN_SCRIPT_DEBUG && set -v -x

DAEMON=/usr/sbin/openvpn
CONFIG_DIR=/etc/openvpn
test -x $DAEMON || exit 0
test -d $CONFIG_DIR || exit 0

start_vpn ()
$DAEMON --daemon --writepid /var/run/openvpn.$NAME.pid
--config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR
stop_vpn ()

case "$1" in
start)
printf "Starting openvpn:"

if test -z $2 ; then
for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
NAME=$CONFIG%%.conf
start_vpn
done
else
if test -e $CONFIG_DIR/$2.conf ; then
NAME=$2
start_vpn
else
printf " No such VPN: $2"
fi
fi
echo "."

;;
stop)
printf "Stopping openvpn:"

if test -z $2 ; then
for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
NAME=`echo $PIDFILE | cut -c18-`
NAME=$NAME%%.pid
stop_vpn
printf " $NAME"
done
else
if test -e /var/run/openvpn.$2.pid ; then
PIDFILE=`ls /var/run/openvpn.$2.pid 2> /dev/null`
NAME=`echo $PIDFILE | cut -c18-`
NAME=$NAME%%.pid
stop_vpn
printf " $NAME"
else
printf " No such VPN: $2"
fi
fi
echo "."
;;
# We only 'reload' for running VPNs. New ones will only start with 'start' or 'restart'.
reload|force-reload)
printf "Reloading openvpn:"
for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
NAME=`echo $PIDFILE | cut -c18-`
NAME=$NAME%%.pid
# If openvpn if running under a different user than root we'll need to restart
if egrep '^( |t)*user' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then
stop_vpn
sleep 1
start_vpn
printf "(restarted)"
else
kill -HUP `cat $PIDFILE` || true
# start-stop-daemon --stop --signal HUP --quiet --oknodo
# --exec $DAEMON --pidfile $PIDFILE
printf " $NAME"
fi
done
echo "."
;;

restart)
$0 stop $2
sleep 1
$0 start $2
;;
*)
echo "Usage: $0 restart" >&2
exit 1
;;
esac

exit 0

# vim:set ai et sts=2 sw=2 tw=0:


Any idea why the init system keeps restarting it? thanks!










share|improve this question



























    up vote
    0
    down vote

    favorite












    I want my openvpn daemon to be started in boot and restarted when it crashs, so I added the following in /etc/inittab



    vpn:2345:respawn:/etc/init.d/openvpn restart


    but it is restarting every 5 min due to I guess:



    daemon.info init: Id "vpn" respawning too fast: disabled for 5 minutes


    here are more debug messages:



    Sep 25 14:57:35 Wirgrid daemon.info ntpd[1061]: Deleting interface #9 tun0, 10.8.0.6#123, interface stats: received=0, sent=0, dropped=0, active_time=228 secs
    Sep 25 14:57:49 Wirgrid daemon.info init: Id "vpn" respawning too fast: disabled for 5 minutes
    Sep 25 14:59:04 Wirgrid daemon.info ntpd[1061]: Listen normally on 10 tun0 10.8.0.6:123
    Sep 25 14:59:04 Wirgrid daemon.debug ntpd[1061]: new interface(s) found: waking up resolver
    Sep 25 15:02:51 Wirgrid daemon.info ntpd[1061]: Deleting interface #10 tun0, 10.8.0.6#123, interface stats: received=0, sent=0, dropped=0, active_time=227 secs
    Sep 25 15:03:05 Wirgrid daemon.info init: Id "vpn" respawning too fast: disabled for 5 minutes
    Sep 25 15:04:19 Wirgrid daemon.info ntpd[1061]: Listen normally on 11 tun0 10.8.0.6:123
    Sep 25 15:04:19 Wirgrid daemon.debug ntpd[1061]: new interface(s) found: waking up resolver


    Here is the script /etc/init.d/openvpn:



    #!/bin/sh -e
    #
    # Original version by Robert Leslie
    # <rob@mars.org>, edited by iwj and cs
    # Modified for openvpn by Alberto Gonzalez Iniesta <agi@agi.as>
    # Modified for restarting / starting / stopping single tunnels by Richard Mueller <mueller@teamix.net>

    test $DEBIAN_SCRIPT_DEBUG && set -v -x

    DAEMON=/usr/sbin/openvpn
    CONFIG_DIR=/etc/openvpn
    test -x $DAEMON || exit 0
    test -d $CONFIG_DIR || exit 0

    start_vpn ()
    $DAEMON --daemon --writepid /var/run/openvpn.$NAME.pid
    --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR
    stop_vpn ()

    case "$1" in
    start)
    printf "Starting openvpn:"

    if test -z $2 ; then
    for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
    NAME=$CONFIG%%.conf
    start_vpn
    done
    else
    if test -e $CONFIG_DIR/$2.conf ; then
    NAME=$2
    start_vpn
    else
    printf " No such VPN: $2"
    fi
    fi
    echo "."

    ;;
    stop)
    printf "Stopping openvpn:"

    if test -z $2 ; then
    for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
    NAME=`echo $PIDFILE | cut -c18-`
    NAME=$NAME%%.pid
    stop_vpn
    printf " $NAME"
    done
    else
    if test -e /var/run/openvpn.$2.pid ; then
    PIDFILE=`ls /var/run/openvpn.$2.pid 2> /dev/null`
    NAME=`echo $PIDFILE | cut -c18-`
    NAME=$NAME%%.pid
    stop_vpn
    printf " $NAME"
    else
    printf " No such VPN: $2"
    fi
    fi
    echo "."
    ;;
    # We only 'reload' for running VPNs. New ones will only start with 'start' or 'restart'.
    reload|force-reload)
    printf "Reloading openvpn:"
    for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
    NAME=`echo $PIDFILE | cut -c18-`
    NAME=$NAME%%.pid
    # If openvpn if running under a different user than root we'll need to restart
    if egrep '^( |t)*user' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then
    stop_vpn
    sleep 1
    start_vpn
    printf "(restarted)"
    else
    kill -HUP `cat $PIDFILE` || true
    # start-stop-daemon --stop --signal HUP --quiet --oknodo
    # --exec $DAEMON --pidfile $PIDFILE
    printf " $NAME"
    fi
    done
    echo "."
    ;;

    restart)
    $0 stop $2
    sleep 1
    $0 start $2
    ;;
    *)
    echo "Usage: $0 restart" >&2
    exit 1
    ;;
    esac

    exit 0

    # vim:set ai et sts=2 sw=2 tw=0:


    Any idea why the init system keeps restarting it? thanks!










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I want my openvpn daemon to be started in boot and restarted when it crashs, so I added the following in /etc/inittab



      vpn:2345:respawn:/etc/init.d/openvpn restart


      but it is restarting every 5 min due to I guess:



      daemon.info init: Id "vpn" respawning too fast: disabled for 5 minutes


      here are more debug messages:



      Sep 25 14:57:35 Wirgrid daemon.info ntpd[1061]: Deleting interface #9 tun0, 10.8.0.6#123, interface stats: received=0, sent=0, dropped=0, active_time=228 secs
      Sep 25 14:57:49 Wirgrid daemon.info init: Id "vpn" respawning too fast: disabled for 5 minutes
      Sep 25 14:59:04 Wirgrid daemon.info ntpd[1061]: Listen normally on 10 tun0 10.8.0.6:123
      Sep 25 14:59:04 Wirgrid daemon.debug ntpd[1061]: new interface(s) found: waking up resolver
      Sep 25 15:02:51 Wirgrid daemon.info ntpd[1061]: Deleting interface #10 tun0, 10.8.0.6#123, interface stats: received=0, sent=0, dropped=0, active_time=227 secs
      Sep 25 15:03:05 Wirgrid daemon.info init: Id "vpn" respawning too fast: disabled for 5 minutes
      Sep 25 15:04:19 Wirgrid daemon.info ntpd[1061]: Listen normally on 11 tun0 10.8.0.6:123
      Sep 25 15:04:19 Wirgrid daemon.debug ntpd[1061]: new interface(s) found: waking up resolver


      Here is the script /etc/init.d/openvpn:



      #!/bin/sh -e
      #
      # Original version by Robert Leslie
      # <rob@mars.org>, edited by iwj and cs
      # Modified for openvpn by Alberto Gonzalez Iniesta <agi@agi.as>
      # Modified for restarting / starting / stopping single tunnels by Richard Mueller <mueller@teamix.net>

      test $DEBIAN_SCRIPT_DEBUG && set -v -x

      DAEMON=/usr/sbin/openvpn
      CONFIG_DIR=/etc/openvpn
      test -x $DAEMON || exit 0
      test -d $CONFIG_DIR || exit 0

      start_vpn ()
      $DAEMON --daemon --writepid /var/run/openvpn.$NAME.pid
      --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR
      stop_vpn ()

      case "$1" in
      start)
      printf "Starting openvpn:"

      if test -z $2 ; then
      for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
      NAME=$CONFIG%%.conf
      start_vpn
      done
      else
      if test -e $CONFIG_DIR/$2.conf ; then
      NAME=$2
      start_vpn
      else
      printf " No such VPN: $2"
      fi
      fi
      echo "."

      ;;
      stop)
      printf "Stopping openvpn:"

      if test -z $2 ; then
      for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
      NAME=`echo $PIDFILE | cut -c18-`
      NAME=$NAME%%.pid
      stop_vpn
      printf " $NAME"
      done
      else
      if test -e /var/run/openvpn.$2.pid ; then
      PIDFILE=`ls /var/run/openvpn.$2.pid 2> /dev/null`
      NAME=`echo $PIDFILE | cut -c18-`
      NAME=$NAME%%.pid
      stop_vpn
      printf " $NAME"
      else
      printf " No such VPN: $2"
      fi
      fi
      echo "."
      ;;
      # We only 'reload' for running VPNs. New ones will only start with 'start' or 'restart'.
      reload|force-reload)
      printf "Reloading openvpn:"
      for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
      NAME=`echo $PIDFILE | cut -c18-`
      NAME=$NAME%%.pid
      # If openvpn if running under a different user than root we'll need to restart
      if egrep '^( |t)*user' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then
      stop_vpn
      sleep 1
      start_vpn
      printf "(restarted)"
      else
      kill -HUP `cat $PIDFILE` || true
      # start-stop-daemon --stop --signal HUP --quiet --oknodo
      # --exec $DAEMON --pidfile $PIDFILE
      printf " $NAME"
      fi
      done
      echo "."
      ;;

      restart)
      $0 stop $2
      sleep 1
      $0 start $2
      ;;
      *)
      echo "Usage: $0 restart" >&2
      exit 1
      ;;
      esac

      exit 0

      # vim:set ai et sts=2 sw=2 tw=0:


      Any idea why the init system keeps restarting it? thanks!










      share|improve this question















      I want my openvpn daemon to be started in boot and restarted when it crashs, so I added the following in /etc/inittab



      vpn:2345:respawn:/etc/init.d/openvpn restart


      but it is restarting every 5 min due to I guess:



      daemon.info init: Id "vpn" respawning too fast: disabled for 5 minutes


      here are more debug messages:



      Sep 25 14:57:35 Wirgrid daemon.info ntpd[1061]: Deleting interface #9 tun0, 10.8.0.6#123, interface stats: received=0, sent=0, dropped=0, active_time=228 secs
      Sep 25 14:57:49 Wirgrid daemon.info init: Id "vpn" respawning too fast: disabled for 5 minutes
      Sep 25 14:59:04 Wirgrid daemon.info ntpd[1061]: Listen normally on 10 tun0 10.8.0.6:123
      Sep 25 14:59:04 Wirgrid daemon.debug ntpd[1061]: new interface(s) found: waking up resolver
      Sep 25 15:02:51 Wirgrid daemon.info ntpd[1061]: Deleting interface #10 tun0, 10.8.0.6#123, interface stats: received=0, sent=0, dropped=0, active_time=227 secs
      Sep 25 15:03:05 Wirgrid daemon.info init: Id "vpn" respawning too fast: disabled for 5 minutes
      Sep 25 15:04:19 Wirgrid daemon.info ntpd[1061]: Listen normally on 11 tun0 10.8.0.6:123
      Sep 25 15:04:19 Wirgrid daemon.debug ntpd[1061]: new interface(s) found: waking up resolver


      Here is the script /etc/init.d/openvpn:



      #!/bin/sh -e
      #
      # Original version by Robert Leslie
      # <rob@mars.org>, edited by iwj and cs
      # Modified for openvpn by Alberto Gonzalez Iniesta <agi@agi.as>
      # Modified for restarting / starting / stopping single tunnels by Richard Mueller <mueller@teamix.net>

      test $DEBIAN_SCRIPT_DEBUG && set -v -x

      DAEMON=/usr/sbin/openvpn
      CONFIG_DIR=/etc/openvpn
      test -x $DAEMON || exit 0
      test -d $CONFIG_DIR || exit 0

      start_vpn ()
      $DAEMON --daemon --writepid /var/run/openvpn.$NAME.pid
      --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR
      stop_vpn ()

      case "$1" in
      start)
      printf "Starting openvpn:"

      if test -z $2 ; then
      for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
      NAME=$CONFIG%%.conf
      start_vpn
      done
      else
      if test -e $CONFIG_DIR/$2.conf ; then
      NAME=$2
      start_vpn
      else
      printf " No such VPN: $2"
      fi
      fi
      echo "."

      ;;
      stop)
      printf "Stopping openvpn:"

      if test -z $2 ; then
      for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
      NAME=`echo $PIDFILE | cut -c18-`
      NAME=$NAME%%.pid
      stop_vpn
      printf " $NAME"
      done
      else
      if test -e /var/run/openvpn.$2.pid ; then
      PIDFILE=`ls /var/run/openvpn.$2.pid 2> /dev/null`
      NAME=`echo $PIDFILE | cut -c18-`
      NAME=$NAME%%.pid
      stop_vpn
      printf " $NAME"
      else
      printf " No such VPN: $2"
      fi
      fi
      echo "."
      ;;
      # We only 'reload' for running VPNs. New ones will only start with 'start' or 'restart'.
      reload|force-reload)
      printf "Reloading openvpn:"
      for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
      NAME=`echo $PIDFILE | cut -c18-`
      NAME=$NAME%%.pid
      # If openvpn if running under a different user than root we'll need to restart
      if egrep '^( |t)*user' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then
      stop_vpn
      sleep 1
      start_vpn
      printf "(restarted)"
      else
      kill -HUP `cat $PIDFILE` || true
      # start-stop-daemon --stop --signal HUP --quiet --oknodo
      # --exec $DAEMON --pidfile $PIDFILE
      printf " $NAME"
      fi
      done
      echo "."
      ;;

      restart)
      $0 stop $2
      sleep 1
      $0 start $2
      ;;
      *)
      echo "Usage: $0 restart" >&2
      exit 1
      ;;
      esac

      exit 0

      # vim:set ai et sts=2 sw=2 tw=0:


      Any idea why the init system keeps restarting it? thanks!







      shell-script openvpn sysvinit ntpd






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 26 '17 at 7:16

























      asked Sep 25 '17 at 15:07









      sabrina2020

      10417




      10417

























          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%2f394332%2fdaemon-info-init-id-vpn-respawning-too-fast-disabled-for-5-minutes%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%2f394332%2fdaemon-info-init-id-vpn-respawning-too-fast-disabled-for-5-minutes%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?