• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • windows-slaves-plugin
    • None
    • Windows Server 2012

      When I try to start the Jenkin slave, we encounter the following error.

      Connecting to 10.0.0.4
      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.winreg.smb.JIWinRegStub.winreg_CreateKey(JIWinRegStub.java:297)
      at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:480)
      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 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: org.jinterop.dcom.common.JIRuntimeException: Message not found for errorCode: 0x00000005
      at org.jinterop.winreg.IJIWinReg$createKey.read(IJIWinReg.java:459)
      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_CreateKey(JIWinRegStub.java:291)
      ... 10 more
      ream.<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_OpenHKCR(JIWinRegStub.java:119)
      ... 10 more

          [JENKINS-16418] Cannot start Windows Server 2012 slave.

          Raghwendra Mourya added a comment - - edited

          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}

            Launch 'regedit' (as Administrator)
            Find (Ctrl+F) the following registry key: "{72C24DD5-D70A-438B-8A42-98424B88AFB8}

            " in HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\
            Right click and select 'Permissions'
            Change owner to administrators group (Advanced...).
            Change permissions for administrators group. Grant Full Control.
            Change owner back to TrustedInstaller (user is "NT Service\TrustedInstaller" on local machine)
            Repeat the steps above for HKEY_CLASSES_ROOT\CLSID

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

            Restart Remote Registry Service (Administrative Tools / Services)

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

          Dane Kantner added a comment -

          I tried the above it didn't seem to resolve (the class ID exists in both the 32 bit WOW6432 location as well as the 64 bit location, changed both; additionally strangely in Windows 7 SP 1 64 bit, I have not been able to restore the TrustedInstaller as the owner of the registry keys. I did select the local computer as the object, and even when I do a "find" of all accounts I see all the built-in accounts with the exception of TrustedInstaller. I tried "NT Service\TrustedInstaller" in quotes and every variation as well. If I try to do the same ownership change on a file object (as opposed to registry), it works no problem.

          Dane Kantner added a comment - I tried the above it didn't seem to resolve (the class ID exists in both the 32 bit WOW6432 location as well as the 64 bit location, changed both; additionally strangely in Windows 7 SP 1 64 bit, I have not been able to restore the TrustedInstaller as the owner of the registry keys. I did select the local computer as the object, and even when I do a "find" of all accounts I see all the built-in accounts with the exception of TrustedInstaller. I tried "NT Service\TrustedInstaller" in quotes and every variation as well. If I try to do the same ownership change on a file object (as opposed to registry), it works no problem.

          Sorin Sbarnea added a comment -

          I followed the same steps on 2012 (x64), managed to change the permissions but I do still get the same error when trying to start the slave. Any more hints?

          Sorin Sbarnea added a comment - I followed the same steps on 2012 (x64), managed to change the permissions but I do still get the same error when trying to start the slave. Any more hints?

          If you have followed the steps then I think the issue could be firewall. Try with stopping firewall.

          Raghwendra Mourya added a comment - If you have followed the steps then I think the issue could be firewall. Try with stopping firewall.

          Same behaviour for my case, updated permissions for
          HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID

          {72C24DD5-D70A-438B-8A42-98424B88AFB8}

          and

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

          restarted service and server, turned off firewall and same error, while using local admin user. I also allowed to log in as service

          Ladislav Toldy added a comment - Same behaviour for my case, updated permissions for HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID {72C24DD5-D70A-438B-8A42-98424B88AFB8} and {76A64158-CB41-11D1-8B02-00600806D9B6} restarted service and server, turned off firewall and same error, while using local admin user. I also allowed to log in as service

          ali hamadi added a comment -

          I having the same issue, however I am using windows 10 as a slave machine.

          could someone please update this ticket.

          Thanks

          ali hamadi added a comment - I having the same issue, however I am using windows 10 as a slave machine. could someone please update this ticket. Thanks

          Oleg Nenashev added a comment -

          It duplicates JENKINS-4859 from what I see

          Oleg Nenashev added a comment - It duplicates JENKINS-4859 from what I see

            kohsuke Kohsuke Kawaguchi
            rizhard albert cheng
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: