Hello All, We want to use DCOM to control the Windows slaves/nodes because we'd like to fully automate the slave provisioning process and just point Jenkins to a slave and have it connect without having to manually log and in and do the JNLP thing.
I've been able to set up a remote Jenkins node running Windows <https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+as+a+Windows+service> using the indispensable DCOM troubleshooting guide <https://wiki.jenkins-ci.org/display/JENKINS/Windows+slaves+fail+to+start+via+DCOM>. It actually works once set up but then if I reboot a node Jenkins cannot successfully reconnect. I'm seeing the following in the log files that is not represented in the DCOM troubleshooting guide : Connecting to computer.example.com Checking if Java exists java -version returned 1.8.0. Copying jenkins-slave.xml Copying slave.jar Starting the service ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkinsjava.lang.reflect.UndeclaredThrowableException <http://stacktrace.jenkins-ci.org/search?query=java.lang.reflect.UndeclaredThrowableException> at com.sun.proxy.$Proxy148.start(Unknown Source) at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:334) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:253) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor82593.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.kohsuke.jinterop.JInteropInvocationHandler.invoke(JInteropInvocationHandler.java:140) ... 8 more Caused by: org.jinterop.dcom.common.JIException: Service Already Running at org.jvnet.hudson.wmi.Win32Service$Implementation.start(Win32Service.java:149) ... 12 more If I then RDP into the Windows machine and stop the service the master is subsequently able to start it. Is there a way to have the master attempt to stop the slave agent on Windows prior to attempting to start it? This would allow reboots of Windows slaves not to require manual intervention if they are restared for whatever reason (updates, etc). Thanks, Fred. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d46e07d8-63c6-4aad-bbc0-2f6a88cfec11%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
