java.lang.ClassCastException: hudson.model.Hudson cannot be cast to hudson.model.Slave

Jenkins JIRA | Henri Pipe | 4 years ago
  1. 0

    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.

    Jenkins JIRA | 3 years ago | sudhir pandey
    java.lang.ClassCastException: hudson.model.Hudson cannot be cast to hudson.model.Slave
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    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.

    Jenkins JIRA | 3 years ago | sudhir pandey
    java.lang.ClassCastException: hudson.model.Hudson cannot be cast to hudson.model.Slave
  4. 0

    Memcached Java客户端2.6.1发布 - 编程语言 - ITeye资讯

    iteye.com | 1 year ago
    java.lang.ClassCastException: cannot be cast to

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      hudson.model.Hudson cannot be cast to hudson.model.Slave

      at hudson.plugins.skype.im.transport.SkypeIMConnection.createConnection()
    2. hudson.plugins.skype
      SkypeIMConnectionProvider.createConnection
      1. hudson.plugins.skype.im.transport.SkypeIMConnection.createConnection(SkypeIMConnection.java:147)
      2. hudson.plugins.skype.im.transport.SkypeIMConnection.connect(SkypeIMConnection.java:106)
      3. hudson.plugins.skype.im.transport.SkypeIMConnectionProvider.createConnection(SkypeIMConnectionProvider.java:53)
      3 frames
    3. Hudson instant-messaging plugin
      IMConnectionProvider$ConnectorRunnable.run
      1. hudson.plugins.im.IMConnectionProvider.create(IMConnectionProvider.java:65)
      2. hudson.plugins.im.IMConnectionProvider.access$600(IMConnectionProvider.java:22)
      3. hudson.plugins.im.IMConnectionProvider$ConnectorRunnable.run(IMConnectionProvider.java:183)
      3 frames
    4. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:636)
      1 frame