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

CLI restart command fails with NullPointerException in Jenkins.doRestart

      $ sudo "/usr/lib/jvm/java-1.8.0/bin/java" -jar "/tmp/kitchen/cache/jenkins-cli.jar" -s http://aws-instance:8080 -i "/tmp/kitchen/cache/jenkins-key" restart
      
      ERROR: Unexpected exception occurred while performing restart command.
      java.lang.NullPointerException
      at jenkins.model.Jenkins.doRestart(Jenkins.java:4116)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      https://github.com/jenkinsci/jenkins/blob/stable-2.46/core/src/main/java/jenkins/model/Jenkins.java#L4116
      The server has "StaplerResponse rsp == null".

      The issue does not appear with safe-restart, as nullity is checked on all variables
      https://github.com/jenkinsci/jenkins/blob/stable-2.46/core/src/main/java/jenkins/model/Jenkins.java#L4127

          [JENKINS-44769] CLI restart command fails with NullPointerException in Jenkins.doRestart

          Jon Alberdi created issue -
          Jon Alberdi made changes -
          Description Original: [https://github.com/jenkinsci/jenkins/blob/stable-2.46/core/src/main/java/jenkins/model/Jenkins.java#L4116]

          {code:java}
          $ sudo "/usr/lib/jvm/java-1.8.0/bin/java" -jar "/tmp/kitchen/cache/jenkins-cli.jar" -s http://aws-instance:8080 -i "/tmp/kitchen/cache/jenkins-key" restart

          ERROR: Unexpected exception occurred while performing restart command.
          java.lang.NullPointerException
          at jenkins.model.Jenkins.doRestart(Jenkins.java:4116)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62){code}

          The server has the StaplerResponse rsp == null.

          The issue does not appear with safe-restart, as nullity is checked on all variables
          https://github.com/jenkinsci/jenkins/blob/stable-2.46/core/src/main/java/jenkins/model/Jenkins.java#L4127

          New: [https://github.com/jenkinsci/jenkins/blob/stable-2.46/core/src/main/java/jenkins/model/Jenkins.java#L4116]

          {code:java}
          $ sudo "/usr/lib/jvm/java-1.8.0/bin/java" -jar "/tmp/kitchen/cache/jenkins-cli.jar" -s http://aws-instance:8080 -i "/tmp/kitchen/cache/jenkins-key" restart

          ERROR: Unexpected exception occurred while performing restart command.
          java.lang.NullPointerException
          at jenkins.model.Jenkins.doRestart(Jenkins.java:4116)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62){code}

          The server has "StaplerResponse rsp == null".

          The issue does not appear with safe-restart, as nullity is checked on all variables
          https://github.com/jenkinsci/jenkins/blob/stable-2.46/core/src/main/java/jenkins/model/Jenkins.java#L4127

          Jon Alberdi made changes -
          Description Original: [https://github.com/jenkinsci/jenkins/blob/stable-2.46/core/src/main/java/jenkins/model/Jenkins.java#L4116]

          {code:java}
          $ sudo "/usr/lib/jvm/java-1.8.0/bin/java" -jar "/tmp/kitchen/cache/jenkins-cli.jar" -s http://aws-instance:8080 -i "/tmp/kitchen/cache/jenkins-key" restart

          ERROR: Unexpected exception occurred while performing restart command.
          java.lang.NullPointerException
          at jenkins.model.Jenkins.doRestart(Jenkins.java:4116)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62){code}

          The server has "StaplerResponse rsp == null".

          The issue does not appear with safe-restart, as nullity is checked on all variables
          https://github.com/jenkinsci/jenkins/blob/stable-2.46/core/src/main/java/jenkins/model/Jenkins.java#L4127

          New:
          {code:java}
          $ sudo "/usr/lib/jvm/java-1.8.0/bin/java" -jar "/tmp/kitchen/cache/jenkins-cli.jar" -s http://aws-instance:8080 -i "/tmp/kitchen/cache/jenkins-key" restart

          ERROR: Unexpected exception occurred while performing restart command.
          java.lang.NullPointerException
          at jenkins.model.Jenkins.doRestart(Jenkins.java:4116)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62){code}

          [https://github.com/jenkinsci/jenkins/blob/stable-2.46/core/src/main/java/jenkins/model/Jenkins.java#L4116]
          The server has "StaplerResponse rsp == null".

          The issue does not appear with safe-restart, as nullity is checked on all variables
          https://github.com/jenkinsci/jenkins/blob/stable-2.46/core/src/main/java/jenkins/model/Jenkins.java#L4127

          Daniel Beck made changes -
          Assignee New: Daniel Beck [ danielbeck ]
          Jesse Glick made changes -
          Link New: This issue relates to SECURITY-420 [ SECURITY-420 ]
          Jesse Glick made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: cli [ 15624 ]
          Description Original:
          {code:java}
          $ sudo "/usr/lib/jvm/java-1.8.0/bin/java" -jar "/tmp/kitchen/cache/jenkins-cli.jar" -s http://aws-instance:8080 -i "/tmp/kitchen/cache/jenkins-key" restart

          ERROR: Unexpected exception occurred while performing restart command.
          java.lang.NullPointerException
          at jenkins.model.Jenkins.doRestart(Jenkins.java:4116)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62){code}

          [https://github.com/jenkinsci/jenkins/blob/stable-2.46/core/src/main/java/jenkins/model/Jenkins.java#L4116]
          The server has "StaplerResponse rsp == null".

          The issue does not appear with safe-restart, as nullity is checked on all variables
          https://github.com/jenkinsci/jenkins/blob/stable-2.46/core/src/main/java/jenkins/model/Jenkins.java#L4127

          New: {code:java}
          $ sudo "/usr/lib/jvm/java-1.8.0/bin/java" -jar "/tmp/kitchen/cache/jenkins-cli.jar" -s http://aws-instance:8080 -i "/tmp/kitchen/cache/jenkins-key" restart

          ERROR: Unexpected exception occurred while performing restart command.
          java.lang.NullPointerException
          at jenkins.model.Jenkins.doRestart(Jenkins.java:4116)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62){code}

          [https://github.com/jenkinsci/jenkins/blob/stable-2.46/core/src/main/java/jenkins/model/Jenkins.java#L4116]
          The server has "StaplerResponse rsp == null".

          The issue does not appear with safe-restart, as nullity is checked on all variables
          https://github.com/jenkinsci/jenkins/blob/stable-2.46/core/src/main/java/jenkins/model/Jenkins.java#L4127

          Labels New: cli regression
          Jesse Glick made changes -
          Labels Original: cli regression New: cli lts-candidate regression
          Jesse Glick made changes -
          Summary Original: NPE in doRestart New: CLI restart command fails with NullPointerException in Jenkins.doRestart
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Oliver Gondža made changes -
          Labels Original: cli lts-candidate regression New: 2.60.2-fixed cli regression
          Daniel Beck made changes -
          Link New: This issue is duplicated by JENKINS-44080 [ JENKINS-44080 ]

            danielbeck Daniel Beck
            yetanotherion Jon Alberdi
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: