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

Debian init script says: [OK] when failing on port check.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Ubuntu 14.04 x86_64
    • Similar Issues:

      Description

      After installing Jenkins from the repositories given on the site, I attempted to start the service by running:

      $ sudo service jenkins start

      The problem is that even though it spits out the error message:

      The selected http port (8080) seems to be in use by another program
      Please select another port to use for jenkins

      It ends by telling the user that everything went just as expected:

      • Starting Jenkins Continuous Integration Server jenkins [ OK ]

        Attachments

          Activity

          Hide
          rovanion Rovanion Luckey added a comment -

          The config is sourced as the fifth active line in the init script. Though I'm wondering about the line in function do_start() which reads:

          check_tcp_port "http" "$HTTP_PORT" "8080" || return 2

          I'm wondering why 8080 is there as well as $HTTP_PORT.

          Show
          rovanion Rovanion Luckey added a comment - The config is sourced as the fifth active line in the init script. Though I'm wondering about the line in function do_start() which reads: check_tcp_port "http" "$HTTP_PORT" "8080" || return 2 I'm wondering why 8080 is there as well as $HTTP_PORT.
          Hide
          danielbeck Daniel Beck added a comment -

          8080 is the default used when HTTP_PORT is empty, so it's passed as an alternative port to check. The function is defined in the same file.

          (Of course one possible issue would be behavior with HTTP_PORT=-1, but that's an unrelated different issue.)

          Show
          danielbeck Daniel Beck added a comment - 8080 is the default used when HTTP_PORT is empty, so it's passed as an alternative port to check. The function is defined in the same file. (Of course one possible issue would be behavior with HTTP_PORT=-1, but that's an unrelated different issue.)
          Hide
          rovanion Rovanion Luckey added a comment -

          Ah, well then's everything fine and dandy! Have a great friday!

          Show
          rovanion Rovanion Luckey added a comment - Ah, well then's everything fine and dandy! Have a great friday!
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #3718
          [FIXED JENKINS-24966] Return failure when port is in use (Revision 2b6c00db3406c753291ff00ccd16d64ad5f92a78)

          Result = SUCCESS
          daniel-beck : 2b6c00db3406c753291ff00ccd16d64ad5f92a78
          Files :

          • debian/debian/jenkins.init
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3718 [FIXED JENKINS-24966] Return failure when port is in use (Revision 2b6c00db3406c753291ff00ccd16d64ad5f92a78) Result = SUCCESS daniel-beck : 2b6c00db3406c753291ff00ccd16d64ad5f92a78 Files : debian/debian/jenkins.init
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Beck
          Path:
          debian/jenkins.init
          http://jenkins-ci.org/commit/packaging/e28110f5e5c423f9a826fe1f5a07fdae52f1348f
          Log:
          [FIXED JENKINS-24966] Return failure when port is in use

          Both 0 and 1 are used to indicate some kind of success (the latter when Jenkins doesn't need to be started because it was already running), so we need to return 2.
          Originally-From: jenkins-ci.org/commit/core/2b6c00db3406c753291ff00ccd16d64ad5f92a78

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: debian/jenkins.init http://jenkins-ci.org/commit/packaging/e28110f5e5c423f9a826fe1f5a07fdae52f1348f Log: [FIXED JENKINS-24966] Return failure when port is in use Both 0 and 1 are used to indicate some kind of success (the latter when Jenkins doesn't need to be started because it was already running), so we need to return 2. Originally-From: jenkins-ci.org/commit/core/2b6c00db3406c753291ff00ccd16d64ad5f92a78

            People

            Assignee:
            danielbeck Daniel Beck
            Reporter:
            rovanion Rovanion Luckey
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: