Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException on several "Manage Jenkins" pages #352

Closed
MikeBerryFR opened this issue Oct 26, 2017 · 5 comments
Closed

NullPointerException on several "Manage Jenkins" pages #352

MikeBerryFR opened this issue Oct 26, 2017 · 5 comments

Comments

@MikeBerryFR
Copy link

After installing and successfully configuring the Slack-Notification-Plugin, we're seeing sporadic NPEs on various pages, particularly if the user session has expired:

Session expired, this NPE is displayed instead of the login page:

java.lang.NullPointerException
	at jenkins.plugins.slack.webhook.WebhookEndpoint.getUrlName(WebhookEndpoint.java:51)
	at jenkins.model.Jenkins.getDynamic(Jenkins.java:3642)
	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
	at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:372)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)

Global Tool Configuration, this NPE is displayed instead of the configuration page:

java.lang.NullPointerException
	at jenkins.plugins.slack.webhook.WebhookEndpoint.getUrlName(WebhookEndpoint.java:51)
	at jenkins.model.Jenkins.getUnprotectedRootActions(Jenkins.java:4681)
	at jenkins.model.Jenkins.isSubjectToMandatoryReadPermissionCheck(Jenkins.java:4653)
	at jenkins.model.Jenkins.getTarget(Jenkins.java:4631)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:674)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

We're running Jenkins LTS v2.73.2 behind a Tomcat Manager

@MikeBerryFR
Copy link
Author

Slack Outgoing Webhooks were intentionally left not configured under the global config as this is the unsupported legacy integration method for Slack.

Slack App integration was configured and working despite the errors above.

@MikeBerryFR MikeBerryFR changed the title NullPointerException in Jenkins while navigating several pages NullPointerException on several "Manage Jenkins" pages Oct 26, 2017
@sjqnn
Copy link

sjqnn commented Nov 15, 2017

Seeing the same issue when certain things are left unconfigured. chat app integration plugins being left unconfigured should not crash jenkins....seems like this should be a higher priority.

@yixiaol-m
Copy link

yixiaol-m commented Dec 28, 2017

We are seeing a similar issue that caused Jenkins to crash.
Just installed the plugin and didn't configure anything, Jenkins crashed about 30 minutes after the installation.

Dec 28, 2017 11:34:27 AM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Error while serving https://***/oa/ajaxBuildQueue
java.lang.reflect.InvocationTargetException
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:372)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at com.cloudbees.jenkins.ha.HAHealthCheckFilter.doFilter(HAHealthCheckFilter.java:35)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
at com.cloudbees.jenkins.support.slowrequest.SlowRequestFilter.doFilter(SlowRequestFilter.java:37)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:51)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:47)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
at
.....
Caused by: java.lang.NullPointerException
at jenkins.plugins.slack.webhook.WebhookEndpoint.getUrlName(WebhookEndpoint.java:51)
at jenkins.model.Jenkins.getDynamic(Jenkins.java:3621)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
... 82 more

@sebglon
Copy link

sebglon commented Jan 15, 2018

Same for me on 2.100 but nice after jenkinsn restart

@kmadel
Copy link
Contributor

kmadel commented Oct 8, 2018

see #403

@kmadel kmadel closed this as completed Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants