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

NullPointerException in StreamWatchdog when trying to stop/restart

    XMLWordPrintable

Details

    Description

      The Jenkins master has been running for about 2 months now and the Gerrit trigger plug-in has been working well.
      We see these NPE problems with intervals (I have attached the log) after we see the Gerrit Trigger no longer being able to connect to the Gerrit server, so we try to restart the Gerrit Trigger:
      Dec 17, 2013 10:26:37 AM com.sonyericsson.hudson.plugins.gerrit.trigger.GerritManagement$DescriptorImpl doRestartConnection
      SEVERE: Could not restart connection.
      java.lang.NullPointerException
      at com.sonyericsson.hudson.plugins.gerrit.gerritevents.watchdog.StreamWatchdog.shutdown(StreamWatchdog.java:131)
      at com.sonyericsson.hudson.plugins.gerrit.gerritevents.GerritHandler.shutdown(GerritHandler.java:850)
      at com.sonyericsson.hudson.plugins.gerrit.trigger.PluginImpl.stopConnection(PluginImpl.java:283)
      at com.sonyericsson.hudson.plugins.gerrit.trigger.PluginImpl.restartConnection(PluginImpl.java:299)
      at com.sonyericsson.hudson.plugins.gerrit.trigger.GerritManagement$DescriptorImpl.doRestartConnection(GerritManagement.java:154)

      In the Gerrit Trigger plug-in page it says this:
      "The connection to Gerrit is down! Check your settings and the Gerrit server.
      Since the connection is down, Jenkins cannot determine the Gerrit version. So all Gerrit features have been enabled."

      I can, however, easily press the "Test connection" button and have that work.

      Attachments

        Activity

          lasse_bigum Lasse Bigum created issue -
          lasse_bigum Lasse Bigum made changes -
          Field Original Value New Value
          Description The Jenkins master has been running for about 2 months now and the Gerrit trigger plug-in has been working well.
          We see these NPE problems with intervals (I have attached the log) after we see the Gerrit Trigger no longer being able to connect to the Gerrit server, so we try to restart the Gerrit Trigger:
          {{Dec 17, 2013 10:26:37 AM com.sonyericsson.hudson.plugins.gerrit.trigger.GerritManagement$DescriptorImpl doRestartConnection
          SEVERE: Could not restart connection.
          java.lang.NullPointerException
          at com.sonyericsson.hudson.plugins.gerrit.gerritevents.watchdog.StreamWatchdog.shutdown(StreamWatchdog.java:131)
          at com.sonyericsson.hudson.plugins.gerrit.gerritevents.GerritHandler.shutdown(GerritHandler.java:850)
          at com.sonyericsson.hudson.plugins.gerrit.trigger.PluginImpl.stopConnection(PluginImpl.java:283)
          at com.sonyericsson.hudson.plugins.gerrit.trigger.PluginImpl.restartConnection(PluginImpl.java:299)
          at com.sonyericsson.hudson.plugins.gerrit.trigger.GerritManagement$DescriptorImpl.doRestartConnection(GerritManagement.java:154)}}

          In the Gerrit Trigger plug-in page it says this:
          ??The connection to Gerrit is down! Check your settings and the Gerrit server.
          Since the connection is down, Jenkins cannot determine the Gerrit version. So all Gerrit features have been enabled.??
          I can, however, easily press the "Test connection" button and have that work.
          The Jenkins master has been running for about 2 months now and the Gerrit trigger plug-in has been working well.
          We see these NPE problems with intervals (I have attached the log) after we see the Gerrit Trigger no longer being able to connect to the Gerrit server, so we try to restart the Gerrit Trigger:
          Dec 17, 2013 10:26:37 AM com.sonyericsson.hudson.plugins.gerrit.trigger.GerritManagement$DescriptorImpl doRestartConnection
          SEVERE: Could not restart connection.
          java.lang.NullPointerException
          at com.sonyericsson.hudson.plugins.gerrit.gerritevents.watchdog.StreamWatchdog.shutdown(StreamWatchdog.java:131)
          at com.sonyericsson.hudson.plugins.gerrit.gerritevents.GerritHandler.shutdown(GerritHandler.java:850)
          at com.sonyericsson.hudson.plugins.gerrit.trigger.PluginImpl.stopConnection(PluginImpl.java:283)
          at com.sonyericsson.hudson.plugins.gerrit.trigger.PluginImpl.restartConnection(PluginImpl.java:299)
          at com.sonyericsson.hudson.plugins.gerrit.trigger.GerritManagement$DescriptorImpl.doRestartConnection(GerritManagement.java:154)

          In the Gerrit Trigger plug-in page it says this:
          "The connection to Gerrit is down! Check your settings and the Gerrit server.
          Since the connection is down, Jenkins cannot determine the Gerrit version. So all Gerrit features have been enabled."

          I can, however, easily press the "Test connection" button and have that work.
          lasse_bigum Lasse Bigum added a comment -

          The Gerrit server and Jenkins server are on different servers, and as stated, it runs fines for weeks and even months on end, and then fails like this.

          The Gerrit server is 2.5.3 so it is not related to the new stream-events permission.

          lasse_bigum Lasse Bigum added a comment - The Gerrit server and Jenkins server are on different servers, and as stated, it runs fines for weeks and even months on end, and then fails like this. The Gerrit server is 2.5.3 so it is not related to the new stream-events permission.

          Code changed in jenkins
          User: Robert Sandell
          Path:
          gerrit-events/src/main/java/com/sonyericsson/hudson/plugins/gerrit/gerritevents/watchdog/StreamWatchdog.java
          http://jenkins-ci.org/commit/gerrit-trigger-plugin/f588210771216b9be4a7a3871c374bcff3bb504d
          Log:
          NPE Fix in StreamWatchdog

          Could be the cause of JENKINS-21036

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: gerrit-events/src/main/java/com/sonyericsson/hudson/plugins/gerrit/gerritevents/watchdog/StreamWatchdog.java http://jenkins-ci.org/commit/gerrit-trigger-plugin/f588210771216b9be4a7a3871c374bcff3bb504d Log: NPE Fix in StreamWatchdog Could be the cause of JENKINS-21036

          Which release of Gerrit-Trigger your fix will be available in ?

          vladisld Vlad Dovlekaev added a comment - Which release of Gerrit-Trigger your fix will be available in ?
          rsandell rsandell added a comment -

          2.12.0-beta-1

          rsandell rsandell added a comment - 2.12.0-beta-1
          rin_ne rin_ne made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 152877 ] JNJira + In-Review [ 194382 ]

          People

            rsandell rsandell
            lasse_bigum Lasse Bigum
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: