Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31814

dpkg error installing jenkins 1.639 on debian platforms

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • packaging
    • None

      When installing Jenkins 1.639 from the jenkins-ci.org repository on a debian based system, I receive the following error during the installation:

      Setting up jenkins (1.639) ...
       * Starting Jenkins Continuous Integration Server jenkins                                     [fail]
      invoke-rc.d: initscript jenkins, action "start" failed.
      dpkg: error processing package jenkins (--configure):
       subprocess installed post-installation script returned error exit status 7}}
      

      Tested against:

      • Ubuntu 14.04
      • Debian 8.1

      This same failure does not happen when installing the older 1.635 package. The issue appears to be with the get_running function which is called by the do_check_started_ok function in the init script. It seems get_running is returning an exit code of 2, which in turn causes the init script to exit 7. Here's a diff of the two init scripts.

      $ diff ~/jenkins.1.639.sh ~/jenkins.1.635.sh
      183,194d182
      < # Verify the process did in fact start successfully and didn't just bomb out
      < do_check_started_ok() {
      <     sleep 1
      <     if [ "$1" -ne "0" ]; then return $1; fi
      <     get_running
      <     if [ "$?" -eq "0" ]; then
      <         return 2
      <     else
      <         return 0
      <     fi
      < }
      <
      199,200d186
      <     START_STATUS="$?"
      <     do_check_started_ok "$START_STATUS"
      203c189
      <         2) log_end_msg 1 ; exit 7 ;;
      ---
      >         2) log_end_msg 1 ;;
      211c197
      <         2) log_end_msg 1 ; exit 100 ;;
      ---
      >         2) log_end_msg 1 ;;
      224,226d209
      <         START_STATUS="$?"
      <         sleep 1
      <         do_check_started_ok "$START_STATUS"
      229,230c212,213
      <           1) log_end_msg 1 ; exit 100 ;; # Old process is still running
      <           *) log_end_msg 1 ; exit 100 ;; # Failed to start
      ---
      >           1) log_end_msg 1 ;; # Old process is still running
      >           *) log_end_msg 1 ;; # Failed to start
      

            svanoort Sam Van Oort
            brandocorp Brandon Raabe
            Votes:
            4 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated: