6

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)
Psychozoic
  • 527
  • 2
  • 7
  • 24
  • Are you sure the Java you are using is a 64bit version? What is the `java -version` output? – Eldad Assis May 20 '14 at 08:22
  • @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 May 20 '14 at 11:20
  • 1
    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 May 20 '14 at 16:33
  • @EldadAK could you please tell me how to do it? I'm trying with `Java Web Start` but it holds on `JNLP agent connected from /192.168.1.27` :( – Psychozoic May 21 '14 at 12:24
  • 1
    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 May 21 '14 at 17:40
  • @EldadAK ok. i've run it and see [this](http://pastebin.com/uzHRSE75). If you dont want see pastebin, last string is: `May 23, 2014 2:58:49 PM hudson.remoting.jnlp.Main$CuiListener statu INFO: Connected` – Psychozoic May 23 '14 at 11:02
  • 1
    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 May 26 '14 at 05:37
  • @EldadAK no, i cant use it. Master says that it is in offline :( – Psychozoic May 27 '14 at 08:59

6 Answers6

10

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)

Community
  • 1
  • 1
peepa
  • 146
  • 1
  • 5
  • But I got another error: Checking if Java exists java -version returned 1.6.0. Copying jenkins-slave.xml Copying slave.jar Starting the service Waiting for the service to become ready ERROR: The service did not respond. Perhaps it failed to launch? – Dean Chen Aug 26 '14 at 05:53
  • I know it might sound silly, but have you checked what you also need to do on Win2012 on the [Jenkins page](https://wiki.jenkins-ci.org/display/JENKINS/Windows+slaves+fail+to+start+via+DCOM) ? There is registry setting you need to have done in order for the service to be able to be started remotely. – peepa Sep 03 '14 at 14:43
4

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.

potame
  • 6,684
  • 4
  • 20
  • 30
Jacek Tomaka
  • 373
  • 5
  • 13
  • Looks like it adds `w.exe`. I the event log, i saw `Starting C:\blah\bin\javaw.exew.exe` – Slav Jul 06 '18 at 16:10
1

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...

mycroes
  • 516
  • 5
  • 16
  • 4 years later, and that's the only answer that was able to help me: leave just 'java' without exe or w or anything. Thanks! – Slav Jul 06 '18 at 16:06
0

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.

Waman
  • 1,161
  • 6
  • 15
  • 1
    yea, but it inverses the control. You now have to get on the nodes, and know which master they want. , Its a horrific solution, when compared to how clean the SSH plugin works. – J. M. Becker Sep 28 '15 at 19:28
0

For me this issue was resolved by uninstalling old java.

user936636
  • 33
  • 1
  • 5
0

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

  • After configuring, `$E:\agent_windows_jenkins>java -Djsse.enableSNIExtension=false -jar agent.jar -jnlpUrl https:///slave-agent.jnlp -secret 1145beb831d40af1sdfsfsfdsdfsdfsdff80fsdfsdfeq3e3d1f` the above command, will make sure, that, jnlp agent is up and running, post which, it will get connected once we disabled SNIExtenstion in agent node. – Madhu_Kiran_K Aug 08 '19 at 18:54