Some of this was caused by me accidentally having two Jenkins computers pointing at the same VM. But even once that was fixed it still happened from time to time after a reboot.
So I worked around this by installing a scheduled task to run at bootup to disable the Jenkins slave. Then the Jenkins master can start up the slave service properly. Cheers, Fred. On Monday, June 6, 2016 at 3:50:23 PM UTC+10, Fred Clausen wrote: > > 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/96c43942-edbc-4dea-b414-c7916fe0529a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
