1

I'm setting up Jenkins for the first time.

HTTP ERROR: 503 Problem accessing /. Reason: Service Unavailable

I turned off firewalld. The jenkins came from the official jenkins yum repo.

java version "1.7.0_79" OpenJDK Runtime Environment (rhel-2.5.5.1.el7_1-x86_64 u79-b14) OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

May 05, 2015 9:59:54 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Failed startup of context w.{,file:/var/cache/jenkins/war/},/var/cache/jenkins/war
java.lang.NullPointerException
        at jenkins.util.groovy.GroovyHookScript.run(GroovyHookScript.java:63)
        at hudson.util.BootFailure.publish(BootFailure.java:43)
        at hudson.WebAppMain.contextInitialized(WebAppMain.java:247)
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
        at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)   
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
        at org.eclipse.jetty.server.Server.doStart(Server.java:282)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at winstone.Launcher.<init>(Launcher.java:154)
        at winstone.Launcher.main(Launcher.java:354)
        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:293)
        at Main.main(Main.java:98)

May 05, 2015 9:59:54 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started [email protected]:8080
May 05, 2015 9:59:54 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started [email protected]:8009
May 05, 2015 9:59:54 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: AJP13 is not a secure protocol. Please protect port 8009
May 05, 2015 9:59:54 PM winstone.Logger logInternal
INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled
6
  • 2
    I don't think there's much we can do about a java.lang.NullPointerException May 6, 2015 at 2:38
  • Looking at the GroovyHookScript in the exception, are you running any custom startup scripts? May 6, 2015 at 12:40
  • Nope, no custom scripts.
    – mr.zog
    May 7, 2015 at 0:03
  • Did you find any solution?
    – TacB0sS
    Aug 15, 2015 at 2:13
  • Although I haven't observed the problem myself and I don't know Jenkins' source code, but looking at the stacktrace and guessing, I'd say this is not your main problem. It looks like a problem (NPE) happened during handling of some other problem (notice BootFailure as second in the stacktrace). My suggestion is to look earlier in the logs (or turn more verbose logging) May 18, 2016 at 21:33

2 Answers 2

1

There's lots of bug reports for similar issues but all of them seems like misconfiguration or buggy installation problem. Some work arounds're shown like finding misconfigured plugin and moving it out or installing font packages but still these are only workarounds.

Can you check if /var/cache/jenkins exists and owner of this directory is jenkins user?

There's a similar issue recently updated to here

If this not solve your problem you can report a bug here, and sorry but not much to go.

-2

I was having similar java.lang.NullPointerException with a fresh version of CentOS 6.3 and Jenkins 1.617, using Java 1.7.0.5. When tailing /var/log/jenkins/jenkins.log, I noticed the following errors:

Caused by: java.lang.NullPointerException
    at sun.awt.X11FontManager.getDefaultPlatformFont(X11FontManager.java:779)
    at sun.font.SunFontManager$2.run(SunFontManager.java:432)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.font.SunFontManager.<init>(SunFontManager.java:375)
    at sun.awt.X11FontManager.<init>(X11FontManager.java:32)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    at java.lang.Class.newInstance0(Class.java:372)
    at java.lang.Class.newInstance(Class.java:325)
    at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
    at java.awt.Font.getFont2D(Font.java:490)
    at java.awt.Font.getFamily(Font.java:1187)
    at java.awt.Font.getFamily_NoClientCode(Font.java:1161)
    at java.awt.Font.getFamily(Font.java:1153)
    at java.awt.Font.toString(Font.java:1650)
    at hudson.util.ChartUtil.<clinit>(ChartUtil.java:255)
    at hudson.WebAppMain.contextInitialized(WebAppMain.java:184)
    ... 19 more

I was able to fix this by installing fonts on the system, by running the following:

sudo yum install dejavu-sans-fonts

Once I installed the fonts, I was able to navigate to the frontend and load Jenkins properly.

2
  • 2
    They are quite different stack traces. Their issue is not font related :) Jun 24, 2015 at 23:57
  • 1
    The error mr.zog posted happened in my logs as well, but the logs I posted in my answer before the error from the question. This is the full output including the same error message from the question: gist.github.com/stevenviola/d5b98ec3e72934584710 Jun 25, 2015 at 0:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .