-
Bug
-
Resolution: Fixed
-
Major
-
None
Jenkins 2.54 started requiring Java 8 [1], but the 2.54 package in the Jenkins-provided Debian package repository [2] still depends on openjdk-7-jre-headless. This means that on distros that do not provide Java 8 the package will successfully update but fail to start.
[1] https://jenkins.io/blog/2017/04/10/jenkins-has-upgraded-to-java-8/
[2] https://pkg.jenkins.io/debian
- jenkins.err.log
- 5.18 MB
- Dave Miller
- jenkins.wrapper.log
- 160 kB
- Dave Miller
- is duplicated by
-
JENKINS-43609 Got "HTTP ERROR: 503" when starting Jenkins on Ubuntu 14.04 LTS
-
- Closed
-
- is related to
-
JENKINS-43629 Unable to upgrade Jenkins on Ubuntu 14.04 LTS using 'apt-get upgrade' - The following packages have been kept back
-
- Closed
-
[JENKINS-43495] Debian packages depend on Java 7 even though Jenkins requires Java 8
In case you are trying to start Jenkins 2.54 with OpenJDK 7 the Jetty servlet container is complaining about an java.lang.UnsupportedClassVersionError
WARNING: Failed startup of context w.@6cedb374{/,file:/var/cache/jenkins/war/,STARTING}{/var/cache/jenkins/war} java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:85) at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:72) at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:408) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1340) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) at org.eclipse.jetty.server.Server.start(Server.java:387) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) at org.eclipse.jetty.server.Server.doStart(Server.java:354) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at winstone.Launcher.<init>(Launcher.java:152) at winstone.Launcher.main(Launcher.java:352) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at Main._main(Main.java:264) at Main.main(Main.java:112) Caused by: java.lang.UnsupportedClassVersionError: jenkins/util/SystemProperties : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:803) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:442) at java.net.URLClassLoader.access$100(URLClassLoader.java:64) at java.net.URLClassLoader$1.run(URLClassLoader.java:354) at java.net.URLClassLoader$1.run(URLClassLoader.java:348) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:347) at org.eclipse.jetty.webapp.WebAppClassLoader.findClass(WebAppClassLoader.java:510) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:441) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403) at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1583) at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1956) ... 25 more
the Depends section in the deb package's control file should be updated to
Depends: daemon, adduser, procps, psmisc, net-tools, default-jre-headless (>= 2:1.8) | java8-runtime-headless
Unassigning to let anyone work on it if she/he can do that more diligently than me.
Repository is https://github.com/jenkinsci/packaging FWIW (I had a quick look yesterday, and many packagings need updating, not only debian).
Could you please unpublish the 2.54 release from the debian repository until this is resolved?
To not let more people run into this problem unnecessarily.
Code changed in jenkins
User: Oleg Nenashev
Path:
deb/build/debian/control
http://jenkins-ci.org/commit/packaging/70ac244a0f102365fdc60bba0eae429fc4be8eca
Log:
JENKINS-43495 - Updated Java dependency to Java 8
Code changed in jenkins
User: Sam Van Oort
Path:
deb/build/debian/control
http://jenkins-ci.org/commit/packaging/38cd5d982737a91d92125b377e32babd9d713d8f
Log:
Merge pull request #95 from oleg-nenashev/JENKINS-43495
JENKINS-43495 - Updated Java dependency to Java 8
Compare: https://github.com/jenkinsci/packaging/compare/eb7579d4d394...38cd5d982737
sftp pkg.jenkins-ci.org
rm jenkins_2.54_all.deb
would be a matter of minutes.
More people updating jenkins on debian between now and sunday, scratching their heads, wondering what broke their jenkins, means a lot more wasted time.
Also note that package managers will likely update to 2.54, because they know they can't go any further due to the dependency change, potentially leaving more systems broken even after a new version is released.
I have verified the fix in 2.55 package, it requires Java 8 now.
Regarding the 2.54 package, I suggest creating an INFRA ticket if you want it to be depublished.
When I try to install the new version 2.55, I get the same 503 "Service Unavailable" error that I received when trying to install version 2.54. The server where Jenkins is installed has Java 8 on it. I have to revert back to 2.53 to get Jenkins to work. Am I missing something here?
millda4 Please provide Jenkins system logs with info about startup. If there is no logs, Jenkins likely does not get started at all. In such case it would be great if you run the service start script with "-ex" in order to get a startup trace.
millda4 You provided Windows logs to the issue reported to Debian packaging... Maybe you want to comment in JENKINS-43499, which is still open
I have attached the jenkins.wrapper.log and jenkins.err.log files. Jenkins was installed by somebody else who is no longer with our company, so I "inherited" the setup. It was installed as a service that gets automatically started every time that server is rebooted. I know that server does have Java 8 on it.
C:\>java -version
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)
If different logs are needed, please let me know.
millda4, Please continue the discussion in the Ticket for Windows and provide the info you have there. You definitely have wrong Java version on the master: "Caused by: java.lang.UnsupportedClassVersionError: jenkins/util/SystemProperties : Unsupported major.minor version 52.0" in your log.
Please excuse the dumb question, but what and where is the "Ticket for Windows"? I don't post messages here very often, so I don't know my way around. Is it a separate forum?
I have referenced JENKINS-43499 above.
This site is not a forum, it is a bugtracker. And this particular bug is for Debian, not for Windows.
Please remove Jenkins 2.54 from apt/pkg.jenkins-ci.org. All Ubuntu 14.04 users will run into this issue as there is no Java 8 available for 14.04 by default so this will be the version these users will be stuck on (unless they install Java 8 via the proper PPA). They will be wondering why Jenkins is broken and why apt is refusing to update.
See also JENKINS-43629
jbogers As I have written above, you should create an INFRA ticket for it. This issue is not "just delete it", so it requires involvement of the INFRA team
Code changed in jenkins
User: Sam Van Oort
Path:
deb/build/debian/control
http://jenkins-ci.org/commit/packaging/887711072814b0033e490d7cda031ef64ba87c94
Log:
Revert "JENKINS-43495 - Updated Java dependency to Java 8"
This reverts commit 70ac244a0f102365fdc60bba0eae429fc4be8eca.
Just in case millda4 is a former coworker dealing with a machine I installed, the solution is as follows on an Ubuntu 14.04 machine (all as root):
add-apt-repository ppa:openjdk-r/ppa apt-get update apt-get install openjdk-8-jre openjdk-8-jre-headless openjdk-8-jdk apt-get remove --purge openjdk-7-jre openjdk-7-jre-headless openjdk-7-jdk apt-get dist-upgrade
And that should update jenkins to the latest released version.
Fyi, i have succeed in running jenkins 2.54 on debian jessie by using openjdk-8-jre-headless from backports, and update-alternatives to config java 8.
But this is clearly not a clean situation