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

Jenkins offers restart even though its Lifecycle does not support it

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Windows Server 2008 6.0.6002, x86_64
    • Similar Issues:

      Description

      Right now our Jenkins installation is launched as "java -j jenkins.war" but not as a windows service (As it was before). It showed that an update is available, I've pressed "upgrade automatically" and it loaded a new version. In /manage it showed "Upgrade to Jenkins 1.574 is complete, awaiting restart." where restart is a link to restart. After pressing it an error occurred:

      javax.servlet.ServletException: hudson.lifecycle.RestartNotSupportedException: Default Windows lifecycle does not support restart.
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:778)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      at org.eclipse.jetty.server.Server.handle(Server.java:370)
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
      at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
      at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
      at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: hudson.lifecycle.RestartNotSupportedException: Default Windows lifecycle does not support restart.
      at hudson.lifecycle.Lifecycle$1.verifyRestartable(Lifecycle.java:83)
      at jenkins.model.Jenkins.safeRestart(Jenkins.java:3320)
      at jenkins.model.Jenkins.doSafeRestart(Jenkins.java:3279)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
      ... 42 more

      Note that while checking internet connectivity and downloading a new version it didn't have a checkbox "restart when no jobs are running". Probably it's a good idea to detect how Jenkins is launched and in case of this exception show a note saying that in such installation it's not possible to restart application.

      Jenkins 1.573

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            Clarified title as this error does not constitute a crash (abort of the software).

            Show
            danielbeck Daniel Beck added a comment - Clarified title as this error does not constitute a crash (abort of the software).
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Beck
            Path:
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message.jelly
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_cs.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_da.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_de.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_es.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_fr.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_it.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_lv.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_nl.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_pt_BR.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_ru.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_zh_CN.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_zh_TW.properties
            http://jenkins-ci.org/commit/jenkins/563388f13058d7376dd133e509c84d6c7fa895c9
            Log:
            [FIXED JENKINS-24032] Different message when restart is not supported.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message.jelly core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_cs.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_da.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_de.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_es.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_fr.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_it.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_lv.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_nl.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_pt_BR.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_ru.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_zh_CN.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_zh_TW.properties http://jenkins-ci.org/commit/jenkins/563388f13058d7376dd133e509c84d6c7fa895c9 Log: [FIXED JENKINS-24032] Different message when restart is not supported.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Beck
            Path:
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message.jelly
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_cs.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_da.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_de.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_es.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_fr.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_it.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_lv.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_nl.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_pt_BR.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_ru.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_zh_CN.properties
            core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_zh_TW.properties
            http://jenkins-ci.org/commit/jenkins/2ea7e628c7397188dd7c46bf27a13ab9b9aa2108
            Log:
            Merge pull request #1350 from daniel-beck/JENKINS-24032

            [FIXED JENKINS-24032] Different message when restart is not supported.

            Compare: https://github.com/jenkinsci/jenkins/compare/c869cfdc0e9e...2ea7e628c739

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message.jelly core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_cs.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_da.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_de.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_es.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_fr.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_it.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_lv.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_nl.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_pt_BR.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_ru.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_zh_CN.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_zh_TW.properties http://jenkins-ci.org/commit/jenkins/2ea7e628c7397188dd7c46bf27a13ab9b9aa2108 Log: Merge pull request #1350 from daniel-beck/ JENKINS-24032 [FIXED JENKINS-24032] Different message when restart is not supported. Compare: https://github.com/jenkinsci/jenkins/compare/c869cfdc0e9e...2ea7e628c739
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3618
            [FIXED JENKINS-24032] Different message when restart is not supported. (Revision 563388f13058d7376dd133e509c84d6c7fa895c9)

            Result = SUCCESS
            daniel-beck : 563388f13058d7376dd133e509c84d6c7fa895c9
            Files :

            • core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_cs.properties
            • core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_da.properties
            • core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message.jelly
            • core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message.properties
            • core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_pt_BR.properties
            • core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_fr.properties
            • core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_it.properties
            • core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_zh_TW.properties
            • core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_ru.properties
            • core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_de.properties
            • core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_lv.properties
            • core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_nl.properties
            • core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_zh_CN.properties
            • core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_es.properties
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3618 [FIXED JENKINS-24032] Different message when restart is not supported. (Revision 563388f13058d7376dd133e509c84d6c7fa895c9) Result = SUCCESS daniel-beck : 563388f13058d7376dd133e509c84d6c7fa895c9 Files : core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_cs.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_da.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message.jelly core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_pt_BR.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_fr.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_it.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_zh_TW.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_ru.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_de.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_lv.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_nl.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_zh_CN.properties core/src/main/resources/hudson/model/UpdateCenter/CoreUpdateMonitor/message_es.properties

              People

              Assignee:
              danielbeck Daniel Beck
              Reporter:
              kroartem Artem Krosheninnikov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: