Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-71409

Subversion plugin - Build failure due to ldap disabled account

XMLWordPrintable

      We are seeing the following error at the end of a select few builds, which is causing it to fail:

      FATAL: org.springframework.security.authentication.DisabledException: The user "redacted_user_name" is administratively disabled.
      org.springframework.security.authentication.DisabledException: The user "redacted_user_name" is administratively disabled.
      	at hudson.security.UserAttributesHelper.checkIfUserEnabled(UserAttributesHelper.java:92)
      	at hudson.security.LDAPSecurityRealm$LDAPUserDetailsService.loadUserByUsername(LDAPSecurityRealm.java:1315)
      	at hudson.security.LDAPSecurityRealm$DelegateLDAPUserDetailsService.loadUserByUsername(LDAPSecurityRealm.java:1228)
      	at hudson.security.LDAPSecurityRealm.loadUserByUsername2(LDAPSecurityRealm.java:763)
      	at jenkins.security.UserDetailsCache$Retriever.call(UserDetailsCache.java:165)
      	at jenkins.security.UserDetailsCache$Retriever.call(UserDetailsCache.java:154)
      	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:122)
      	at hudson.model.User$UserIDCanonicalIdResolver.resolveCanonicalId(User.java:1251)
      	at hudson.model.User$CanonicalIdResolver.resolve(User.java:1192)
      	at hudson.model.User.get(User.java:523)
      	at hudson.model.User.getOrCreateByIdOrFullName(User.java:586)
      	at hudson.model.User.get(User.java:567)
      	at hudson.scm.SubversionChangeLogSet$LogEntry.setUser(SubversionChangeLogSet.java:305)
      	at hudson.scm.SubversionChangeLogParser.parse(SubversionChangeLogParser.java:92)
      	at hudson.scm.SubversionChangeLogParser.parse(SubversionChangeLogParser.java:43)
      	at hudson.scm.ChangeLogParser.parse(ChangeLogParser.java:56)
      	at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:936)
      	at hudson.model.AbstractBuild.getChangeSet(AbstractBuild.java:904)
      	at hudson.model.AbstractBuild.getChangeSets(AbstractBuild.java:918)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:138)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:344)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:95)
      	at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:333)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:135)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:344)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:95)
      	at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:333)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:135)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:344)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:95)
      	at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:333)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:705)
      	at hudson.model.Run.execute(Run.java:1914)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:100)
      	at hudson.model.Executor.run(Executor.java:433) 

      We are using:
      Jenkins 2.303.1
      Email Extention 2.86
      Mailer Plugin 414
      LDAP Plugin 2.9
      Subversion plugin 2.15.4

      An ldapsearch reveals the account is indeed disabled within AD.

      It appears that the Subversion plugin does not wrap the User.get() call with a try and catch.

      https://github.com/jenkinsci/subversion-plugin/blob/ff21cb5a7943cd4c7f298a8755a453a32ca5d681/src/main/java/hudson/scm/SubversionChangeLogSet.java#L305

      vs how a similar bug was fixed in the Git plugin:

      https://github.com/jenkinsci/git-plugin/blob/82f82dbcc256262496d7241b8dd6dd7f3b8f55a2/src/main/java/hudson/plugins/git/GitChangeSet.java#L414

      Similar issues:

      https://issues.jenkins.io/browse/JENKINS-64629
      https://issues.jenkins.io/browse/JENKINS-67491

      https://issues.jenkins.io/browse/JENKINS-67981

            Unassigned Unassigned
            petarld Petar Drankarov
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: