6
votes

We want to use jenkins to build some specific software on Windows 2012 R2 x64. But when I trying to run it, master node fails whis this error:

Connecting to 192.168.1.27
Checking if Java exists
C:\Program Files\Java\jdk1.6.0_30\bin\java.exe -version returned 1.6.0.
Installing the Jenkins slave service
ERROR: Message not found for errorCode: 0xC00000AC
org.jinterop.dcom.common.JIException: Message not found for errorCode: 0xC00000AC
    at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKLM(JIWinRegStub.java:102)
    at hudson.util.jna.DotNet.isInstalled(DotNet.java:77)
    at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:292)
    at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:222)
    at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
    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:701)
Caused by: jcifs.smb.SmbException: All pipe instances are busy.
    at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)
    at jcifs.smb.SmbTransport.send(SmbTransport.java:664)
    at jcifs.smb.SmbSession.send(SmbSession.java:238)
    at jcifs.smb.SmbTree.send(SmbTree.java:119)
    at jcifs.smb.SmbFile.send(SmbFile.java:775)
    at jcifs.smb.SmbFile.open0(SmbFile.java:989)
    at jcifs.smb.SmbFile.open(SmbFile.java:1006)
    at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:142)
    at jcifs.smb.TransactNamedPipeOutputStream.<init>(TransactNamedPipeOutputStream.java:32)
    at jcifs.smb.SmbNamedPipe.getNamedPipeOutputStream(SmbNamedPipe.java:187)
    at rpc.ncacn_np.RpcTransport.attach(RpcTransport.java:91)
    at rpc.Stub.attach(Stub.java:104)
    at rpc.Stub.call(Stub.java:109)
    at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKLM(JIWinRegStub.java:100)

and I don't know what is wrong.

Yes, I've read this carefully.

upd. ok. I removed server from domain. Now jenkins says:

Connecting to 192.168.1.27
    Checking if Java exists
    C:\Program Files\Java\jdk1.6.0_30\bin\java.exe -version returned 1.6.0.
    Installing the Jenkins slave service
    Copying jenkins-slave.exe
    Copying slave.jar
    Copying jenkins-slave.xml
    Registering the service
    Starting the service
    Waiting for the service to become ready
    ERROR: The service did not respond. Perhaps it failed to launch? 

In EventViewer I see:

Service cannot be started. System.ComponentModel.Win32Exception: The system cannot find the file specified
       at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
       at winsw.WrapperService.StartProcess(Process process, String arguments, String executable)
       at winsw.WrapperService.OnStart(String[] _)
       at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
6
Are you sure the Java you are using is a 64bit version? What is the java -version output? - Eldad Assis
@EldadAK yes. its x64: C:\Users\administrator>java -version java version "1.6.0_30" Java(TM) SE Runtime Environment (build 1.6.0_30-b12) Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode) - Psychozoic
Are you able to launch the slave from command line on the Win server? If yes, it's related to the service implementation. I found that starting the slave manually and asking it to install as service works best for me. - Eldad Assis
Open a web browser on the slave and browse to the Jenkins server. Go to Jenkins -> Manage -> Manage Nodes and select the Slave. Configure it to launch via java web start. Once saved, the page will suggest the command line to run to start it. You can then run this command and see if it works. - Eldad Assis
This looks like a good output. Are you able to run a job on this slave while its running? Now, I suspect that the problem is related to the service installation, but I'm not sure what it is... Do you have a little app window with the Jenkins service? If so, try to install the service from it's menu and see how it works. - Eldad Assis

6 Answers

10
votes

I had the same issue on on Windows 2012 R2 x64:

    Installing the Jenkins slave service
ERROR: Message not found for errorCode: 0xC00000AC
org.jinterop.dcom.common.JIException: Message not found for errorCode: 0xC00000AC
    at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKLM(JIWinRegStub.java:102)
    at hudson.util.jna.DotNet.isInstalled(DotNet.java:77)
    at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:292)
    at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:228)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: jcifs.smb.SmbException: All pipe instances are busy.
    at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)
    at jcifs.smb.SmbTransport.send(SmbTransport.java:664)
    at jcifs.smb.SmbSession.send(SmbSession.java:238)
    at jcifs.smb.SmbTree.send(SmbTree.java:119)
    at jcifs.smb.SmbFile.send(SmbFile.java:775)
    at jcifs.smb.SmbFile.open0(SmbFile.java:989)
    at jcifs.smb.SmbFile.open(SmbFile.java:1006)
    at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:142)
    at jcifs.smb.TransactNamedPipeOutputStream.<init>(TransactNamedPipeOutputStream.java:32)
    at jcifs.smb.SmbNamedPipe.getNamedPipeOutputStream(SmbNamedPipe.java:187)
    at rpc.ncacn_np.RpcTransport.attach(RpcTransport.java:91)
    at rpc.Stub.attach(Stub.java:104)
    at rpc.Stub.call(Stub.java:109)
    at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKLM(JIWinRegStub.java:100)
    ... 7 more

and have found out, that jenkins slave to be run as a service requires to have .net 3.x installed (which is not by default on win2012 servers).

After having the 3.5 .net framework installed jenkins slave service got installed without issues (and the server remained in domain).

To not loose time in case you'd hit problems while installing 3.5 framework as I did, refer to this SO answer: Offline installer for .Net 3.5 SP1 not working (disabling the WSUS helped me to get the installation through)

4
votes

I had this issue:

Service cannot be started. System.ComponentModel.Win32Exception: The system cannot find the file specified at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at winsw.WrapperService.StartProcess(Process process, String arguments, String executable) at winsw.WrapperService.OnStart(String[] _) at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)

And the problem went away when i changed Path to java executable from :

C:\ProgramData\Oracle\Java\javapath\javaw

to

C:\ProgramData\Oracle\Java\javapath\java

I think 'w' is appended by JENKINS anyway.

1
votes

I have a Windows 8 slave, which does work. Fair chance the Java path is incorrect, mine is set to C:\Program Files (x86)\Java\jre7\bin\java (yes, no .exe or anything, adjust just the Program (x86) Files part if you want to use x64 version) in Jenkins. I also have remote root set (to C:\jenkins) and I have an environment variable HOME set to C:\jenkins\ (yes, one is with \ and the other without), but that's only to make it easy to find the files after installation.

My slave works, appears online and then after a while (of idling mostly) will have connection issues. Disconnecting and reconnecting will then sometimes give the 'All pipe instances are busy' error, in that case I just have to do Launch slave agent a couple of times. Found your question when trying to solve that particular issue...

0
votes

First thing, you can Go to the slave machine, Go to Jenkins -> Manage -> Manage Nodes and select the Slave and launch via java web start.

by doing this you will download a .jnlp file and launch it using java configured by you.

Make sure you have configured path to javaws.exe in system variable "PATH"(with version 1.6 or higher).

It will launch a window and and display as "Connected". Now you can click on "File" and install as service.

This fails giving you an exception if the machine does not have .NET 3.x so make sure you have installed it and then try it again.

This works pretty cleanly without any issues. Hope this helps.

0
votes

For me this issue was resolved by uninstalling old java.

0
votes

I encountered a similar issue, when trying to run the slave(agent) from master(jenkins), after making one configuration change as below it worked fine,

the below settings needs to added in the agent node->configure.

JVM option -Djsse.enableSNIExtension=false

At Jenkins->Agent node, for a windows server 2012 slave configuration