jenkins master crashes on deletetion of a node, both from command line and UI

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      We have couple of slaves machines thats added by cmd line api using an xml file.
      but when we try to delete those slaves jenkins master usability breaks and we have to restart the jenkins process in master to make it again.

      The command line output when trying to delete a slave via command line

      java -jar jenkins-cli.jar -s http://server/ delete-node buildslave1-ubuntu-12-04-amd64java.lang.ClassCastException: hudson.model.Hudson cannot be cast to hudson.model.Slave
      at hudson.slaves.SlaveComputer.grabLauncher(SlaveComputer.java:687)
      at hudson.slaves.SlaveComputer.setNode(SlaveComputer.java:661)
      at hudson.model.AbstractCIBase.updateComputer(AbstractCIBase.java:118)
      at hudson.model.AbstractCIBase.updateComputerList(AbstractCIBase.java:175)
      at jenkins.model.Jenkins.updateComputerList(Jenkins.java:1219)
      at jenkins.model.Jenkins.setNodes(Jenkins.java:1715)
      at jenkins.model.Jenkins.removeNode(Jenkins.java:1710)
      at hudson.model.Computer.doDoDelete(Computer.java:1257)
      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:616)
      at hudson.cli.declarative.MethodBinder.call(MethodBinder.java:102)
      at hudson.cli.declarative.CLIRegisterer$1.main(CLIRegisterer.java:168)
      at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
      at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:280)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:239)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
      at hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      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:679)

      And here is the server log seen after firing a node deletion command from command line or trying to delete the node from jenkins Web UI.

      Constant stream of

      Oct 25, 2013 12:54:15 PM hudson.triggers.SafeTimerTask run
      SEVERE: Timer task hudson.model.Queue$MaintainTask@5eb17728 failed
      java.lang.ClassCastException: hudson.model.Hudson cannot be cast to hudson.model.Slave
      at hudson.slaves.SlaveComputer.getNode(SlaveComputer.java:181)
      at hudson.slaves.SlaveComputer.getNode(SlaveComputer.java:96)
      at jenkins.model.Jenkins$9.compare(Jenkins.java:1546)
      at jenkins.model.Jenkins$9.compare(Jenkins.java:1542)
      at java.util.Arrays.mergeSort(Arrays.java:1283)
      at java.util.Arrays.mergeSort(Arrays.java:1294)
      at java.util.Arrays.sort(Arrays.java:1223)
      at jenkins.model.Jenkins.getComputers(Jenkins.java:1542)
      at hudson.model.Queue.maintain(Queue.java:978)
      at hudson.model.Queue$MaintainTask.doRun(Queue.java:1998)
      at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
      at java.util.TimerThread.mainLoop(Timer.java:534)
      at java.util.TimerThread.run(Timer.java:484)

      And attached is the snap shot of jenkins UI when server starts to log those error. and its completely unusable, the only way to get back the working web ui is to restart the jenkins service.

            Assignee:
            Oleg Nenashev
            Reporter:
            sudhir pandey
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: