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

removing a slave from configuration breaks hudson

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • None
    • Platform: PC, OS: Linux

      Try this:

      • open hudson's main configuration page
      • add a slave with reasonable settings
      • save this configuration
      • (all is fine)
      • open configuration again
      • "delete" the slave
      • save the config

      you'll get an error!

      In this case I have to restart my JBoss server to get hudson in a useful state.
      No manual editing of config.xml and reloading helps. I found this problem in
      1.59 and 1.60.

          [JENKINS-149] removing a slave from configuration breaks hudson

          gradopado added a comment -

          Created an attachment (id=21)
          error text with stack trace

          gradopado added a comment - Created an attachment (id=21) error text with stack trace

          vsizikov added a comment -

          Actually, for me the problem is even more severe than that.

          As long an there are some slaves defined and saved,
          ANY change to any slave leads to NPE from updateComputers().

          I'm not yet very well familiar with Hudson code, but it seems that the problem
          lies in fact that Hudson.slaves is null and I haven't yet found places where
          it's being set.

          vsizikov added a comment - Actually, for me the problem is even more severe than that. As long an there are some slaves defined and saved, ANY change to any slave leads to NPE from updateComputers(). I'm not yet very well familiar with Hudson code, but it seems that the problem lies in fact that Hudson.slaves is null and I haven't yet found places where it's being set.

          Fixed. Thanks fr the problem report and the stack trace.

          Kohsuke Kawaguchi added a comment - Fixed. Thanks fr the problem report and the stack trace.

          gradopado added a comment -

          verfied with 1.61

          thanks for the fix!

          gradopado added a comment - verfied with 1.61 thanks for the fix!

          gradopado added a comment -

          With 1.79 I got a similar problem: I removed a slave and as a result, the build
          executors list is empty. Hudson runs builds as before.

          gradopado added a comment - With 1.79 I got a similar problem: I removed a slave and as a result, the build executors list is empty. Hudson runs builds as before.

          gradopado added a comment -

          Additionally, while in this broken state, it happened in one case that accessing
          a workspace gave me an error:

          --------------------------------------------------------------
          HTTP Status 500 -

          type Exception report

          message

          description The server encountered an internal error () that prevented it from
          fulfilling this request.

          exception

          javax.servlet.ServletException
          org.kohsuke.stapler.Stapler.invoke(Stapler.java:233)
          org.kohsuke.stapler.MetaClass$9.doDispatch(MetaClass.java:207)
          org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
          org.kohsuke.stapler.Stapler.invoke(Stapler.java:224)
          org.kohsuke.stapler.Stapler.invoke(Stapler.java:169)
          org.kohsuke.stapler.Stapler.service(Stapler.java:68)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

          root cause

          java.lang.NullPointerException
          hudson.model.Hudson.getComputer(Hudson.java:507)
          hudson.model.Slave.getComputer(Slave.java:351)
          hudson.model.Slave.getFilePath(Slave.java:113)
          hudson.model.Slave.getWorkspaceRoot(Slave.java:190)
          hudson.model.Slave.getWorkspaceFor(Slave.java:183)
          hudson.model.Project.getWorkspace(Project.java:84)
          hudson.model.AbstractProject.doWs(AbstractProject.java:501)
          sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          java.lang.reflect.Method.invoke(Method.java:585)
          org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:50)
          org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:59)
          org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
          org.kohsuke.stapler.Stapler.invoke(Stapler.java:224)
          org.kohsuke.stapler.MetaClass$9.doDispatch(MetaClass.java:207)
          org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
          org.kohsuke.stapler.Stapler.invoke(Stapler.java:224)
          org.kohsuke.stapler.Stapler.invoke(Stapler.java:169)
          org.kohsuke.stapler.Stapler.service(Stapler.java:68)
          javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
          org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

          note The full stack trace of the root cause is available in the Apache
          Tomcat/5.5 logs.

          gradopado added a comment - Additionally, while in this broken state, it happened in one case that accessing a workspace gave me an error: -------------------------------------------------------------- HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException org.kohsuke.stapler.Stapler.invoke(Stapler.java:233) org.kohsuke.stapler.MetaClass$9.doDispatch(MetaClass.java:207) org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30) org.kohsuke.stapler.Stapler.invoke(Stapler.java:224) org.kohsuke.stapler.Stapler.invoke(Stapler.java:169) org.kohsuke.stapler.Stapler.service(Stapler.java:68) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81) root cause java.lang.NullPointerException hudson.model.Hudson.getComputer(Hudson.java:507) hudson.model.Slave.getComputer(Slave.java:351) hudson.model.Slave.getFilePath(Slave.java:113) hudson.model.Slave.getWorkspaceRoot(Slave.java:190) hudson.model.Slave.getWorkspaceFor(Slave.java:183) hudson.model.Project.getWorkspace(Project.java:84) hudson.model.AbstractProject.doWs(AbstractProject.java:501) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:50) org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:59) org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30) org.kohsuke.stapler.Stapler.invoke(Stapler.java:224) org.kohsuke.stapler.MetaClass$9.doDispatch(MetaClass.java:207) org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30) org.kohsuke.stapler.Stapler.invoke(Stapler.java:224) org.kohsuke.stapler.Stapler.invoke(Stapler.java:169) org.kohsuke.stapler.Stapler.service(Stapler.java:68) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81) note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.

          Improved concurrency handling must have caused this regression. Fixed in 1.85.

          Kohsuke Kawaguchi added a comment - Improved concurrency handling must have caused this regression. Fixed in 1.85.

          gradopado added a comment -

          verified with 1.85

          gradopado added a comment - verified with 1.85

            Unassigned Unassigned
            gradopado gradopado
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: