Child pages
  • Windows slaves fail to start via DCOM
Skip to end of metadata
Go to start of metadata

If you choose "Let Jenkins control this Windows slave as a Windows service" for connecting to slave (see Windows Slaves Plugin), you may get an error message like this:

Access is denied. [0x00000005]
	at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:542)
	at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:458)
	at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:427)
	at org.jvnet.hudson.wmi.WMI.connect(WMI.java:41)
	at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:107)
	at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:170)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: rpc.FaultException: Received fault. (unknown)
	at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:142)
	at rpc.Stub.call(Stub.java:112)
	at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:538)
	... 10 more

If so, check the following settings one after the other on Windows

Windows account related issues

Local "Administrator" group membership

Make sure that the user name you have entered is a member of the local "Administrators" group. In the default Windows installation, this group membership is required for Jenkins to remotely copy files and install a service.

Slave under domain account

If your slave is running under a domain account and you get an error code 0x800703FA, change a group policy:

  • open the group policy editor (gpedit.msc)
  • go to Computer Configuration->Administrative Templates->System-> UserProfiles, "Do not forcefully unload the user registry at user logoff"
  • Change the setting from "Not Configured" to "Enabled", which disables the new User Profile Service feature ('DisableForceUnload' is the value added to the registry)

Credit to Oliver Walsh (see comments below)

Windows networking related issues

Firewall

By default, Windows Firewall prevents the TCP connections necessary to make this mechanism work. The firewall on the slave must allow the following exceptions (see List of TCP&UDP port numbers):

  • TCP Port 135 (DCE/RPC Locator service)
  • TCP Port 139 (NetBIOS Session Service)
  • TCP Port 445 (Windows shares)
  • C:\WINDOWS\system32\dllhost.exe (dllhost.exe seems to use a random port number)
  • C:\WINDOWS\system32\javaw.exe (Jenkins also uses a random port number)
  • File and Printer sharing (TCP 139, TCP 445, UDP 137, UDP 138 (possibly only a subset of these is required))

The easiest way to track down firewall issues is to use tcpdump. Just run the following command on the Jenkins server, which is trying to connect to the slave:

Linux/UNIX:

tcpdump -n -i <IF> -s 1500 port not 22 and host <HOST-IP>

<IF>       the network interface name, e.g. eth1
<HOST-IP>  the IP address of the slave

Ports 139 and 445

When the Ports 139 (NetBIOS Session Service) and 445 (Windows Shares) are not available, the following error message appears:

ERROR: Message not found for errorCode: 0xC0000001
org.jinterop.dcom.common.JIException: Message not found for errorCode: 0xC0000001
 at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKCR(JIWinRegStub.java:121)
 at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:479)
 at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:427)
 at org.jvnet.hudson.wmi.WMI.connect(WMI.java:41)
 at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:137)
 at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:184)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:619)
Caused by: jcifs.smb.SmbException:
Connection timeout jcifs.util.transport.TransportException: Connection timeout
 at jcifs.util.transport.Transport.connect(Transport.java:178)
 at jcifs.smb.SmbTransport.connect(SmbTransport.java:294)
 at jcifs.smb.SmbTree.treeConnect(SmbTree.java:141)
 at jcifs.smb.SmbFile.doConnect(SmbFile.java:858)
 at jcifs.smb.SmbFile.connect(SmbFile.java:901)
 at jcifs.smb.SmbFile.connect0(SmbFile.java:827)
 at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:76)
 at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:65)
 at jcifs.smb.SmbFile.getInputStream(SmbFile.java:2784)
 at rpc.ncacn_np.RpcTransport.attach(RpcTransport.java:90)
 at rpc.Stub.attach(Stub.java:105)
 at rpc.Stub.call(Stub.java:109)
 at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKCR(JIWinRegStub.java:119)
 at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:479)
 at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:427)
 at org.jvnet.hudson.wmi.WMI.connect(WMI.java:41)
 at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:137)
 at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:184)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:619)
 at jcifs.smb.SmbTransport.connect(SmbTransport.java:296)
 at jcifs.smb.SmbTree.treeConnect(SmbTree.java:141)
 at jcifs.smb.SmbFile.doConnect(SmbFile.java:858)
 at jcifs.smb.SmbFile.connect(SmbFile.java:901)
 at jcifs.smb.SmbFile.connect0(SmbFile.java:827)
 at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:76)
 at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:65)
 at jcifs.smb.SmbFile.getInputStream(SmbFile.java:2784)
 at rpc.ncacn_np.RpcTransport.attach(RpcTransport.java:90)
 at rpc.Stub.attach(Stub.java:105)
 at rpc.Stub.call(Stub.java:109)
 at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKCR(JIWinRegStub.java:119)
 ... 10 more

Windows NAT blocking

This can occur whenever you've got a Jenkins server, and a newer version of Windows (e.g. 2008) on different network segments as a slave (has observed it on EC2). You'll get an error saying port 135 is unavailable even if you've opened it. There's a setting on the advanced tab of firewall rules, you must select "Allow Edge Traversal". NAT is not security damn it!

Windows registry related issues

Remote Communication Service

The Remote Communication Service "RemComSvc" must be running in order to launch commands remotely. If not started, Jenkins will try to (remotely) start this service, assuming it is well configured. If not, you may get an error like :

Checking if Java exists
ERROR: Failed to prepare Java
java.lang.reflect.UndeclaredThrowableException

In some cases (especially Windows 2008 R2) this can be caused by the lack of the Visual C++ runtime libraries needed by the service. If this is the case you will see an error in the windows event log similar to:

Activation context generation failed for "C:\Windows\RemComSvc.exe".
Dependent Assembly Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found.
Please use sxstrace.exe for detailed diagnosis.

To solve this issue install the Visual C++ 2008 x86 libraries.

The Remote Communication Service source code is part of Jenkins.

Remote Registry Service

The Remote Registry service must be running in order to install the Jenkins service, but it may be stopped on your computer.  This is especially true for Windows Vista, where it is disabled by default.  If it is not running, you may get an error like this:

Message not found for errorCode: 0xC0000034
 org.jinterop.dcom.common.JIException: Message not found for errorCode: 0xC0000034
     at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKCR(JIWinRegStub.java:121)
     at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:479)
     at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:427)
     at org.jvnet.hudson.wmi.WMI.connect(WMI.java:41)
     at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:107)
     at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:178)
     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:1110)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
     at java.lang.Thread.run(Thread.java:636)
 Caused by: jcifs.smb.SmbException: The system cannot find the file specified.
     at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:542)
     at jcifs.smb.SmbTransport.send(SmbTransport.java:644)
     at jcifs.smb.SmbSession.send(SmbSession.java:242)
     at jcifs.smb.SmbTree.send(SmbTree.java:111)
     at jcifs.smb.SmbFile.send(SmbFile.java:729)
     at jcifs.smb.SmbFile.open0(SmbFile.java:934)
     at jcifs.smb.SmbFile.open(SmbFile.java:951)
     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:105)
     at rpc.Stub.call(Stub.java:109)
     at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKCR(JIWinRegStub.java:119)
     ... 10 more

If so, start the control panel, open "Administrative Tools," then "Services." Locate the Remote Registry service on the list, and click "Start this service."

Enable Remote Registry Access on Windows 7

By default Windows 7 (at least) will still deny remote access to the registry, even if the Remote Registry service is started. To test this, try to connect to your slave's registry via regedit on another machine. If you get a similar error ("Access is denied"), run powershell as an administrator on the slave, and execute Enable-PSRemoting. Reboot for good measure, and try launching the slave again.

Windows security related issues

Local Security Settings

  1. Start the control panel, go to "Administrative Tools", then "Local Security Policy". This will open up the "local security settings" window
  2. Go to "Local Policies" > "Security Options" > "Network access: Sharing and security model for local accounts." Change that to "Classic."

    This only applies to Windows computers that are not a part of a domain (reference)

WBEM Scripting Locator

On current Windows systems, Jenkins requires access to the "WBEM Scripting Locator". The following steps allow that:

  1. Launch 'regedit' (as Administrator)
  2. Find (Ctrl+F) the following registry key: "{76A64158-CB41-11D1-8B02-00600806D9B6}" (it's in HKEY_CLASSES_ROOT\CLSID)
  3. Right click and select 'Permissions'
  4. Change owner to administrators group (Advanced...).
  5. Change permissions for administrators group. Grant Full Control.
  6. Change owner back to TrustedInstaller (user is "NT Service\TrustedInstaller" on local machine)
  7. Restart Remote Registry Service (Administrative Tools / Services)

Credit to Florian Vogle on the Hudson wiki.

Access is denied error

When you get an

"Access is denied. [0x00000005]"

error, apply the following patch to the registry:

  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
  • create or modify 32-bit DWORD: LocalAccountTokenFilterPolicy
  • set the value to: 1

Credit to Arturas Sirvinskas (comments below)

Remote Agent - Windows returned error code 0x8001ffff

On Windows 2008 R2 (64bits), if you see a message like this:

ERROR: Message not found for errorCode: 0x8001FFFF
org.jinterop.dcom.common.JIException: Message not found for errorCode: 0x8001FFFF
 at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:546)
 at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:458)
 at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:427)
 at org.jvnet.hudson.wmi.WMI.connect(WMI.java:59)
 at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:218)
 at org.jenkinsci.plugins.vSphereCloudLauncher.launch(vSphereCloudLauncher.java:198)
 at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:204)
 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketTimeoutException
 at sun.nio.ch.SocketAdaptor$SocketInputStream.read(Unknown Source)
 at sun.nio.ch.ChannelInputStream.read(Unknown Source)
 at org.jinterop.dcom.transport.JIComTransport.receive(JIComTransport.java:146)
 at rpc.DefaultConnection.receiveFragment(DefaultConnection.java:182)
 at rpc.DefaultConnection.receive(DefaultConnection.java:68)
 at rpc.ConnectionOrientedEndpoint.receive(ConnectionOrientedEndpoint.java:227)
 at rpc.ConnectionOrientedEndpoint.bind(ConnectionOrientedEndpoint.java:181)
 at rpc.ConnectionOrientedEndpoint.rebind(ConnectionOrientedEndpoint.java:153)
 at org.jinterop.dcom.transport.JIComEndpoint.rebindEndPoint(JIComEndpoint.java:40)
 at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:535)
 ... 11 more

To resolve these issues, you may need to disable NTLMv2 authentication.
To turn off NTLMv2 authentication:

  1. Run regedit to edit the registry.
  2. Locate the following registry key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa.
  3. Locate the value named LMCompatibilityLevel, and change the DWORD value to 2 (send NTLM authentication only).
  4. Close regedit and restart the machine.

Taken from https://support.quest.com/SolutionDetail.aspx?id=SOL86281

Windows installation related issues

Configuration of the slave if jenkins master server changed address

Make sure to check out logs of the starting service.
If you are changing configuration of the jenkins it is possible that slave tries to connect to old masters address.
To fix this:

  1. on the slave: stop jenkins windows service (if not already dead)
  2. on the master: go to Jenkins > Manage Jenkins > Configure System, and copy value from 'Jenkins URL' parameter
  3. on the slave: edit jenkins-slave.xml and alter there service/arguments section to reflect new url of the server, copied in the previous step, save config
  4. on the slave: start jenkins service and check logs if anything else fails.

.NET Framework

On Windows XP / 2003, if you see a message like this:

Installing the Hudson slave service
No more data is available. [0x00000103]
org.jinterop.dcom.common.JIException: No more data is available. [0x00000103]
	at org.jinterop.winreg.smb.JIWinRegStub.winreg_EnumKey(JIWinRegStub.java:390)
	at hudson.util.jna.DotNet.isInstalled(DotNet.java:81)
	at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:117)
	at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:180)
	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:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
Caused by: org.jinterop.dcom.common.JIRuntimeException: No more data is available. [0x00000103]
	at org.jinterop.winreg.IJIWinReg$enumKey.read(IJIWinReg.java:762)
	at ndr.NdrObject.decode(NdrObject.java:19)
	at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:138)
	at rpc.Stub.call(Stub.java:112)
	at org.jinterop.winreg.smb.JIWinRegStub.winreg_EnumKey(JIWinRegStub.java:386)
	... 8 more

Then try upgrading .NET framework to ver 3.5SP1.

Taken from http://n4.nabble.com/exception-when-winxp-slaves-launch-No-more-data-is-available-0x00000103-td386006.html

Windows 64bit installation related issues

See page comments below for various tips on using Windows 64bit slave (Windows 7 or Server 2008).

Make sure java bin directory is in your system path, e.g. \Program Files (x86)\Java\jre6\bin or \Windows\SYSWOW64

WARNING: You must have the path to the JRE that is installed in \Windows\SYSWOW64.  For example, when my system updated to Java7 I had to update the PATH to point at the new JRE or starting the slave just silently failed.

If this bugs you, then upvote https://issues.jenkins-ci.org/browse/JENKINS-16061 and https://issues.jenkins-ci.org/browse/JENKINS-14559

Windows 2008 R2 (64bit)

This is an attempt to describe what I had to do on a clean Windows 2008 R2 (64bit) install to get it to work:

  1. Turned off the firewall (this could be configured correctly to be safer, but I didn't care since its in a firewalled "safe" part of the net)
  2. Installed the Visual C++ Redist
  3. Changed the permissions on the TrustedInstaller registry key (see above).
  4. Added the Java "/bin" directory to "PATH"

Windows Server 2012 (64bit)

To connect to Windows Server 2012, Change Permission for following registry key to Full Control:

- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID{72C24DD5-D70A-438B-8A42-98424B88AFB8}

- HKEY_CLASSES_ROOT\CLSID{76A64158-CB41-11D1-8B02-00600806D9B6}

  1. Launch 'regedit' (as Administrator)
  2. Find (Ctrl+F) the following registry key: "{72C24DD5-D70A-438B-8A42-98424B88AFB8}" in HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\
  3. Right click and select 'Permissions'
  4. Change owner to administrators group (Advanced...).
  5. Change permissions for administrators group. Grant Full Control.
  6. Change owner back to TrustedInstaller (user is "NT Service\TrustedInstaller" on local machine)
  7. Repeat the steps 1-6 for HKEY_CLASSES_ROOT\CLSID{76A64158-CB41-11D1-8B02-00600806D9B6}
  8. Restart Remote Registry Service (Administrative Tools / Services)

The user that is used for logging on also needs the permission "Log on as a service":

  1. To open Local Security Policy, click Start, point to Control Panel, point to Administrative Tools, and then double-click Local Security Policy.
  2. In the console tree, double-click Local Policies, and then click User Rights Assignment.
  3. In the details pane, double-click Log on as a service.
  4.  Click Add User or Group, and then add the appropriate account to the list of accounts that possess the Log on as a service right.

See also https://technet.microsoft.com/en-us/library/cc794944(v=ws.10).aspx 
If the service is not starting (both from Jenkins or manually), check that you have the .NET Framework 3.5 SP1 installed.

Follow these steps if you encounter errors during the installation of the Framework: https://stackoverflow.com/questions/14192244/offline-installer-for-net-3-5-sp1-not-working

If all else fails...

Check the jenkins-slave.err file in the jenkins path on your intended slave. This will typically give more information on the specific error being encountered when failing to launch the slave service.

If you have KB2661256 installed, you can refer to this issue https://issues.jenkins-ci.org/browse/JENKINS-15596
Please file an issue about the problem with the stack trace, with information like Windows versions, so that we can take a look.

What is it actually trying to do?

This section goes into the details of how the managed Windows slave launcher actually works.

This launcher uses several protocols that has been around for a quite some time.

  • It first uses CIFS (also known as "Windows file share protocol") to push files into the slave. When used by someone with administrative priviledges, Windows file shares expose what's commonly known as "administrative shares", which are hidden exported directories that cover every drive in the system.
  • It then uses DCOM to talk to WMI to install and start a service remotely.
  • Jenkins uses two services, one is called Remote Communication Service and this provides a general-purpose remote command execution capability. Jenkins uses this to check if Java is available and if not install it. A failure to do this is not fatal problem, as Jenkins will proceed by assuming that Java is available in a reasonable place. This service is destroyed after it is used so as not to cause any harm to the security. The communication between Jenkins master and this service happens over a named pipe, which itself is protected by access control.
  • Jenkins then installs the actual slave as a Windows service, by using the WMI over DCOM, then it starts this service.

16 Comments

  1. Unknown User (jayanthmca)

    Solution for "hudson slave service on local computer started and then stopped"

    Clear Event Log (control panel> administrator tools>event viewer)

    Now start the service

  2. Another cause for "Message not found for errorCode: 0x00000005" is due to "TrustedInstaller" and requires editing a registry key permission: http://wiki.hudson-ci.org/display/HUDSON/Windows+slaves+fail+to+start+via+DCOM#comment-thread-5432945

  3. Had Access is denied. [0x00000005] on windows 7 ent, 64 bit.

    Solution was found in http://answers.microsoft.com/en-us/windows/forum/windows_7-security/getting-access-is-denied-when-accessing-windows-7/23369f35-bc45-4147-9c3e-74a47d530757

    Solution is realy easy just a one key in registry:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
    create or modify 32-bit DWORD: LocalAccountTokenFilterPolicy
    set the value to: 1

  4. I got errorCode 0x800703FA on windows 7 x64 running the slave service under a domain account. The solution was this http://blogs.msdn.com/b/distributedservices/archive/2009/11/06/a-com-server-application-may-stop-working-on-windows-server-2008.aspx

    The LocalAccountTokenFilterPolicy reg key fix and the "TrustedInstaller" registry key permission fix were required too.

  5. I had "Access is denied [0x00000005]" as well, with the slave running on Win-7 64-bit Home Premium.  We just moved our master to an https address, and examining jenkins-slave.err.log showed the following:

    "

    Exception in thread "main" java.io.IOException: Failed to validate a server certificate. If you are using a self-signed certificate, you can use the -noCertificateCheck option to bypass this check. at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:263) at hudson.remoting.Launcher.run(Launcher.java:190) at hudson.remoting.Launcher.main(Launcher.java:166)
    Exception in thread "main" java.io.IOException: Failed to validate a server certificate. If you are using a self-signed certificate, you can use the -noCertificateCheck option to bypass this check.

    at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:263)

    at hudson.remoting.Launcher.run(Launcher.java:190)

    at hudson.remoting.Launcher.main(Launcher.java:166)

    ...
    "
    But of course, simply adding -noCertificateCheck to the jenkins-slave XML arguments tag didn't work.

    An additional step is necessary, outlined here: http://apache.resourcezen.com/jenkins-slave-authentication

    Basically, create a directory called 'lib' within the directory where jenkins-slave.exe resides.  In this 'lib' directory, you need to put the commons-codec-1.6.jar file (or whichever the current version is), as downloaded from: http://commons.apache.org/codec/download_codec.cgi

    Then, in the jenkins-slave.xml file, you'll see an '<arguments>' tag.  Append the following to the end of what's there: -classpath "%BASE%\lib\commons-codec-1.6.jar" -noCertificateCheck

    (In the resourcezen link specified above, it suggests using jnlpCredentials too, but our master does not require this, so I left them out.)

    Now, I had done several other things as suggested on this wiki and within other forums to get this up and working, but inclusion of the common-codecs.jar is what ultimately succeeded.  It's possible that something else I changed helped this to succeed, so I'll detail the one additional step which may be necessary.  Since we're running Win7 Home Premium (not Professional or Ultimate), "Local Security Policy" under "Administrative Tools" is no longer available.  Never fear...regedit is here!

    In the registry key: HKLM\SYSTEM\CurrentControlSet\Control\Lsa , add a 32-bit DWORD with the name ' LmCompatibilityLevel ' and set its value to 1.  Information about this registry key can be found here: http://technet.microsoft.com/en-us/library/cc960646.aspx

  6. As already told by other users, here what worked for me (Windows Server 2008 R2, 64bits)

    Jenkins requires full access to WBEM Scripting Locator (HKEY_CLASSES_ROOT\CLSID{76A64158-CB41-11D1-8B02-00600806D9B6}). Default for administrators group is just read.Change permissions for administrators group to "Full Control".

    1. Launch 'regedit.exe' as 'Administrator'
    2. Find the following registry key: HKEY_CLASSES_ROOT\CLSID\ {76A64158-CB41-11D1-8B02-00600806D9B6}
    3. Right click and select 'Permissions'
    4. Change owner to administrators group.
    5. Change permissions for administrators group. Grant Full Control.
    6. Change owner back to TrustedInstaller (user is "NT Service\TrustedInstaller")
    7. Restart Remote Registry Service
    8. Install http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5582 on the slave
    9. Make sure java is accessible in the PATH.
  7. In a completely firewalled environment, opening port 35380 seems to have helped a lot, in addition to the ports mentioned above.

  8. Hello,

    Very nice/usefull error-code page.

    I have another to submit to your powerfull brain ;-)

    when i tried from a solaris to connect a Windows 2008R2 I get this error :

    [0x80020009]- Profile:WMIProfile

    Unknown macro: {domain="MYDOMAIN", username="MYUSER", host="MYSERVER_DNS_ALIAS"}

    Query: "ROOT\CIMV2: select Caption, CSDVersion from Win32_OperatingSystem"

    Caused by: org.jinterop.dcom.impls.automation.JIAutomationException: Exception occurred.  [0x80020009]
            at org.jinterop.dcom.impls.automation.JIDispatchImpl.invoke(JIDispatchImpl.java:333)
            at org.jinterop.dcom.impls.automation.JIDispatchImpl.callMethodA(JIDispatchImpl.java:520)
            at org.jinterop.dcom.impls.automation.JIDispatchImpl.callMethodA(JIDispatchImpl.java:526)
            at org.jinterop.dcom.impls.automation.JIDispatchImpl.callMethodA(JIDispatchImpl.java:477)
            at com.quest.qsi.fason.framework.connections.wmi.WMIConnectionImpl.execute(WMIConnectionImpl.java:193)
            ... 4 more
    Caused by: org.jinterop.dcom.common.JIRuntimeException: Exception occurred.  [0x80020009]
            at org.jinterop.dcom.core.JICallBuilder.readResult(JICallBuilder.java:1079)
            at org.jinterop.dcom.core.JICallBuilder.read(JICallBuilder.java:957)
            at ndr.NdrObject.decode(NdrObject.java:36)
            at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:137)
            at rpc.Stub.call(Stub.java:113)
            at org.jinterop.dcom.core.JIComServer.call(JIComServer.java:901)
            at org.jinterop.dcom.core.JIComServer.call(JIComServer.java:856)
            at org.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:266)
            at org.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:153)
            at org.jinterop.dcom.impls.automation.JIDispatchImpl.invoke(JIDispatchImpl.java:315)
            ... 8 more
    !!!Failed to Connect to WMI, Host:MYSERVER_DNS_ALIAS User:MYDOMAIN\MYUSER!!!

    very strange think, when i get the ip address (on the same server by nslookup command) the connection works :

    ###Succeed connecting to WMI, Host:10.xx.xx.18 User:MYDOMAIN\MYUSER###
    Result:
    Class "Win32_OperatingSystem"{
            Property "Caption": Type "STRING" : Value "[Microsoft Windows Server 2008 R2 Enterprise ]"
            Property "CSDVersion": Type "STRING" : Value "[Service Pack 1]"
    }

    Do you have any idea about this?

    Regards,

    Thanks in advance

    Eric

  9. I have found that some times .Net 3.5 is not installed on the slave machine. Add this through the Windows features and it may resolve issues relating to java

  10. ERROR: Access is denied. See http://wiki.jenkins-ci.org/display/JENKINS/Windows+slaves+fail+to+start+via+DCOM for more information about how to resolve this.
    org.jinterop.dcom.common.JIException: Message not found for errorCode: 0x00000005 at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:542) at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:458) at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:427) at org.jvnet.hudson.wmi.WMI.connect(WMI.java:59) at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:206) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:261) 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: rpc.FaultException: Received fault. (unknown) at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:142) at rpc.Stub.call(Stub.java:112) at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:538) ... 10 moreAny help or recommendation on this.

    Here's my setup

    • Jenkins master:linux
    • Jenkins slave: windows
    • Slave Launch Method: Let jenkins control this windows slaves as as windows service.
    • and set the administrator username, password, host and run service as: use administrator account give above

    ERROR: Access is denied. See http://wiki.jenkins-ci.org/display/JENKINS/Windows+slaves+fail+to+start+via+DCOM for more information about how to resolve this.
    org.jinterop.dcom.common.JIException: Message not found for errorCode: 0x00000005
    at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:542)
    at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:458)
    at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:427)
    at org.jvnet.hudson.wmi.WMI.connect(WMI.java:59)
    at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:206)
    at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:261)
    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: rpc.FaultException: Received fault. (unknown)
    at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:142)
    at rpc.Stub.call(Stub.java:112)
    at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:538)
    ... 10 more

  11. Given that it takes a book (above) to describe how to solve the problem

    and that some folks have iterated over the book multiple times and still can't get it to work

    Maybe bring back JNLP slave as a selectable option?

    I had to give up and go psexec route to get some automation up and running using Jenkins 2.

  12. We're having an issue connecting a Windows 2008 64 bit server as a windows service on our Jenkins. Our Jenkins installation is 1.625.1 running on a RHEL server. We're able to connect the node via JNLP, but when we try to connect using the windows service it throws the below error. We've gone through the troubleshooting steps provided for this error code along with changed the registry key settings and it still fails. Any ideas on what could be the issue is greatly appreciated?

    ERROR: Message not found for errorCode: 0x8001FFFF
    org.jinterop.dcom.common.JIException: Message not found for errorCode: 0x8001FFFF
    at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:546)
    at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:458)
    at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:427)
    at org.jvnet.hudson.wmi.WMI.connect(WMI.java:59)
    at hudson.os.windows.ManagedWindowsServiceLauncher.afterDisconnect(ManagedWindowsServiceLauncher.java:484)
    at hudson.slaves.SlaveComputer$3.run(SlaveComputer.java:603)
    at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    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: rpc.BindException: Unable to bind. (unknown)
    at rpc.security.ntlm.NtlmConnectionContext.accept(NtlmConnectionContext.java:137)
    at rpc.ConnectionOrientedEndpoint.connect(ConnectionOrientedEndpoint.java:252)
    at rpc.ConnectionOrientedEndpoint.bind(ConnectionOrientedEndpoint.java:217)
    at rpc.ConnectionOrientedEndpoint.rebind(ConnectionOrientedEndpoint.java:153)
    at org.jinterop.dcom.transport.JIComEndpoint.rebindEndPoint(JIComEndpoint.java:40)
    at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:529)
    ... 11 more

    1. Please follow this below steps to resolve the issue 

      Windows Server 2012 (64bit)

      To connect to Windows Server 2012, Change Permission for following registry key to Full Control:

      - HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID{72C24DD5-D70A-438B-8A42-98424B88AFB8}

      - HKEY_CLASSES_ROOT\CLSID{76A64158-CB41-11D1-8B02-00600806D9B6}

      1. Launch 'regedit' (as Administrator)
      2. Find (Ctrl+F) the following registry key: "{72C24DD5-D70A-438B-8A42-98424B88AFB8}" in HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\
      3. Right click and select 'Permissions'
      4. Change owner to administrators group (Advanced...).
      5. Change permissions for administrators group. Grant Full Control.
      6. Change owner back to TrustedInstaller (user is "NT Service\TrustedInstaller" on local machine)
      7. Repeat the steps 1-6 for HKEY_CLASSES_ROOT\CLSID{76A64158-CB41-11D1-8B02-00600806D9B6}
      8. Restart Remote Registry Service (Administrative Tools / Services)
  13. Hi,

    I'm getting the following error while launching the slave agent on windows 2012 R2 64 bit machine from Jenkins UI. Can somebody provide the workaround for this issue.

    Connecting to x.y.z.a
    
    ERROR: Message not found for errorCode: 0xC0000001
    org.jinterop.dcom.common.JIException: Message not found for errorCode: 0xC0000001
    	at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKCR(JIWinRegStub.java:121)
    	at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:479)
    	at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:427)
    	at org.jvnet.hudson.wmi.WMI.connect(WMI.java:59)
    	at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:206)
    	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: jcifs.smb.SmbException: Failed to connect: 0.0.0.0<00>/x.y.z.a
    jcifs.util.transport.TransportException
    jcifs.smb.SmbException: EOF during NetBIOS session request
    	at jcifs.smb.SmbTransport.ssn139(SmbTransport.java:210)
    	at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:249)
    	at jcifs.smb.SmbTransport.doConnect(SmbTransport.java:319)
    	at jcifs.util.transport.Transport.run(Transport.java:241)
    	at java.lang.Thread.run(Thread.java:745)
    
    	at jcifs.util.transport.Transport.run(Transport.java:258)
    	at java.lang.Thread.run(Thread.java:745)
    
    	at jcifs.smb.SmbTransport.connect(SmbTransport.java:309)
    	at jcifs.smb.SmbTree.treeConnect(SmbTree.java:156)
    	at jcifs.smb.SmbFile.doConnect(SmbFile.java:911)
    	at jcifs.smb.SmbFile.connect(SmbFile.java:954)
    	at jcifs.smb.SmbFile.connect0(SmbFile.java:880)
    	at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:77)
    	at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:66)
    	at jcifs.smb.SmbFile.getInputStream(SmbFile.java:2844)
    	at rpc.ncacn_np.RpcTransport.attach(RpcTransport.java:90)
    	at rpc.Stub.attach(Stub.java:104)
    	at rpc.Stub.call(Stub.java:109)
    	at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKCR(JIWinRegStub.java:119)
    	... 10 more
  14. The above specified issue has been resolved, but it is failing with error "ERROR: The service did not respond. Perhaps it failed to launch?" though the jenkins slave is running fine in windows machine.

     

    The error logs from Jenkins are as follows,

    Connecting to x.y.z.a
    Checking if Java exists
    
    java -version returned 1.8.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?
  15. I got this error and none of the answers above seemed to cover it:

    org.jinterop.dcom.common.JIException: Message not found for errorCode: 0x00000005
        at org.jinterop.winreg.smb.JIWinRegStub.winreg_CreateKey(JIWinRegStub.java:297)

     

    In the end I found the answer here:

     

    Basically:

    • Run regedit as admin
    • Visit "HKEY_CLASSES_ROOT\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6}" and change your preferred user/group's setting to be "Full Control".
    • I had this error when I tried it though:
    • With a bit more googling here, this can be resolved by changing ownership of the key as follows:
      • Right-click this {76A64...} key and go to "Permissions..."
      • Click the "Advanced" button
      • Go to the "Owner" tab
      • In the Change owner to field, select the user/group you want to own the key and press "Apply" and "OK"
      • Now try get "Full Control" for your user/group and it should work
      • Back on your Jenkins server's slave node, click "Launch agent" and hopefully all fares well now