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

The latest debian installers 2.164+ do not work with java 11.

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      2.175

      Description

      it's hard to believe i'm the only one experiencing this.  The debian package installer is completely broken for java 11 starting with the supported 2.164.x releases.  When installing on Ubuntu 18.04 with (in my case) openjdk-11-jdk installed, you get the following error:

       

      Unpacking jenkins (2.164.2) ...
      Setting up jenkins (2.264.2) ...
      Job for jenkins.service failed because the control process exited with error code.
      See "systemctl status jenkins.service" and "journalctl -xe" for details.
      invoke-rc.d: initscript jenkins, action "start" failed.
      ● jenkins.service - LSB: Start Jenkins at boot time
         Loaded: loaded (/etc/init.d/jenkins; generated)
         Active: failed (Result: exit-code) since Thu 2019-04-18 04:47:26 UTC; 5ms ago
           Docs: man:systemd-sysv-generator(8)
        Process: 9040 ExecStart=/etc/init.d/jenkins start (code=exited, status=1/FAILURE)Apr 18 04:47:26 ip-10-0-109-178 systemd[1]: Starting LSB: Start Jenkins at boot time...
      Apr 18 04:47:26 ip-10-0-109-178 jenkins[9040]: Found an incorrect Java version
      Apr 18 04:47:26 ip-10-0-109-178 jenkins[9040]: Java version found:
      Apr 18 04:47:26 ip-10-0-109-178 jenkins[9040]: openjdk version "11.0.2" 2019-01-15
      Apr 18 04:47:26 ip-10-0-109-178 jenkins[9040]: OpenJDK Runtime Environment (build 11.0.2+9-Ubuntu-3ubuntu118.04.3)
      Apr 18 04:47:26 ip-10-0-109-178 jenkins[9040]: OpenJDK 64-Bit Server VM (build 11.0.2+9-Ubuntu-3ubuntu118.04.3, mixed mode, sharing)
      Apr 18 04:47:26 ip-10-0-109-178 jenkins[9040]: Aborting
      Apr 18 04:47:26 ip-10-0-109-178 systemd[1]: jenkins.service: Control process exited, code=exited status=1
      Apr 18 04:47:26 ip-10-0-109-178 systemd[1]: jenkins.service: Failed with result 'exit-code'.
      Apr 18 04:47:26 ip-10-0-109-178 systemd[1]: Failed to start LSB: Start Jenkins at boot time.
      

      inspection of the jenkins init script in /etc/init.d/jenkins reveals the isssue:

      JAVA_ALLOWED_VERSION="18"
      
      ...
      
      # Work out the JAVA version we are working with:
      JAVA_VERSION=$($JAVA -version 2>&1 | sed -n ';s/.* version "\(.*\)\.\(.*\)\..*"/\1\2/p;')
      if [ "$JAVA_VERSION" = "$JAVA_ALLOWED_VERSION" ]; then
          echo "Correct java version found" >&2
      else
          echo "Found an incorrect Java version" >&2
          echo "Java version found:" >&2
          echo $($JAVA -version) >&2
          echo "Aborting" >&2
          exit 1
      fi
      

      Obviously the first problem is you're only allowing version 18.  

      The second problem is, the value of JAVA_VERSION after that command with java 11 installed is: "110 2019-01-15".  So that command is completely broken for java 11.

      With this busted, there's no 'official' way for me to install this on Ubuntu right now.

       

        Attachments

          Activity

          Hide
          songkoh Song Koh added a comment -

          I verify that jenkins-2.175 works with java 11 in "Linux Mint 19.1 Tessa"

           

          $ dpkg --list jenkins*
          Desired=Unknown/Install/Remove/Purge/Hold

          Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
          / Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
          / Name Version Architecture Description
          +++=======================================================================
          ii jenkins 2.175 all Jenkins is an open source automat

          $ java -version
          openjdk version "11.0.2" 2019-01-15
          OpenJDK Runtime Environment (build 11.0.2+9-Ubuntu-3ubuntu118.04.3)
          OpenJDK 64-Bit Server VM (build 11.0.2+9-Ubuntu-3ubuntu118.04.3, mixed mode, sharing)

           

          Show
          songkoh Song Koh added a comment - I verify that jenkins-2.175 works with java 11 in "Linux Mint 19.1 Tessa"   $ dpkg --list jenkins* Desired=Unknown/Install/Remove/Purge/Hold Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend / Err?=(none)/Reinst-required (Status,Err: uppercase=bad) / Name Version Architecture Description +++ ============== ============ ============ ================================= ii jenkins 2.175 all Jenkins is an open source automat $ java -version openjdk version "11.0.2" 2019-01-15 OpenJDK Runtime Environment (build 11.0.2+9-Ubuntu-3ubuntu118.04.3) OpenJDK 64-Bit Server VM (build 11.0.2+9-Ubuntu-3ubuntu118.04.3, mixed mode, sharing)  
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Thanks for the update!

          Show
          oleg_nenashev Oleg Nenashev added a comment - Thanks for the update!
          Hide
          jmihalich Joe Mihalich added a comment -

          Not sure what changed, but it is now working with Ubuntu 18.04 and openjdk 11.  Thanks for getting this working.

           

          Show
          jmihalich Joe Mihalich added a comment - Not sure what changed, but it is now working with Ubuntu 18.04 and openjdk 11.  Thanks for getting this working.  
          Hide
          olivergondza Oliver Gondža added a comment -

          I have backported this to be picked up by 2.164.3 during tomorrows release.

          Show
          olivergondza Oliver Gondža added a comment - I have backported this to be picked up by 2.164.3 during tomorrows release.
          Hide
          juddmon Judd Montgomery added a comment -

          I am wanting to use Amazon Corretto JDK 11 on Ubuntu and want to try out 2.164.3.  Is it going to be released today?

          Show
          juddmon Judd Montgomery added a comment - I am wanting to use Amazon Corretto JDK 11 on Ubuntu and want to try out 2.164.3.  Is it going to be released today?

            People

            • Assignee:
              alecharp Adrien Lecharpentier
              Reporter:
              jmihalich Joe Mihalich
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: