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

/restart says Hudson cannot be restarted, but gives no reason

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      Hudson 1.328. One of our installations is supposed to be running as a Solaris
      service. No "Restart" button is offered after doing upgrades, and
      http://bertram.netbeans.org/hudson/restart just says

      "Error - Restart is not supported in this running mode."

      Perhaps something about how it was launched prevents restarting from working,
      but what? The admin UI gives no clue as to what the problem is or how it might
      be corrected. I think if Lifecycle.canRestart returns false, there should also
      be a companion method giving a localized explanation of the problem, to be
      displayed on /restart and also places where restart would be offered as an
      option. If UnixLifecycle.<init> caught an error from JavaVMArguments.current(),
      what was it? etc.

          [JENKINS-4876] /restart says Hudson cannot be restarted, but gives no reason

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/core/src/main/java/hudson/lifecycle/Lifecycle.java
          trunk/hudson/main/core/src/main/java/hudson/lifecycle/RestartNotSupportedException.java
          trunk/hudson/main/core/src/main/java/hudson/lifecycle/UnixLifecycle.java
          trunk/hudson/main/core/src/main/java/hudson/model/Hudson.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=23978
          Log:
          [FIXED JENKINS-4876] If restart is not supported, explain why.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/lifecycle/Lifecycle.java trunk/hudson/main/core/src/main/java/hudson/lifecycle/RestartNotSupportedException.java trunk/hudson/main/core/src/main/java/hudson/lifecycle/UnixLifecycle.java trunk/hudson/main/core/src/main/java/hudson/model/Hudson.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=23978 Log: [FIXED JENKINS-4876] If restart is not supported, explain why.

          When invoked from SMF, Hudson needs to be told so by explicitly setting a life
          cycle system property to a specific implementation.

          The IPS distribution of Hudson comes with a manifest file that does this, but if
          you write one yourself, it probably wouldn't have one.

          Maybe Hudson should check known SMF environment variables plus the parent
          process name to auto-detect if it's run as a SMF service?

          Kohsuke Kawaguchi added a comment - When invoked from SMF, Hudson needs to be told so by explicitly setting a life cycle system property to a specific implementation. The IPS distribution of Hudson comes with a manifest file that does this, but if you write one yourself, it probably wouldn't have one. Maybe Hudson should check known SMF environment variables plus the parent process name to auto-detect if it's run as a SMF service?

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/core/src/main/java/hudson/lifecycle/Lifecycle.java
          trunk/hudson/main/core/src/main/java/hudson/lifecycle/UnixLifecycle.java
          trunk/hudson/main/core/src/main/java/hudson/model/Hudson.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=23979
          Log:
          JENKINS-4876 Compatibility for the caller. This is more convenient for Jelly scripts, too.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/lifecycle/Lifecycle.java trunk/hudson/main/core/src/main/java/hudson/lifecycle/UnixLifecycle.java trunk/hudson/main/core/src/main/java/hudson/model/Hudson.java http://fisheye4.cenqua.com/changelog/hudson/?cs=23979 Log: JENKINS-4876 Compatibility for the caller. This is more convenient for Jelly scripts, too.

          Code changed in hudson
          User: : jglick
          Path:
          trunk/hudson/main/core/src/main/java/hudson/lifecycle/Lifecycle.java
          http://jenkins-ci.org/commit/26363
          Log:
          JENKINS-4876 Better diagnostics for verifyRestartable in case of fallback lifecycle impl.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : jglick Path: trunk/hudson/main/core/src/main/java/hudson/lifecycle/Lifecycle.java http://jenkins-ci.org/commit/26363 Log: JENKINS-4876 Better diagnostics for verifyRestartable in case of fallback lifecycle impl.

          Code changed in hudson
          User: : jglick
          Path:
          trunk/hudson/main/core/src/main/java/hudson/lifecycle/Lifecycle.java
          http://jenkins-ci.org/commit/26362
          Log:
          JENKINS-4876 Improving RestartNotSupportedException diagnostics.
          Getting the following in 1.336 on Solaris, which does not tell you what is actually wrong (what subclass does not override restart?):
          hudson.lifecycle.RestartNotSupportedException: Restart is not supported in this running mode.
          at hudson.lifecycle.Lifecycle.verifyRestartable(Lifecycle.java:161)
          at hudson.model.Hudson.safeRestart(Hudson.java:2928)

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : jglick Path: trunk/hudson/main/core/src/main/java/hudson/lifecycle/Lifecycle.java http://jenkins-ci.org/commit/26362 Log: JENKINS-4876 Improving RestartNotSupportedException diagnostics. Getting the following in 1.336 on Solaris, which does not tell you what is actually wrong (what subclass does not override restart?): hudson.lifecycle.RestartNotSupportedException: Restart is not supported in this running mode. at hudson.lifecycle.Lifecycle.verifyRestartable(Lifecycle.java:161) at hudson.model.Hudson.safeRestart(Hudson.java:2928)

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: