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

# of executors field help states you can enter 0, but you cannot

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

      The help on the "# of executors field" states:

      Setting this value to 0 is useful to remove a disabled slave from Hudson
      temporarily without losing other configuration information.

      When you set the value to 0, and go to another field, you get a validation warning:

      Not a positive number

      And if you save, you get the following error message:

      Status Code: 500
      Exception:
      Stacktrace:

      java.lang.IllegalArgumentException: hudson.model.Descriptor$FormException:
      Invalid slave configuration for machinename – Windows XP Slave. Invalid # of
      executors.
      at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:392)
      at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:323)
      at org.kohsuke.stapler.RequestImpl.bindJSONToList(RequestImpl.java:337)
      at hudson.model.Hudson.doConfigExecutorsSubmit(Hudson.java:1575)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:103)
      at org.kohsuke.stapler.Function.bindAndinvoke(Function.java:57)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:75)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:440)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:361)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:121)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:38)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:30)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:52)
      at
      hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:28)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      at
      hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:42)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:44)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:85)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
      at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: hudson.model.Descriptor$FormException: Invalid slave configuration
      for machinename – Windows XP Slave. Invalid # of executors.
      at hudson.model.Slave.(Slave.java:115)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at
      sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at
      sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:377)
      ... 46 more

          [JENKINS-2110] # of executors field help states you can enter 0, but you cannot

          Alan Harder added a comment -

          I tried changing the code to allow 0 to be entered.. as soon as you save you get
          a 404 error because Hudson basically removes the node from the app once it has
          zero executors.. you'd need to manually modify the XML for >0 executors and
          restart Hudson to see it again.
          I wonder if we can allow zero and work around this, or update the help and not
          allow zero (you can still use "mark this node temporarily offline"; and zero
          executors does work for master node, in case you want builds only done on slaves).

          Alan Harder added a comment - I tried changing the code to allow 0 to be entered.. as soon as you save you get a 404 error because Hudson basically removes the node from the app once it has zero executors.. you'd need to manually modify the XML for >0 executors and restart Hudson to see it again. I wonder if we can allow zero and work around this, or update the help and not allow zero (you can still use "mark this node temporarily offline"; and zero executors does work for master node, in case you want builds only done on slaves).

          Alan Harder added a comment -

          started

          Alan Harder added a comment - started

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/Hudson.java
          trunk/hudson/main/core/src/main/java/hudson/model/Slave.java
          trunk/hudson/main/core/src/main/java/hudson/util/FormValidation.java
          trunk/hudson/main/core/src/main/resources/hudson/model/Messages.properties
          trunk/hudson/main/core/src/main/resources/hudson/model/Node/help-numExecutors.html
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=18731
          Log:
          [FIXED JENKINS-2110] Improved validation and help text regarding when number of
          executors setting may be zero.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/Hudson.java trunk/hudson/main/core/src/main/java/hudson/model/Slave.java trunk/hudson/main/core/src/main/java/hudson/util/FormValidation.java trunk/hudson/main/core/src/main/resources/hudson/model/Messages.properties trunk/hudson/main/core/src/main/resources/hudson/model/Node/help-numExecutors.html trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=18731 Log: [FIXED JENKINS-2110] Improved validation and help text regarding when number of executors setting may be zero.

          Phil Miller added a comment -

          I just saw this on Jenkins LTS 1.565.3.

          Phil Miller added a comment - I just saw this on Jenkins LTS 1.565.3.

          Phil Miller added a comment -

          Specifically, here's the stack trace I got when I entered '0' in the "# of executors" field for a node and clicked 'Save':

          javax.servlet.ServletException: java.lang.RuntimeException: Failed to instantiate class hudson.slaves.DumbSlave from {"name":"x.y.example.com","nodeDescription":"","numExecutors":"0","remoteFS":"/scratch/jenkins","labelString":"linux-disabled precise-disabled","mode":"EXCLUSIVE","":["hudson.plugins.sshslaves.SSHLauncher","hudson.slaves.RetentionStrategy$Always"],"launcher":{"stapler-class":"hudson.plugins.sshslaves.SSHLauncher","host":"x.y.example.com","credentialsId":"903329e1-fb79-4a0b-ac9d-7699266e65f6","port":"22","javaPath":"","jvmOptions":"","prefixStartSlaveCmd":"","suffixStartSlaveCmd":"","launchTimeoutSeconds":"","maxNumRetries":"0","retryWaitTime":"0"},"retentionStrategy":{"stapler-class":"hudson.slaves.RetentionStrategy$Always"},"nodeProperties":{"stapler-class-bag":"true"}}
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:783)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:863)
          	at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:390)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:733)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:863)
          	at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:210)
          	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:733)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:863)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:636)
          	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 net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198)
          	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176)
          	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:85)
          	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:97)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
          	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.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:74)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
          	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          	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(ThreadPoolExecutor.java:1146)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          	at java.lang.Thread.run(Thread.java:701)
          Caused by: java.lang.RuntimeException: Failed to instantiate class hudson.slaves.DumbSlave from {"name":"x.y.example.com","nodeDescription":"","numExecutors":"0","remoteFS":"/scratch/jenkins","labelString":"linux-disabled precise-disabled","mode":"EXCLUSIVE","":["hudson.plugins.sshslaves.SSHLauncher","hudson.slaves.RetentionStrategy$Always"],"launcher":{"stapler-class":"hudson.plugins.sshslaves.SSHLauncher","host":"x.y.example.com","credentialsId":"903329e1-fb79-4a0b-ac9d-7699266e65f6","port":"22","javaPath":"","jvmOptions":"","prefixStartSlaveCmd":"","suffixStartSlaveCmd":"","launchTimeoutSeconds":"","maxNumRetries":"0","retryWaitTime":"0"},"retentionStrategy":{"stapler-class":"hudson.slaves.RetentionStrategy$Always"},"nodeProperties":{"stapler-class-bag":"true"}}
          	at hudson.model.Descriptor.newInstance(Descriptor.java:576)
          	at hudson.model.Node.reconfigure(Node.java:446)
          	at hudson.model.Computer.doConfigSubmit(Computer.java:1181)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:622)
          	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
          	at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:46)
          	at org.kohsuke.stapler.Function$InterceptedFunction.invoke(Function.java:399)
          	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:733)
          	... 71 more
          Caused by: java.lang.IllegalArgumentException: Failed to instantiate class hudson.slaves.DumbSlave from {"name":"x.y.example.com","nodeDescription":"","numExecutors":"0","remoteFS":"/scratch/jenkins","labelString":"linux-disabled precise-disabled","mode":"EXCLUSIVE","":["hudson.plugins.sshslaves.SSHLauncher","hudson.slaves.RetentionStrategy$Always"],"launcher":{"stapler-class":"hudson.plugins.sshslaves.SSHLauncher","host":"x.y.example.com","credentialsId":"903329e1-fb79-4a0b-ac9d-7699266e65f6","port":"22","javaPath":"","jvmOptions":"","prefixStartSlaveCmd":"","suffixStartSlaveCmd":"","launchTimeoutSeconds":"","maxNumRetries":"0","retryWaitTime":"0"},"retentionStrategy":{"stapler-class":"hudson.slaves.RetentionStrategy$Always"},"nodeProperties":{"stapler-class-bag":"true"}}
          	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:589)
          	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:400)
          	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:396)
          	at hudson.model.Descriptor.newInstance(Descriptor.java:567)
          	... 85 more
          Caused by: java.lang.IllegalArgumentException: hudson.model.Descriptor$FormException: Invalid slave configuration for x.y.example.com. Invalid # of executors.
          	at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:462)
          	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:690)
          	at org.kohsuke.stapler.RequestImpl.access$100(RequestImpl.java:81)
          	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:587)
          	... 88 more
          Caused by: hudson.model.Descriptor$FormException: Invalid slave configuration for x.y.example.com. Invalid # of executors.
          	at hudson.model.Slave.<init>(Slave.java:179)
          	at hudson.model.Slave.<init>(Slave.java:138)
          	at hudson.slaves.DumbSlave.<init>(DumbSlave.java:53)
          	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
          	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          	at java.lang.reflect.Constructor.newInstance(Constructor.java:534)
          	at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:447)
          	... 91 more
          

          Phil Miller added a comment - Specifically, here's the stack trace I got when I entered '0' in the "# of executors" field for a node and clicked 'Save': javax.servlet.ServletException: java.lang.RuntimeException: Failed to instantiate class hudson.slaves.DumbSlave from {"name":"x.y.example.com","nodeDescription":"","numExecutors":"0","remoteFS":"/scratch/jenkins","labelString":"linux-disabled precise-disabled","mode":"EXCLUSIVE","":["hudson.plugins.sshslaves.SSHLauncher","hudson.slaves.RetentionStrategy$Always"],"launcher":{"stapler-class":"hudson.plugins.sshslaves.SSHLauncher","host":"x.y.example.com","credentialsId":"903329e1-fb79-4a0b-ac9d-7699266e65f6","port":"22","javaPath":"","jvmOptions":"","prefixStartSlaveCmd":"","suffixStartSlaveCmd":"","launchTimeoutSeconds":"","maxNumRetries":"0","retryWaitTime":"0"},"retentionStrategy":{"stapler-class":"hudson.slaves.RetentionStrategy$Always"},"nodeProperties":{"stapler-class-bag":"true"}} at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:783) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:863) at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:390) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:733) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:863) at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:210) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:733) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:863) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:636) 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 net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176) at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:85) at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:97) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99) 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.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:74) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) 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(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:701) Caused by: java.lang.RuntimeException: Failed to instantiate class hudson.slaves.DumbSlave from {"name":"x.y.example.com","nodeDescription":"","numExecutors":"0","remoteFS":"/scratch/jenkins","labelString":"linux-disabled precise-disabled","mode":"EXCLUSIVE","":["hudson.plugins.sshslaves.SSHLauncher","hudson.slaves.RetentionStrategy$Always"],"launcher":{"stapler-class":"hudson.plugins.sshslaves.SSHLauncher","host":"x.y.example.com","credentialsId":"903329e1-fb79-4a0b-ac9d-7699266e65f6","port":"22","javaPath":"","jvmOptions":"","prefixStartSlaveCmd":"","suffixStartSlaveCmd":"","launchTimeoutSeconds":"","maxNumRetries":"0","retryWaitTime":"0"},"retentionStrategy":{"stapler-class":"hudson.slaves.RetentionStrategy$Always"},"nodeProperties":{"stapler-class-bag":"true"}} at hudson.model.Descriptor.newInstance(Descriptor.java:576) at hudson.model.Node.reconfigure(Node.java:446) at hudson.model.Computer.doConfigSubmit(Computer.java:1181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:622) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298) at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:46) at org.kohsuke.stapler.Function$InterceptedFunction.invoke(Function.java:399) 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:733) ... 71 more Caused by: java.lang.IllegalArgumentException: Failed to instantiate class hudson.slaves.DumbSlave from {"name":"x.y.example.com","nodeDescription":"","numExecutors":"0","remoteFS":"/scratch/jenkins","labelString":"linux-disabled precise-disabled","mode":"EXCLUSIVE","":["hudson.plugins.sshslaves.SSHLauncher","hudson.slaves.RetentionStrategy$Always"],"launcher":{"stapler-class":"hudson.plugins.sshslaves.SSHLauncher","host":"x.y.example.com","credentialsId":"903329e1-fb79-4a0b-ac9d-7699266e65f6","port":"22","javaPath":"","jvmOptions":"","prefixStartSlaveCmd":"","suffixStartSlaveCmd":"","launchTimeoutSeconds":"","maxNumRetries":"0","retryWaitTime":"0"},"retentionStrategy":{"stapler-class":"hudson.slaves.RetentionStrategy$Always"},"nodeProperties":{"stapler-class-bag":"true"}} at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:589) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:400) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:396) at hudson.model.Descriptor.newInstance(Descriptor.java:567) ... 85 more Caused by: java.lang.IllegalArgumentException: hudson.model.Descriptor$FormException: Invalid slave configuration for x.y.example.com. Invalid # of executors. at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:462) at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:690) at org.kohsuke.stapler.RequestImpl.access$100(RequestImpl.java:81) at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:587) ... 88 more Caused by: hudson.model.Descriptor$FormException: Invalid slave configuration for x.y.example.com. Invalid # of executors. at hudson.model.Slave.<init>(Slave.java:179) at hudson.model.Slave.<init>(Slave.java:138) at hudson.slaves.DumbSlave.<init>(DumbSlave.java:53) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:534) at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:447) ... 91 more

          Daniel Beck added a comment -

          Resolving again, because the help states:

          Slaves may not have zero executors, but may be temporarily disabled using the button on the slave's status page.

          So clearly it's not like the help says it's allowed.

          The form validation will also complain about values lower than 1.

          Jenkins will allow you to submit forms that have errors and result in exceptions being thrown, which admittedly can be weird, but a completely different issue.

          Daniel Beck added a comment - Resolving again, because the help states: Slaves may not have zero executors, but may be temporarily disabled using the button on the slave's status page. So clearly it's not like the help says it's allowed. The form validation will also complain about values lower than 1. Jenkins will allow you to submit forms that have errors and result in exceptions being thrown, which admittedly can be weird, but a completely different issue.

            mindless Alan Harder
            jchristi jchristi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: