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

java.lang.NullPointerException at hudson.model.Fingerprint.addWithoutSaving(Fingerprint.java:1035)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Ubuntu
      Jenkins 2.107
    • Jenkins 2.163

      I'm not sure what's going on at this point, but I got two warnings about old data for fingerprint and now none of my builds are working.

      java.lang.NullPointerException
      	at hudson.model.Fingerprint.addWithoutSaving(Fingerprint.java:1035)
      	at hudson.model.Fingerprint.add(Fingerprint.java:1030)
      	at hudson.model.Fingerprint.addFor(Fingerprint.java:1023)
      	at com.cloudbees.plugins.credentials.CredentialsProvider.trackAll(CredentialsProvider.java:1457)
      	at com.cloudbees.plugins.credentials.CredentialsProvider.track(CredentialsProvider.java:1421)
      	at hudson.plugins.git.GitSCM.createClient(GitSCM.java:818)
      	at hudson.plugins.git.GitSCM.createClient(GitSCM.java:786)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1154)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:85)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:75)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      	at hudson.security.ACL.impersonate(ACL.java:290)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	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)
      Finished: FAILURE
      

      I am using Java version 8.

          [JENKINS-49588] java.lang.NullPointerException at hudson.model.Fingerprint.addWithoutSaving(Fingerprint.java:1035)

          Daniel Beck added a comment -

          achraf All of those have been released about a week ago, while this issue was filed in February. So that's probably incidental.

          Daniel Beck added a comment - achraf All of those have been released about a week ago, while this issue was filed in February. So that's probably incidental.

          Achraf Ghabi added a comment -

          danielbeck: agree!

          I can't imagine why is the problem triggered now (after all these months). I even went to the plugins repositories and checked the latest changes. There is nothing obvious that could cause the exception. 
          In my case the upgrade of those plugins triggered the NPE. I rolled them back and everything went back to normal. I could even upgrade to latest Jenkins version without any further problems. Now we just have to live without the latest security fix from those plugins until a fix of this bug is released!

          Achraf Ghabi added a comment - danielbeck : agree! I can't imagine why is the problem triggered now (after all these months). I even went to the plugins repositories and checked the latest changes. There is nothing obvious that could cause the exception.  In my case the upgrade of those plugins triggered the NPE. I rolled them back and everything went back to normal. I could even upgrade to latest Jenkins version without any further problems. Now we just have to live without the latest security fix from those plugins until a fix of this bug is released!

          Dan Whitehall added a comment -

          Anyone have at least a temporary fix for this issue? we are screwed at the moment.

          Dan Whitehall added a comment - Anyone have at least a temporary fix for this issue? we are screwed at the moment.

          oleg_nenashev this issue seems to be related to JENKINS-26257 ?

          Arnaud Héritier added a comment - oleg_nenashev this issue seems to be related to  JENKINS-26257 ?

          Dan Whitehall added a comment -

          I deleted the contents of $JENKINS_HOME/fingerprints, and am now back in business.

          No idea if this is recommended or not.

          Dan Whitehall added a comment - I deleted the contents of  $JENKINS_HOME/fingerprints , and am now back in business. No idea if this is recommended or not.

          Torsten Reinhard added a comment - - edited

          I had the same issue when loading my pipeline library, Jenkins 2.138.2. It occured after installing "custom-tool" plugin.

          Loading library workflowLibs@master
          Attempting to resolve master from remote references...
           > git --version # timeout=10
          using GIT_SSH to set credentials Bitbucket_Access (ssh://git@git.mycompany.net:port)
           > git ls-remote -h ssh://git@git.mycompany.net:port/scopecom/workflowlibs.git # timeout=10
          Found match: refs/heads/master revision d61d4cd5c6b3383722cc6b47b3d1ef9571803e3f
          java.lang.NullPointerException
           at hudson.model.Fingerprint.addWithoutSaving(Fingerprint.java:1033)
           at hudson.model.Fingerprint.add(Fingerprint.java:1028)
           at hudson.model.Fingerprint.addFor(Fingerprint.java:1021)
           at com.cloudbees.plugins.credentials.CredentialsProvider.trackAll(CredentialsProvider.java:1457)
           at com.cloudbees.plugins.credentials.CredentialsProvider.track(CredentialsProvider.java:1421)
           at hudson.plugins.git.GitSCM.createClient(GitSCM.java:844)
           at hudson.plugins.git.GitSCM.createClient(GitSCM.java:812)
           at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1180)
           at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
           at org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever.doRetrieve(SCMSourceRetriever.java:116)
           at org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever.retrieve(SCMSourceRetriever.java:86)
           at org.jenkinsci.plugins.workflow.libs.LibraryAdder.retrieve(LibraryAdder.java:157)
           at org.jenkinsci.plugins.workflow.libs.LibraryAdder.add(LibraryAdder.java:138)
           at org.jenkinsci.plugins.workflow.libs.LibraryDecorator$1.call(LibraryDecorator.java:125)
           at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1065)
           at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
           at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
           at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
           at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
           at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
           at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
           at groovy.lang.GroovyShell.parse(GroovyShell.java:700) 

          in the /fingerprints directory I found 2 files, one of them seems to be truncated (closing xml tags missing):

          <?xml version='1.1' encoding='UTF-8'?>
          <fingerprint>
            <timestamp>2018-10-19 12:31:24.262 UTC</timestamp>
            <md5sum>1f14c21f4332acaf8c1bad991f7b0f14</md5sum>
            <fileName>Credential id=Bitbucket_Access name=myuser (Bitbucket_Access (ssh://git@git.mycompany.net:port))</fileName>
            <usages>
              <entry>
                <string>SeedJob-Generator-ofco-TEST4</string>
                <ranges>1-3</ranges>
              </entry>
          ...
               <entry>
                <string>SeedJob-Generator-dcom-aws-prod-preprod</string>
          

          Torsten Reinhard added a comment - - edited I had the same issue when loading my pipeline library, Jenkins 2.138.2. It occured after installing "custom-tool" plugin. Loading library workflowLibs@master Attempting to resolve master from remote references... > git --version # timeout=10 using GIT_SSH to set credentials Bitbucket_Access (ssh: //git@git.mycompany.net:port) > git ls-remote -h ssh: //git@git.mycompany.net:port/scopecom/workflowlibs.git # timeout=10 Found match: refs/heads/master revision d61d4cd5c6b3383722cc6b47b3d1ef9571803e3f java.lang.NullPointerException at hudson.model.Fingerprint.addWithoutSaving(Fingerprint.java:1033) at hudson.model.Fingerprint.add(Fingerprint.java:1028) at hudson.model.Fingerprint.addFor(Fingerprint.java:1021) at com.cloudbees.plugins.credentials.CredentialsProvider.trackAll(CredentialsProvider.java:1457) at com.cloudbees.plugins.credentials.CredentialsProvider.track(CredentialsProvider.java:1421) at hudson.plugins.git.GitSCM.createClient(GitSCM.java:844) at hudson.plugins.git.GitSCM.createClient(GitSCM.java:812) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1180) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120) at org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever.doRetrieve(SCMSourceRetriever.java:116) at org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever.retrieve(SCMSourceRetriever.java:86) at org.jenkinsci.plugins.workflow.libs.LibraryAdder.retrieve(LibraryAdder.java:157) at org.jenkinsci.plugins.workflow.libs.LibraryAdder.add(LibraryAdder.java:138) at org.jenkinsci.plugins.workflow.libs.LibraryDecorator$1.call(LibraryDecorator.java:125) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1065) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688) at groovy.lang.GroovyShell.parse(GroovyShell.java:700) in the /fingerprints directory I found 2 files, one of them seems to be truncated (closing xml tags missing): <?xml version= '1.1' encoding= 'UTF-8' ?> <fingerprint> <timestamp>2018-10-19 12:31:24.262 UTC</timestamp> <md5sum>1f14c21f4332acaf8c1bad991f7b0f14</md5sum> <fileName>Credential id=Bitbucket_Access name=myuser (Bitbucket_Access (ssh: //git@git.mycompany.net:port))</fileName> <usages> <entry> <string>SeedJob-Generator-ofco-TEST4</string> <ranges>1-3</ranges> </entry> ... <entry> <string>SeedJob-Generator-dcom-aws-prod-preprod</string>

          Uhsarp Rin added a comment -

          Fixed after stopping the server, deleting the fingerprints folder and restarting the server.

          Uhsarp Rin added a comment - Fixed after stopping the server, deleting the fingerprints folder and restarting the server.

          Oleg Nenashev added a comment -

          It is still not clear what is the root cause, but I propose to consider this ticket as resolved by https://github.com/jenkinsci/jenkins/pull/3305 which was released in 2.163 . If somebody sees such issue after the fix, please create a follow-up ticket and assign it to me

          Oleg Nenashev added a comment - It is still not clear what is the root cause, but I propose to consider this ticket as resolved by https://github.com/jenkinsci/jenkins/pull/3305 which was released in 2.163 . If somebody sees such issue after the fix, please create a follow-up ticket and assign it to me

          Issue already fixed in 2.166

          Francisco Fernández added a comment - Issue already fixed in 2.166

          Oleg Nenashev added a comment -

          Correction: 2.163

          Oleg Nenashev added a comment - Correction: 2.163

            mikecirioli mike cirioli
            jomega Alexander Trauzzi
            Votes:
            7 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved: