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

Jenkins fails to start with Java 9 / 10 on Debian / Ubuntu

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • None
    • Debian 8.5

      java version "1.8.0_91"
      Java(TM) SE Runtime Environment (build 1.8.0_91-b14)

      Jenkins 2.14
    • Jenkins 2.164.1

      After running apt-get update / upgrade and Jenkins is updated from 2.13 to 2.14 by the package, it failed to start.

      I have also noticed this in previous 2.x upgrades as well. After I reboot my system, it loads correctly.

      sudo systemctl status jenkins.service
      ● jenkins.service - LSB: Start Jenkins at boot time
      Loaded: loaded (/etc/init.d/jenkins)
      Active: failed (Result: exit-code) since Tue 2016-07-19 05:58:50 EDT; 41s ago
      Process: 2079 ExecStop=/etc/init.d/jenkins stop (code=exited, status=0/SUCCESS )
      Process: 2120 ExecStart=/etc/init.d/jenkins start (code=exited, status=7)

      su[2135]: Successful su for jenkins by root
      su[2135]: + ??? root:jenkins
      su[2135]: pam_unix(su:session): session opened for u...0)
      jenkins[2120]: Starting Jenkins Continuous Integrati...d!
      systemd[1]: jenkins.service: control process exited,...=7
      systemd[1]: Failed to start LSB: Start Jenkins at bo...e.
      systemd[1]: Unit jenkins.service entered failed state.

          [JENKINS-36792] Jenkins fails to start with Java 9 / 10 on Debian / Ubuntu

          x added a comment -

          Hello,

          I'm a new Jenkins user, in fact, I'm having issues with the installation. I've read the docs (https://jenkins.io/doc/book/installing/) and followed them to the letter. I purged the installation and tried again. I rebooted a couple of times. I tried also to look for extra information and various web searches led me here (and also to Stack Exchange and Server Fault, but those solutions didn't help). The symptoms in this JIRA bug match exactly what I'm seeing with my Ubuntu installation.

          My research:

          https://stackoverflow.com/questions/10133964/jenkins-failed-to-start-in-linux?noredirect=1&lq=1

          https://stackoverflow.com/questions/39621263/jenkins-fails-when-running-service-start-jenkins#45430023

          https://groups.google.com/forum/#!msg/jenkinsci-users/eW_yEWLojFc/tFhb8DKoRHUJ

          During my latest attempt I used a book about Jenkins, where the author suggested the following steps:

          setting_up_jenkins.txt

          A fragment from my shell follows:

          jenkins_service_not_starting.txt

          The service is having issues with starting.

          I'm using Ubuntu 16.04.1, x64 architecture.

          My Java version:

          td@topaz:/var/log/jenkins$ update-java-alternatives -l
          java-1.8.0-openjdk-amd64 1081 /usr/lib/jvm/java-1.8.0-openjdk-amd64

          The package Ubuntu fetched:

          {{jenkins/binary,now 2.108 all [installed] }}

          Sadly, the logfile in /var/log/jenkins is empty.

          Could you please point me to other places where I can find more information? Are there some diagnostic tools or extra logs I can digest and paste here?

          I'm not sure if this is important, but when using the Docker image I installed yesterday, Jenkins runs just fine (however, I'm much more interested in a bare metal install).

          x added a comment - Hello, I'm a new Jenkins user, in fact, I'm having issues with the installation. I've read the docs ( https://jenkins.io/doc/book/installing/ ) and followed them to the letter. I purged the installation and tried again. I rebooted a couple of times. I tried also to look for extra information and various web searches led me here (and also to Stack Exchange and Server Fault, but those solutions didn't help). The symptoms in this JIRA bug match exactly what I'm seeing with my Ubuntu installation. My research: https://stackoverflow.com/questions/10133964/jenkins-failed-to-start-in-linux?noredirect=1&lq=1 https://stackoverflow.com/questions/39621263/jenkins-fails-when-running-service-start-jenkins#45430023 https://groups.google.com/forum/#!msg/jenkinsci-users/eW_yEWLojFc/tFhb8DKoRHUJ During my latest attempt I used a book about Jenkins, where the author suggested the following steps: setting_up_jenkins.txt A fragment from my shell follows: jenkins_service_not_starting.txt The service is having issues with starting. I'm using Ubuntu 16.04.1, x64 architecture. My Java version: td@topaz:/var/log/jenkins$ update-java-alternatives -l java-1.8.0-openjdk-amd64 1081 /usr/lib/jvm/java-1.8.0-openjdk-amd64 The package Ubuntu fetched: {{jenkins/binary,now 2.108 all [installed] }} Sadly, the logfile in /var/log/jenkins is empty. Could you please point me to other places where I can find more information? Are there some diagnostic tools or extra logs I can digest and paste here? I'm not sure if this is important, but when using the Docker image I installed yesterday, Jenkins runs just fine (however, I'm much more interested in a bare metal install).

          leo li added a comment -
          ➜  ~ sudo service jenkins start          
          Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
          ➜  ~ 
          ➜  ~ sudo service jenkins start
          Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
          ➜  ~ systemctl status jenkins.service
          ● jenkins.service - LSB: Start Jenkins at boot time
             Loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled)
             Active: failed (Result: exit-code) since 四 2018-04-12 03:57:04 EDT; 18s ago
               Docs: man:systemd-sysv-generator(8)
            Process: 31304 ExecStart=/etc/init.d/jenkins start (code=exited, status=7)
          
          4月 12 03:57:03 trinite systemd[1]: Starting LSB: Start Jenkins at boot time...
          4月 12 03:57:03 trinite jenkins[31304]:  * Starting Jenkins Automation Server jenkins
          4月 12 03:57:03 trinite su[31322]: Successful su for jenkins by root
          4月 12 03:57:03 trinite su[31322]: + ??? root:jenkins
          4月 12 03:57:03 trinite su[31322]: pam_unix(su:session): session opened for user jenkins by (uid=0)
          4月 12 03:57:04 trinite jenkins[31304]:    ...fail!
          4月 12 03:57:04 trinite systemd[1]: jenkins.service: Control process exited, code=exited status=7
          4月 12 03:57:04 trinite systemd[1]: Failed to start LSB: Start Jenkins at boot time.
          4月 12 03:57:04 trinite systemd[1]: jenkins.service: Unit entered failed state.
          4月 12 03:57:04 trinite systemd[1]: jenkins.service: Failed with result 'exit-code'.
          

          i have the same issue, and i can't figure out why even do a lot search in google? , please help, thx.

          leo li added a comment - ➜ ~ sudo service jenkins start Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details. ➜ ~ ➜ ~ sudo service jenkins start Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details. ➜ ~ systemctl status jenkins.service ● jenkins.service - LSB: Start Jenkins at boot time Loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled) Active: failed (Result: exit-code) since 四 2018-04-12 03:57:04 EDT; 18s ago Docs: man:systemd-sysv-generator(8) Process : 31304 ExecStart=/etc/init.d/jenkins start (code=exited, status=7) 4月 12 03:57:03 trinite systemd[1]: Starting LSB: Start Jenkins at boot time... 4月 12 03:57:03 trinite jenkins[31304]: * Starting Jenkins Automation Server jenkins 4月 12 03:57:03 trinite su[31322]: Successful su for jenkins by root 4月 12 03:57:03 trinite su[31322]: + ??? root:jenkins 4月 12 03:57:03 trinite su[31322]: pam_unix(su:session): session opened for user jenkins by (uid=0) 4月 12 03:57:04 trinite jenkins[31304]: ...fail! 4月 12 03:57:04 trinite systemd[1]: jenkins.service: Control process exited, code=exited status=7 4月 12 03:57:04 trinite systemd[1]: Failed to start LSB: Start Jenkins at boot time. 4月 12 03:57:04 trinite systemd[1]: jenkins.service: Unit entered failed state. 4月 12 03:57:04 trinite systemd[1]: jenkins.service: Failed with result 'exit-code' . i have the same issue, and i can't figure out why even do a lot search in google? , please help, thx.

          andy Lieblch added a comment -

          leo_rd - not sure if this will help you at all, but switching from java 9 to java 8 fixed this for me.

          andy Lieblch added a comment - leo_rd - not sure if this will help you at all, but switching from java 9 to java 8 fixed this for me.

          leo li added a comment -

          andy123 i am always running jenkins under java 8, it's works fine for a log time, just can't start after last reboot

          leo li added a comment - andy123 i am always running jenkins under java 8, it's works fine for a log time, just can't start after last reboot

          daytonpa Any clues? Hit me as well, it's open for a couple of years.

          Antony Gelberg added a comment - daytonpa Any clues? Hit me as well, it's open for a couple of years.

          Patrick Dayton added a comment - - edited

          I have no idea why I was assigned to this.  I don't do anything regarding development with Jenkins, except simply use it.  What's the output from

          `cat /var/log/jenkins`?

          Patrick Dayton added a comment - - edited I have no idea why I was assigned to this.  I don't do anything regarding development with Jenkins, except simply use it.  What's the output from `cat /var/log/jenkins`?

          daytonpa We already deleted the log. NB Moving to Java 8 solved the problem (I had been using Java 10, Ubuntu 18.04). I'll edit the bug title and unassign, hopefully it will get picked up. I don't even know if newer Javas are supported.

          Antony Gelberg added a comment - daytonpa We already deleted the log. NB Moving to Java 8 solved the problem (I had been using Java 10, Ubuntu 18.04). I'll edit the bug title and unassign, hopefully it will get picked up. I don't even know if newer Javas are supported.

          Devin Nusbaum added a comment - - edited

          antgel Jenkins does not currently support Java 9+. JENKINS-40689 is an epic that aggregates many of the specific issues that occur in newer Java versions, so feel free to follow that instead and add any new issues that are not already in the list.

          When running Jenkins 2.111 or newer directly via the war (java -jar jenkins.war) fails because of the Java version, you should get a message on stderr that explains that Java 8 is required. See JENKINS-49737. If that isn't working for you then it might be worth opening a new issue either as a feature request if you aren't running the war directly or a bug if you are running it directly.

          Devin Nusbaum added a comment - - edited antgel  Jenkins does not currently support Java 9+. JENKINS-40689 is an epic that aggregates many of the specific issues that occur in newer Java versions, so feel free to follow that instead and add any new issues that are not already in the list. When running Jenkins 2.111 or newer directly via the war ( java -jar jenkins.war ) fails because of the Java version, you should get a message on stderr that explains that Java 8 is required. See  JENKINS-49737 . If that isn't working for you then it might be worth opening a new issue either as a feature request if you aren't running the war directly or a bug if you are running it directly.

          dnusbaum Thanks for the info. No such message from the Debian package - I think people will end up here, I changed the title to suit.

          Antony Gelberg added a comment - dnusbaum Thanks for the info. No such message from the Debian package - I think people will end up here, I changed the title to suit.

          I'm currently facing the same issue on Ubuntu 18.04.01 LTS

          kamal laungani added a comment - I'm currently facing the same issue on Ubuntu 18.04.01 LTS

            Unassigned Unassigned
            audiotech520 Shawn M
            Votes:
            4 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: