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

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

XMLWordPrintable

    • 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.

       

        1. jenkins-output.txt
          12 kB
          Joe Mihalich
        2. status-output.txt
          8 kB
          Joe Mihalich

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

              Created:
              Updated:
              Resolved: