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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          scm_issue_link 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.

          Show
          scm_issue_link 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.
          Hide
          kohsuke 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?

          Show
          kohsuke 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?
          Hide
          scm_issue_link 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.

          Show
          scm_issue_link 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.
          Hide
          scm_issue_link 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.

          Show
          scm_issue_link 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.
          Hide
          scm_issue_link 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)

          Show
          scm_issue_link 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)

            People

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

              Dates

              Created:
              Updated:
              Resolved: