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

NPE during Jenkins startup

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: splunk-devops-plugin
    • Labels:
      None
    • Environment:
      jenkins 2.46 , splunk plugin 1.5.3
    • Similar Issues:

      Description

      Splunk plugin blocked Jenkins startup due to NPE. Am not what caused this though.

      Marking this as critical since this is blocking Jenkins startup i.e. when accessing jenkins home all we see is below NPE exception.

      I changed value of enabled to 'false' @ <jenkins_home>/com.splunk.splunkjenkins.SplunkJenkinsInstallation.xml to bring back jenkins.

       

      Below is stacktrace

      java.lang.NullPointerException
      at com.splunk.splunkjenkins.utils.SplunkLogService.enqueue(SplunkLogService.java:179)
      at com.splunk.splunkjenkins.utils.SplunkLogService.send(SplunkLogService.java:95)
      at com.splunk.splunkjenkins.JdkSplunkLogHandler.publish(JdkSplunkLogHandler.java:53)
      at java.util.logging.Logger.log(Logger.java:738)
      at java.util.logging.Logger.doLog(Logger.java:765)
      at java.util.logging.Logger.log(Logger.java:876)
      at jenkins.model.Jenkins.<init>(Jenkins.java:988)
      at hudson.model.Hudson.<init>(Hudson.java:86)
      at hudson.model.Hudson.<init>(Hudson.java:82)
      at hudson.WebAppMain$3.run(WebAppMain.java:231)
      Caused: hudson.util.HudsonFailedToLoad
      at hudson.WebAppMain$3.run(WebAppMain.java:248)

        Attachments

          Activity

          Hide
          m1rf4k Alexandru Calistru added a comment -

          Hello,

          It happens also with 1.6.0 version of splunk plugin and jenkins version 2.7.4.

          Thank you,

          Alex

          Show
          m1rf4k Alexandru Calistru added a comment - Hello, It happens also with 1.6.0 version of splunk plugin and jenkins version 2.7.4. Thank you, Alex
          Hide
          jnichols Jim Nichols added a comment -

           We are also seeing this issue with 1.6.0 version of the splunk plugin and jenkins version 2.73.1 any ideas on what is going on with this?

          Show
          jnichols Jim Nichols added a comment -  We are also seeing this issue with 1.6.0 version of the splunk plugin and jenkins version 2.73.1 any ideas on what is going on with this?
          Hide
          tdonfro Tim D'Onfro added a comment -

          I am also facing the same issue with version 1.6.0 of the splunk plugin and jenkins 2.73.1.  does anyone know if there will be a fix for this?  

          Show
          tdonfro Tim D'Onfro added a comment - I am also facing the same issue with version 1.6.0 of the splunk plugin and jenkins 2.73.1.  does anyone know if there will be a fix for this?  
          Hide
          krakan Jonas Linde added a comment - - edited

          We encountered this too but as we had multiple Jenkinses and not all suffered the NPE we were able to track it down to an extra newline in the <scriptContent> tag in the com.splunk.splunkjenkins.SplunkJenkinsInstallation.xml file. You can see the extra newline in the GUI too if you go to "Manage Jenkins", "Configure System", "Splunk for Jenkins Configuration",  "Advanced..." and " Customize Event Processing Command".

          So apparently 1.6.0 version can't handle empty lines in the scriptContent in the config whereas 1.5.2 could. For 1.5.3 I had to remove the whole scriptContent tag.

          When diffing the plugin code it seems like handling of legacy config was removed in 1.5.3.

          Show
          krakan Jonas Linde added a comment - - edited We encountered this too but as we had multiple Jenkinses and not all suffered the NPE we were able to track it down to an extra newline in the <scriptContent> tag in the com.splunk.splunkjenkins.SplunkJenkinsInstallation.xml file. You can see the extra newline in the GUI too if you go to "Manage Jenkins", "Configure System", "Splunk for Jenkins Configuration",  "Advanced..." and " Customize Event Processing Command". So apparently 1.6.0 version can't handle empty lines in the scriptContent in the config whereas 1.5.2 could. For 1.5.3 I had to remove the whole scriptContent tag. When diffing the plugin code it seems like handling of legacy config was removed in 1.5.3.
          Hide
          the4yeast Maciej Drozdzowski added a comment -

          Same thing is happening to me on Jenkins 2.83, plugin version 1.5.3 or 1.6.0

          Show
          the4yeast Maciej Drozdzowski added a comment - Same thing is happening to me on Jenkins 2.83, plugin version 1.5.3 or 1.6.0
          Hide
          ryangates Ryan Gates added a comment - - edited

          For anyone else troubleshooting this, the com.splunk.splunkjenkins.SplunkJenkinsInstallation.xml file is in the Jenkins home directory.

          Show
          ryangates Ryan Gates added a comment - - edited For anyone else troubleshooting this, the com.splunk.splunkjenkins.SplunkJenkinsInstallation.xml file is in the Jenkins home directory.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            snallami suresh nallamilli
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated: