[JIRA] (JENKINS-58940) ActiveDirectory.updateUserCache uncaughtException

57 views
Skip to first unread message

ian.williams1@telus.com (JIRA)

unread,
Aug 14, 2019, 2:01:03 PM8/14/19
to jenkinsc...@googlegroups.com
Ian Williams created an issue
 
Jenkins / Improvement JENKINS-58940
ActiveDirectory.updateUserCache uncaughtException
Issue Type: Improvement Improvement
Assignee: Félix Belzunce Arcos
Components: active-directory-plugin
Created: 2019-08-14 18:00
Environment: Jenkins 2.176.2
active-directory:2.16
Priority: Major Major
Reporter: Ian Williams

Updated plugins using install_plugins.sh (the docker model).

 

Upon startup, seeing the following the in the logs when user logs in. Login is successful however.

 hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException

SEVERE: A thread (ActiveDirectory.updateUserCache 1/332) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.

java.lang.NullPointerException        at hudson.Util.fileToPath(Util.java:1501)        at hudson.model.UserIdMapper.createDirectoryForNewUser(UserIdMapper.java:145)        at hudson.model.UserIdMapper.putIfAbsent(UserIdMapper.java:92)        at hudson.model.User.putUserFolderIfAbsent(User.java:806)        at hudson.model.User.constructUserConfigFile(User.java:802)        at hudson.model.User.save(User.java:796)        at hudson.model.User.addProperty(User.java:336)        at hudson.plugins.active_directory.ActiveDirectoryUserDetail.updateUserInfo(ActiveDirectoryUserDetail.java:213)        at hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider$2.run(ActiveDirectoryUnixAuthenticationProvider.java:462)        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)        at java.lang.Thread.run(Thread.java:748)

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

ian.williams1@telus.com (JIRA)

unread,
Aug 14, 2019, 2:02:03 PM8/14/19
to jenkinsc...@googlegroups.com
Ian Williams updated an issue
Change By: Ian Williams
Updated plugins using install_plugins.sh (the docker model).

 

Upon startup, seeing the following the in the logs when user logs in. Login is successful however.

 


{{
hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException }}

{{ SEVERE: A thread (ActiveDirectory.updateUserCache [#1]/332) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code. }}

{{java.lang.NullPointerException}}
{{         at hudson.Util.fileToPath(Util.java:1501)}}
{{         at hudson.model.UserIdMapper.createDirectoryForNewUser(UserIdMapper.java:145)}}
{{         at hudson.model.UserIdMapper.putIfAbsent(UserIdMapper.java:92)}}
{{         at hudson.model.User.putUserFolderIfAbsent(User.java:806)}}
{{         at hudson.model.User.constructUserConfigFile(User.java:802)}}
{{         at hudson.model.User.save(User.java:796)}}
{{         at hudson.model.User.addProperty(User.java:336)}}
{{         at hudson.plugins.active_directory.ActiveDirectoryUserDetail.updateUserInfo(ActiveDirectoryUserDetail.java:213)}}
{{         at hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider$2.run(ActiveDirectoryUnixAuthenticationProvider.java:462)}}
{{         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)}}
{{         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)}}
{{         at java.lang.Thread.run(Thread.java:748)   }}

 

ian.williams1@telus.com (JIRA)

unread,
Aug 14, 2019, 2:03:02 PM8/14/19
to jenkinsc...@googlegroups.com

ian.williams1@telus.com (JIRA)

unread,
Aug 14, 2019, 2:04:01 PM8/14/19
to jenkinsc...@googlegroups.com
Ian Williams updated an issue

ian.williams1@telus.com (JIRA)

unread,
Aug 14, 2019, 7:53:03 PM8/14/19
to jenkinsc...@googlegroups.com
Ian Williams updated an issue
Change By: Ian Williams
Attachment: active_dir.dump.txt

michellepogado@gmail.com (JIRA)

unread,
Aug 27, 2019, 9:46:02 PM8/27/19
to jenkinsc...@googlegroups.com
Michelle Pogado commented on Bug JENKINS-58940
 
Re: ActiveDirectory.updateUserCache uncaughtException

Experiencing the same issue.
Jenkins 2.189
Active Directory Plugin 2.16

michellepogado@gmail.com (JIRA)

unread,
Aug 27, 2019, 9:47:02 PM8/27/19
to jenkinsc...@googlegroups.com
Experiencing the same issue.
Jenkins 2.189
Active Directory Plugin 2.16


*Plugins updated via the Plugin Manager UI

michellepogado@gmail.com (JIRA)

unread,
Aug 27, 2019, 9:54:03 PM8/27/19
to jenkinsc...@googlegroups.com
Michelle Pogado edited a comment on Bug JENKINS-58940
 
Re: ActiveDirectory.updateUserCache uncaughtException
Experiencing the same exact issue.

Environment:
{code}
Jenkins 2.189
Active Directory Plugin 2.16
CentOS 7
{code}

*Plugins updated via the Plugin Manager UI

michellepogado@gmail.com (JIRA)

unread,
Aug 27, 2019, 10:11:02 PM8/27/19
to jenkinsc...@googlegroups.com
Michelle Pogado edited a comment on Bug JENKINS-58940
Experiencing the same exact issue.

Environment:
{code :java }

Jenkins 2.189
Active Directory Plugin 2.16
CentOS 7
{code}

*Plugins updated via the Plugin Manager UI



Update:
Tried downgrading AD Plugin from 2.16 to 2.14 and still getting the exact same stack trace above.
Are there any workarounds for this?

paulius@devnull.lt (JIRA)

unread,
Aug 29, 2019, 9:21:05 AM8/29/19
to jenkinsc...@googlegroups.com
Paulius Bulotas commented on Bug JENKINS-58940
 
Re: ActiveDirectory.updateUserCache uncaughtException

2.176.3, after updating bunch of plugins, I get NPE when logging in or saving user preferences:

 java.lang.NullPointerException
 at hudson.Util.fileToPath(Util.java:1501)
 at hudson.model.UserIdMapper.createDirectoryForNewUser(UserIdMapper.java:145)
 at hudson.model.UserIdMapper.putIfAbsent(UserIdMapper.java:92)
 at hudson.model.User.putUserFolderIfAbsent(User.java:806)
 at hudson.model.User.constructUserConfigFile(User.java:802)
 at hudson.model.User.save(User.java:796)
 at hudson.model.User.doConfigSubmit(User.java:868)

And we are using LDAP, CentOS 7

paulius@devnull.lt (JIRA)

unread,
Aug 29, 2019, 9:23:01 AM8/29/19
to jenkinsc...@googlegroups.com
2.176.3, after updating bunch of plugins, I get NPE when logging in or saving user preferences:
{code:java}

java.lang.NullPointerException
at hudson.Util.fileToPath(Util.java:1501)
at hudson.model.UserIdMapper.createDirectoryForNewUser(UserIdMapper.java:145)
at hudson.model.UserIdMapper.putIfAbsent(UserIdMapper.java:92)
at hudson.model.User.putUserFolderIfAbsent(User.java:806)
at hudson.model.User.constructUserConfigFile(User.java:802)
at hudson.model.User.save(User.java:796)
at hudson.model.User.doConfigSubmit(User.java:868)
{code}

And we are using LDAP, CentOS 7
with SELinux enabled.

paulius@devnull.lt (JIRA)

unread,
Sep 2, 2019, 2:36:04 AM9/2/19
to jenkinsc...@googlegroups.com
Paulius Bulotas commented on Bug JENKINS-58940
 
Re: ActiveDirectory.updateUserCache uncaughtException

Different stacktrace in the begining, ends the same:

There were no failing Constraints! The build will be marked as SUCCESS
FATAL: java.lang.NullPointerException
java.lang.NullPointerException
	at hudson.Util.fileToPath(Util.java:1501)
	at hudson.model.UserIdMapper.createDirectoryForNewUser(UserIdMapper.java:145)
	at hudson.model.UserIdMapper.putIfAbsent(UserIdMapper.java:92)
	at hudson.model.User.putUserFolderIfAbsent(User.java:806)
	at hudson.model.User.constructUserConfigFile(User.java:802)
	at hudson.model.User.save(User.java:796)
	at hudson.model.User.addProperty(User.java:336)
	at hudson.security.LDAPSecurityRealm.updateUserDetails(LDAPSecurityRealm.java:835)
	at hudson.security.LDAPSecurityRealm.updateUserDetails(LDAPSecurityRealm.java:796)
	at hudson.security.LDAPSecurityRealm.loadUserByUsername(LDAPSecurityRealm.java:786)
	at jenkins.security.UserDetailsCache$Retriever.call(UserDetailsCache.java:172)
	at jenkins.security.UserDetailsCache$Retriever.call(UserDetailsCache.java:161)
	at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4767)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
Caused: com.google.common.util.concurrent.UncheckedExecutionException
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2234)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4764)
	at jenkins.security.UserDetailsCache.loadUserByUsername(UserDetailsCache.java:127)
	at hudson.model.User$UserIDCanonicalIdResolver.resolveCanonicalId(User.java:1239)
	at hudson.model.User$CanonicalIdResolver.resolve(User.java:1180)
	at hudson.model.User.get(User.java:505)
	at hudson.model.User.get(User.java:475)
	at hudson.plugins.git.GitChangeSet.findOrCreateUser(GitChangeSet.java:398)
	at hudson.plugins.git.GitChangeSet.getAuthor(GitChangeSet.java:466)
	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:137)
	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:341)
	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:95)
	at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:330)
	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:132)
	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:341)
	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:95)
	at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:330)
	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:132)
	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:341)
	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:95)
	at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:330)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639)
	at hudson.model.Run.execute(Run.java:1843)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)

paulius@devnull.lt (JIRA)

unread,
Sep 4, 2019, 2:31:03 AM9/4/19
to jenkinsc...@googlegroups.com
 
Re: ActiveDirectory.updateUserCache uncaughtException

Another one:

java.lang.NullPointerException
	at hudson.Util.fileToPath(Util.java:1501)
	at hudson.model.UserIdMapper.createDirectoryForNewUser(UserIdMapper.java:145)
	at hudson.model.UserIdMapper.putIfAbsent(UserIdMapper.java:92)
	at hudson.model.User.putUserFolderIfAbsent(User.java:806)
	at hudson.model.User.constructUserConfigFile(User.java:802)
	at hudson.model.User.save(User.java:796)
	at hudson.model.User.addProperty(User.java:336)
	at hudson.plugins.git.GitChangeSet.setMail(GitChangeSet.java:416)
	at hudson.plugins.git.GitChangeSet.findOrCreateUser(GitChangeSet.java:407)
	at hudson.plugins.git.GitChangeSet.getAuthor(GitChangeSet.java:466)
	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:137)

julienduchesne@live.com (JIRA)

unread,
Sep 4, 2019, 9:57:03 AM9/4/19
to jenkinsc...@googlegroups.com
Julien Duchesne commented on Bug JENKINS-58940
 
Re: ActiveDirectory.updateUserCache uncaughtException

Weirdly, on my instances, I had that issue and the bug was caused by the update of the `Prometheus Metrics` plugin from 2.0.0 to 2.0.6

paulius@devnull.lt (JIRA)

unread,
Sep 4, 2019, 10:24:01 AM9/4/19
to jenkinsc...@googlegroups.com
Paulius Bulotas commented on Bug JENKINS-58940
 
Re: ActiveDirectory.updateUserCache uncaughtException

I can confirm that downgrading Prometheus plugin solved issues we are seeing...

ian.williams1@telus.com (JIRA)

unread,
Sep 4, 2019, 12:44:03 PM9/4/19
to jenkinsc...@googlegroups.com
Ian Williams commented on Bug JENKINS-58940
 
Re: ActiveDirectory.updateUserCache uncaughtException

We (the OP) do not have Prometheus plugin installed, so the issue remains unresolved.

ntendepeter@gmail.com (JIRA)

unread,
Sep 4, 2019, 2:59:02 PM9/4/19
to jenkinsc...@googlegroups.com
Peter Ntende commented on Bug JENKINS-58940
 
Re: ActiveDirectory.updateUserCache uncaughtException

In addition to the Prometheus Metrics plugin, I also had to remove to roll back influxDb, Git plugin and all git related plugins to previous versions.

sascht@sas.com (JIRA)

unread,
Sep 11, 2019, 2:29:03 PM9/11/19
to jenkinsc...@googlegroups.com
Charles Tudor commented on Bug JENKINS-58940
 
Re: ActiveDirectory.updateUserCache uncaughtException

We are getting a NPE when logging in.  I was able to narrow down the plugins to  

  • ldap:1.20
  • prometheus:2.0.6
  • jobConfigHistory:2.24
  • permissive-script-security:0.5

 

Going back to prometheus:2.0.0 or permissive-script-security:0.4 fixes the issue. 

 

Stack trace

java.lang.NullPointerException at hudson.Util.fileToPath(Util.java:1501) at hudson.model.UserIdMapper.createDirectoryForNewUser(UserIdMapper.java:145) at hudson.model.UserIdMapper.putIfAbsent(UserIdMapper.java:92) at hudson.model.User.putUserFolderIfAbsent(User.java:806) at hudson.model.User.constructUserConfigFile(User.java:802) at hudson.model.User.save(User.java:796) at hudson.model.User.addProperty(User.java:336) at hudson.security.LDAPSecurityRealm.updateUserDetails(LDAPSecurityRealm.java:835) at hudson.security.LDAPSecurityRealm.updateUserDetails(LDAPSecurityRealm.java:796) at hudson.security.LDAPSecurityRealm.loadUserByUsername(LDAPSecurityRealm.java:786) at jenkins.security.UserDetailsCache$Retriever.call(UserDetailsCache.java:172) at jenkins.security.UserDetailsCache$Retriever.call(UserDetailsCache.java:161) at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4767) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228) Caused: com.google.common.util.concurrent.UncheckedExecutionException at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2234) at com.google.common.cache.LocalCache.get(LocalCache.java:3965) at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4764) at jenkins.security.UserDetailsCache.loadUserByUsername(UserDetailsCache.java:127) at hudson.model.User$UserIDCanonicalIdResolver.resolveCanonicalId(User.java:1239) at hudson.model.User$CanonicalIdResolver.resolve(User.java:1180) at hudson.model.User.get(User.java:505) at hudson.model.User.getOrCreateByIdOrFullName(User.java:570) at hudson.model.User.get(User.java:551) at hudson.security.LDAPSecurityRealm.updateUserDetails(LDAPSecurityRealm.java:802) at hudson.security.LDAPSecurityRealm.updateUserDetails(LDAPSecurityRealm.java:796) at hudson.security.LDAPSecurityRealm.updateUserDetails(LDAPSecurityRealm.java:790) at hudson.security.LDAPSecurityRealm$LDAPAuthenticationManager.authenticate(LDAPSecurityRealm.java:997) at org.acegisecurity.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication(AuthenticationProcessingFilter.java:74) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:252) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1701) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1668) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:502) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) at java.lang.Thread.run(Thread.java:748)

 

 

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ian.williams1@telus.com (JIRA)

unread,
Sep 11, 2019, 2:44:03 PM9/11/19
to jenkinsc...@googlegroups.com
Ian Williams commented on Bug JENKINS-58940
 
Re: ActiveDirectory.updateUserCache uncaughtException

Charles Tudor, We (the OP) do not have Prometheus or plugin permissive-script-security installed. While ldap plugin is installed, we use AD, not ldap, so the issue remains unresolved.

Reply all
Reply to author
Forward
0 new messages