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

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

    • 2.175

      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.

       

          [JENKINS-57096] The latest debian installers 2.164+ do not work with java 11.

          Song Koh added a comment -

          DISTRIB_ID=LinuxMint
          DISTRIB_RELEASE=19.1
          DISTRIB_CODENAME=tessa
          DISTRIB_DESCRIPTION="Linux Mint 19.1 Tessa"

           

          Song Koh added a comment - DISTRIB_ID=LinuxMint DISTRIB_RELEASE=19.1 DISTRIB_CODENAME=tessa DISTRIB_DESCRIPTION="Linux Mint 19.1 Tessa"  

          Oleg Nenashev added a comment - - edited

          So it happens due to the change in the java -version format. It explains how I missed it in the test. But I confirm that recent JDK vesions return a different format:

           

           

          C:\Users\Oleg\Documents\jenkins\demo\demo-jenkins-config-as-code>java -version
          java version "1.8.0_201"
          Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
          Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
          C:\Users\Oleg\Documents\jenkins\demo\demo-jenkins-config-as-code>C:\Tools\jdk-11.0.2\bin\java.exe -version
          openjdk version "11.0.2" 2019-01-15
          OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
          OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
          

           

           

          Patch from alecharp in https://github.com/jenkinsci/packaging/pull/117 should workaround the issue.

           

           

          Oleg Nenashev added a comment - - edited So it happens due to the change in the java -version format. It explains how I missed it in the test. But I confirm that recent JDK vesions return a different format:     C:\Users\Oleg\Documents\jenkins\demo\demo-jenkins-config-as-code>java -version java version "1.8.0_201" Java(TM) SE Runtime Environment (build 1.8.0_201-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode) C:\Users\Oleg\Documents\jenkins\demo\demo-jenkins-config-as-code>C:\Tools\jdk-11.0.2\bin\java.exe -version openjdk version "11.0.2" 2019-01-15 OpenJDK Runtime Environment 18.9 (build 11.0.2+9) OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)     Patch from alecharp in https://github.com/jenkinsci/packaging/pull/117  should workaround the issue.    

          Oleg Nenashev added a comment -

          The target Jenkins release is 2.175, LTS backporting is not clear for packaging. CC olivergondza

          Oleg Nenashev added a comment - The target Jenkins release is 2.175, LTS backporting is not clear for packaging. CC olivergondza

          oleg_nenashev, packaging fixes for current line can be backported to https://github.com/jenkinsci/packaging/tree/stable-2.164. Mind the feature is not covered by the certifications pipeline so will have to be tested manually.

          In case you would consider backporting this, note the release is in less than 2 weeks. I would like to have things either omitted or ready to go in that branch by 2019-05-08 for KK to cut the release cleanly (mint it is a public holiday for part of us).

          Oliver Gondža added a comment - oleg_nenashev , packaging fixes for current line can be backported to https://github.com/jenkinsci/packaging/tree/stable-2.164 . Mind the feature is not covered by the certifications pipeline so will have to be tested manually. In case you would consider backporting this, note the release is in less than 2 weeks. I would like to have things either omitted or ready to go in that branch by 2019-05-08 for KK to cut the release cleanly (mint it is a public holiday for part of us).

          olivergondza I'd vote to backport this fix. The LTS package for Debian/Ubuntu is currently broken with Java 11. However, we stated that this LTS is the first one to support Java 11 runtime.

          Adrien Lecharpentier added a comment - olivergondza I'd vote to backport this fix. The LTS package for Debian/Ubuntu is currently broken with Java 11. However, we stated that this LTS is the first one to support Java 11 runtime.

          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)

           

          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)  

          Oleg Nenashev added a comment -

          Thanks for the update!

          Oleg Nenashev added a comment - Thanks for the update!

          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.

           

          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.  

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

          Oliver Gondža added a comment - I have backported this to be picked up by 2.164.3 during tomorrows release.

          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?

          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?

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

              Created:
              Updated:
              Resolved: