timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

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

Closed timja closed 4 years ago

timja commented 8 years ago

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.


Originally reported by audiotech520, imported from: Jenkins fails to start with Java 9 / 10 on Debian / Ubuntu
  • status: Closed
  • priority: Critical
  • resolution: Fixed
  • resolved: 2020-01-28T09:31:20+00:00
  • imported: 2022/01/10
timja commented 8 years ago

danielbeck:

Not enough information to investigate further. Doesn't even mention the Jenkins version.

timja commented 8 years ago

danielbeck:

Jenkins.log output is missing.

timja commented 8 years ago

audiotech520:

Jul 19, 2016 5:52:32 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Logging initialized @546ms
Jul 19, 2016 5:52:32 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
Jul 19, 2016 5:52:33 AM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Empty contextPath
Jul 19, 2016 5:52:33 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: jetty-9.2.z-SNAPSHOT
Jul 19, 2016 5:52:34 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
Jenkins home directory: /var/lib/jenkins found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
Jul 19, 2016 5:52:34 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started w.@19fb8826

{/,file:/var/cache/jenkins/war/,AVAILABLE} {/var/cache/jenkins/war}

Jul 19, 2016 5:52:34 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started ServerConnector@3d484181

{HTTP/1.1} {0.0.0.0:8080}

Jul 19, 2016 5:52:34 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started @2890ms
Jul 19, 2016 5:52:34 AM winstone.Logger logInternal
INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled
Jul 19, 2016 5:52:34 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Jul 19, 2016 5:52:35 AM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
#

  1. A fatal error has been detected by the Java Runtime Environment:
    #
  2. SIGSEGV (0xb) at pc=0x00007f664e80ad1d, pid=1791, tid=140076942526208
    #
  3. JRE version: Java(TM) SE Runtime Environment (8.0_91-b14) (build 1.8.0_91-b14)
  4. Java VM: Java HotSpot(TM) 64-Bit Server VM (25.91-b14 mixed mode linux-amd64 compressed oops)
  5. Problematic frame:
  6. V [libjvm.so+0x56cd1d] PhaseIdealLoop::Dominators()+0x63d
    #
  7. Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
    #
  8. An error report file with more information is saved as:
  9. /tmp/hs_err_pid1791.log
    #
  10. Compiler replay data is saved as:
  11. /tmp/replay_pid1791.log
    #
  12. If you would like to submit a bug report, please visit:
  13. http://bugreport.java.com/bugreport/crash.jsp
    #
    #
  14. A fatal error has been detected by the Java Runtime Environment:
    #
  15. SIGSEGV (0xb) at pc=0x00007f8716c90fea, pid=2145, tid=140217335858944
    #
  16. JRE version: Java(TM) SE Runtime Environment (8.0_91-b14) (build 1.8.0_91-b14)
  17. Java VM: Java HotSpot(TM) 64-Bit Server VM (25.91-b14 mixed mode linux-amd64 compressed oops)
  18. Problematic frame:
  19. V [libjvm.so+0x962fea] Node::replace_by(Node*)+0x3a
    #
  20. Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
    #
  21. An error report file with more information is saved as:
  22. /tmp/hs_err_pid2145.log
    #
  23. Compiler replay data is saved as:
  24. /tmp/replay_pid2145.log
    #
  25. If you would like to submit a bug report, please visit:
  26. http://bugreport.java.com/bugreport/crash.jsp
    #
timja commented 8 years ago

danielbeck:

Wow, that should not happen.

I recommend you ask on the users mailing list, maybe someone has seen this before.

timja commented 7 years ago

oleg_nenashev:

IMHO we cannot diagnose it in the current state. I do not see the follow-up in mailing lists

timja commented 7 years ago

code:

I am getting this error and Jenkins will not start after updating to v2.71 from v2.70

timja commented 7 years ago

oleg_nenashev:

Please provide the requested diagnostics info then

timja commented 6 years ago

tangodev:

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

timja commented 6 years ago

leo_rd:

➜  ~ 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.

timja commented 6 years ago

andy123:

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

timja commented 6 years ago

leo_rd:

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

timja commented 6 years ago

antgel:

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

timja commented 6 years ago

daytonpa:

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`?

timja commented 6 years ago

antgel:

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.

timja commented 6 years ago

dnusbaum:

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.

timja commented 6 years ago

antgel:

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.

timja commented 6 years ago

launganik:

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