• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • splunk-devops-plugin
    • None
    • jenkins 2.46 , splunk plugin 1.5.3

      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)

          [JENKINS-45858] NPE during Jenkins startup

          Hello,

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

          Thank you,

          Alex

          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

          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?

          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?

          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?  

          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?  

          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.

          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.

          M D added a comment -

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

          M D added a comment - Same thing is happening to me on Jenkins 2.83, plugin version 1.5.3 or 1.6.0

          Ryan Gates added a comment - - edited

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

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

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

              Created:
              Updated: