Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-675

init.d script silently fails if PIDfile is missing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PDB 2.0.0
    • Fix Version/s: PDB 2.1.0
    • Component/s: None
    • Labels:
      None
    • Environment:
    • Template:
    • Story Points:
      0
    • Sprint:
      20140521 to 20140604, 20140604 to 20140618, 20140618 to 20140702, 20140702 to 20140716

      Description

      Debugging log: init.d restart fails but silently exits 0. Missing pidfile but still running application – killing application fixes issue.

      # sh -x /etc/init.d/puppetdb stop
      + [ -r /etc/default/puppetdb ]
      + . /etc/default/
      + [ -f /usr/lib/jvm/java-7-openjdk-amd64/bin/java ]
      + JAVA_BIN=/usr/lib/jvm/java-7-openjdk-amd64/bin/java
      + JAVA_ARGS=-Xmx192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/puppetdb/puppetdb-oom.hprof -Djava.security.egd=file:/dev/urandom
      + USER=puppetdb
      + INSTALL_DIR=/usr/share/puppetdb
      + CONFIG=/etc/puppetdb/conf.d
      + PATH=/sbin:/usr/sbin:/bin:/usr/bin
      + NAME=puppetdb
      + DESC=puppetdb centralized storage daemon
      + JARFILE=puppetdb.jar
      + PIDFILE=/var/run/puppetdb.pid
      + SCRIPTNAME=/etc/init.d/puppetdb
      + JAVA_ARGS=-Xmx192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/puppetdb/puppetdb-oom.hprof -Djava.security.egd=file:/dev/urandom -cp /usr/share/puppetdb/puppetdb.jar clojure.main -m com.puppetlabs.puppetdb.core services -c /etc/puppetdb/conf.d
      + EXTRA_ARGS=--chuid puppetdb --background --make-pidfile
      + [ -x /usr/lib/jvm/java-7-openjdk-amd64/bin/java ]
      + . /lib/init/vars.sh
      + TMPTIME=0
      + SULOGIN=no
      + DELAYLOGIN=no
      + UTC=yes
      + VERBOSE=no
      + FSCKFIX=no
      + RAMLOCK=yes
      + RAMSHM=yes
      + RAMTMP=no
      + [ -f /etc/default/rcS ]
      + . /etc/default/rcS
      + TMPTIME=0
      + SULOGIN=no
      + DELAYLOGIN=no
      + UTC=yes
      + VERBOSE=no
      + FSCKFIX=no
      + [ -r /proc/cmdline ]
      + cat /proc/cmdline
      + [  ]
      + break
      + [  ]
      + . /lib/lsb/init-functions
      + FANCYTTY=
      + [ -e /etc/lsb-base-logging.sh ]
      + . /etc/lsb-base-logging.sh
      + LOG_DAEMON_MSG=
      + [ no != no ]
      + do_stop
      + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile /var/run/puppetdb.pid --exec /usr/lib/jvm/java-7-openjdk-amd64/bin/java
      + RETVAL=1
      + [ 1 = 2 ]
      + rm -f /var/run/puppetdb.pid
      + return 1
      + [ no != no ]
      + :
      # cat /var/run/puppetdb.pid
      cat: /var/run/puppetdb.pid: No such file or directory
      # ps auwx | grep puppetdb
      puppetdb 17556  1.8 15.1 2612136 309684 ?      Sl   Mar28 1384:31 /usr/bin/java -XX:OnOutOfMemoryError=kill -9 %p -Xmx192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/puppetdb/puppetdb-oom.hprof -jar /usr/share/puppetdb/puppetdb.jar services -c /etc/puppetdb/conf.d
      # kill 17556
      # ps auwx | grep puppetdb
      root     20017  0.0  0.0   9412   940 pts/4    S+   13:48   0:00 grep puppetdb
      # /etc/init.d/puppetdb restart
       * Restarting puppetdb centralized storage daemon puppetdb                                                                                             [ OK ]
      # ps auwx | grep puppetdb
      puppetdb 20053  154  3.9 1395128 79508 ?       Sl   13:48   0:03 /usr/lib/jvm/java-7-openjdk-amd64/bin/java -XX:OnOutOfMemoryError=kill -9 %p -Xmx192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/puppetdb/puppetdb-oom.hprof -Djava.security.egd=file:/dev/urandom -cp /usr/share/puppetdb/puppetdb.jar clojure.main -m com.puppetlabs.puppetdb.core services -c /etc/puppetdb/conf.d
      #
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  melissa Melissa Stone
                  Reporter:
                  alex.jurkiewicz Alex Jurkiewicz
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: