Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-63623

Windows agents fail to start on version 2.235.5

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I am trying to connect a windows slave (windows 10 pro) to a windows master (windows server 2019) on jenkins and I always see the error below. I have tried everything but I still see the same error.

      Any resolution for this issue?

      ERROR: Message not found for errorCode: 0x80010111
      org.jinterop.dcom.common.JIException: Message not found for errorCode: 0x80010111
      at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:550)
      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:208)
      at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:296)
      at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(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: 0x80010111
      at org.jinterop.dcom.core.JIRemActivation.read(JIRemActivation.java:191)
      at ndr.NdrObject.decode(NdrObject.java:19)
      at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:138)
      at rpc.Stub.call(Stub.java:112)
      at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:538)
      ... 11 more

       note: version java installed in server and slave : 8.261 / .net framework installed : 4.8

      thank you

        Attachments

          Activity

          mediss mohamed issaoui created issue -
          mediss mohamed issaoui made changes -
          Field Original Value New Value
          Description I am trying to connect a windows slave (windows 10 pro) to a windows master (windows server 2019) on jenkins and I always see the error below. I have tried everything but I still see the same error.

          Any resolution for this issue?

          ERROR: Message not found for errorCode: 0x80010111
          org.jinterop.dcom.common.JIException: Message not found for errorCode: 0x80010111
           at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:550)
           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:208)
           at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:296)
           at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
           at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
           at java.util.concurrent.FutureTask.run(Unknown Source)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(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: 0x80010111
           at org.jinterop.dcom.core.JIRemActivation.read(JIRemActivation.java:191)
           at ndr.NdrObject.decode(NdrObject.java:19)
           at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:138)
           at rpc.Stub.call(Stub.java:112)
           at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:538)
           ... 11 more

           

          thank you
          I am trying to connect a windows slave (windows 10 pro) to a windows master (windows server 2019) on jenkins and I always see the error below. I have tried everything but I still see the same error.

          Any resolution for this issue?

          ERROR: Message not found for errorCode: 0x80010111
           org.jinterop.dcom.common.JIException: Message not found for errorCode: 0x80010111
           at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:550)
           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:208)
           at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:296)
           at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
           at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
           at java.util.concurrent.FutureTask.run(Unknown Source)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(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: 0x80010111
           at org.jinterop.dcom.core.JIRemActivation.read(JIRemActivation.java:191)
           at ndr.NdrObject.decode(NdrObject.java:19)
           at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:138)
           at rpc.Stub.call(Stub.java:112)
           at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:538)
           ... 11 more

           note: version java installed in server and slave : 8.261 / .net framework installed : 4.8

          thank you
          ianw Ian Williams made changes -
          Issue Type Task [ 3 ] Bug [ 1 ]
          mediss mohamed issaoui made changes -
          Priority Blocker [ 1 ] Critical [ 2 ]
          Hide
          markewaite Mark Waite added a comment -

          The "Troubleshooting WMI Windows Agents" page may help as you investigate the issue further.

          You may also want to consider using Windows inbound agents rather than using the wmi-agents plugin to manage those agents. Documentation of my experience with those agents in various scenarios is available in a blog post.

          You might also want to consider using OpenSSH for Windows to use Jenkins ssh build agents instead of inbound agents. Instructions are included in the ssh build agents configuration guide.

          Show
          markewaite Mark Waite added a comment - The " Troubleshooting WMI Windows Agents " page may help as you investigate the issue further. You may also want to consider using Windows inbound agents rather than using the wmi-agents plugin to manage those agents. Documentation of my experience with those agents in various scenarios is available in a blog post . You might also want to consider using OpenSSH for Windows to use Jenkins ssh build agents instead of inbound agents. Instructions are included in the ssh build agents configuration guide .
          Hide
          mediss mohamed issaoui added a comment -

          i checked all, but no working 

          I installed the Jenkins agent manually and I copied the agent.rar from another working Jenkins agent, but here are the messages in the agent log files

          • jenkins-agent.err.log :

          Exception in thread "main" java.net.SocketTimeoutException: Accept timed outException in thread "main" java.net.SocketTimeoutException: Accept timed out at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method) at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source) at java.net.AbstractPlainSocketImpl.accept(Unknown Source) at java.net.PlainSocketImpl.accept(Unknown Source) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at hudson.remoting.Launcher.runAsTcpServer(Launcher.java:641) at hudson.remoting.Launcher.run(Launcher.java:396) at hudson.remoting.Launcher.main(Launcher.java:298)

               * jenkins-agent.wrapper.log :

          020-09-14 10:31:20,161 DEBUG - Starting WinSW in the service mode
          2020-09-14 10:31:20,177 INFO - Starting C:\Program Files\Java\jre1.8.0_261\bin\javaw.exe -Xrs -jar "D:\Tools\Jenkins\agent.jar" -tcp "D:\Tools\Jenkins\port.txt"
          2020-09-14 10:31:20,177 INFO - Extension loaded: killOnStartup
          2020-09-14 10:31:20,177 DEBUG - Checking the potentially runaway process with PID=3164
          2020-09-14 10:31:20,177 DEBUG - No runaway process with PID=3164. The process has been already stopped.
          2020-09-14 10:31:20,192 INFO - Started process 10276
          2020-09-14 10:31:20,192 DEBUG - Forwarding logs of the process System.Diagnostics.Process (javaw) to winsw.SizeBasedRollingLogAppender
          2020-09-14 10:31:20,192 INFO - Recording PID of the started process:10276. PID file destination is D:\Tools\Jenkins\jenkins_agent.pid
          2020-09-14 10:31:50,476 DEBUG - Starting WinSW in the service mode
          2020-09-14 10:31:50,492 INFO - Starting C:\Program Files\Java\jre1.8.0_261\bin\javaw.exe -Xrs -jar "D:\Tools\Jenkins\agent.jar" -tcp "D:\Tools\Jenkins\port.txt"
          2020-09-14 10:31:50,492 INFO - Extension loaded: killOnStartup
          2020-09-14 10:31:50,492 DEBUG - Checking the potentially runaway process with PID=10276
          2020-09-14 10:31:50,492 DEBUG - No runaway process with PID=10276. The process has been already stopped.
          2020-09-14 10:31:50,507 INFO - Started process 10752
          2020-09-14 10:31:50,507 DEBUG - Forwarding logs of the process System.Diagnostics.Process (javaw) to winsw.SizeBasedRollingLogAppender
          2020-09-14 10:31:50,507 INFO - Recording PID of the started process:10752. PID file destination is D:\Tools\Jenkins\jenkins_agent.pid
          2020-09-14 10:32:20,789 DEBUG - Starting WinSW in the service mode
          2020-09-14 10:32:20,804 INFO - Starting C:\Program Files\Java\jre1.8.0_261\bin\javaw.exe -Xrs -jar "D:\Tools\Jenkins\agent.jar" -tcp "D:\Tools\Jenkins\port.txt"
          2020-09-14 10:32:20,804 INFO - Extension loaded: killOnStartup
          2020-09-14 10:32:20,804 DEBUG - Checking the potentially runaway process with PID=10752
          2020-09-14 10:32:20,804 DEBUG - No runaway process with PID=10752. The process has been already stopped.
          2020-09-14 10:32:20,820 INFO - Started process 10964
          2020-09-14 10:32:20,820 DEBUG - Forwarding logs of the process System.Diagnostics.Process (javaw) to winsw.SizeBasedRollingLogAppender
          2020-09-14 10:32:20,820 INFO - Recording PID of the started process:10964. PID file destination is D:\Tools\Jenkins\jenkins_agent.pid
          2020-09-14 10:32:51,101 DEBUG - Starting WinSW in the service mode
          2020-09-14 10:32:51,117 INFO - Starting C:\Program Files\Java\jre1.8.0_261\bin\javaw.exe -Xrs -jar "D:\Tools\Jenkins\agent.jar" -tcp "D:\Tools\Jenkins\port.txt"
          2020-09-14 10:32:51,117 INFO - Extension loaded: killOnStartup
          2020-09-14 10:32:51,117 DEBUG - Checking the potentially runaway process with PID=10964
          2020-09-14 10:32:51,117 DEBUG - No runaway process with PID=10964. The process has been already stopped.
          2020-09-14 10:32:51,132 INFO - Started process 10292
          2020-09-14 10:32:51,132 DEBUG - Forwarding logs of the process System.Diagnostics.Process (javaw) to winsw.SizeBasedRollingLogAppender
          2020-09-14 10:32:51,132 INFO - Recording PID of the started process:10292. PID file destination is D:\Tools\Jenkins\jenkins_agent.pid

           

           

           

          Show
          mediss mohamed issaoui added a comment - i checked all, but no working  I installed the Jenkins agent manually and I copied the agent.rar from another working Jenkins agent, but here are the messages in the agent log files jenkins-agent.err.log : Exception in thread "main" java.net.SocketTimeoutException: Accept timed outException in thread "main" java.net.SocketTimeoutException: Accept timed out at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method) at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source) at java.net.AbstractPlainSocketImpl.accept(Unknown Source) at java.net.PlainSocketImpl.accept(Unknown Source) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at hudson.remoting.Launcher.runAsTcpServer(Launcher.java:641) at hudson.remoting.Launcher.run(Launcher.java:396) at hudson.remoting.Launcher.main(Launcher.java:298)      * jenkins-agent.wrapper.log : 020-09-14 10:31:20,161 DEBUG - Starting WinSW in the service mode 2020-09-14 10:31:20,177 INFO - Starting C:\Program Files\Java\jre1.8.0_261\bin\javaw.exe -Xrs -jar "D:\Tools\Jenkins\agent.jar" -tcp "D:\Tools\Jenkins\port.txt" 2020-09-14 10:31:20,177 INFO - Extension loaded: killOnStartup 2020-09-14 10:31:20,177 DEBUG - Checking the potentially runaway process with PID=3164 2020-09-14 10:31:20,177 DEBUG - No runaway process with PID=3164. The process has been already stopped. 2020-09-14 10:31:20,192 INFO - Started process 10276 2020-09-14 10:31:20,192 DEBUG - Forwarding logs of the process System.Diagnostics.Process (javaw) to winsw.SizeBasedRollingLogAppender 2020-09-14 10:31:20,192 INFO - Recording PID of the started process:10276. PID file destination is D:\Tools\Jenkins\jenkins_agent.pid 2020-09-14 10:31:50,476 DEBUG - Starting WinSW in the service mode 2020-09-14 10:31:50,492 INFO - Starting C:\Program Files\Java\jre1.8.0_261\bin\javaw.exe -Xrs -jar "D:\Tools\Jenkins\agent.jar" -tcp "D:\Tools\Jenkins\port.txt" 2020-09-14 10:31:50,492 INFO - Extension loaded: killOnStartup 2020-09-14 10:31:50,492 DEBUG - Checking the potentially runaway process with PID=10276 2020-09-14 10:31:50,492 DEBUG - No runaway process with PID=10276. The process has been already stopped. 2020-09-14 10:31:50,507 INFO - Started process 10752 2020-09-14 10:31:50,507 DEBUG - Forwarding logs of the process System.Diagnostics.Process (javaw) to winsw.SizeBasedRollingLogAppender 2020-09-14 10:31:50,507 INFO - Recording PID of the started process:10752. PID file destination is D:\Tools\Jenkins\jenkins_agent.pid 2020-09-14 10:32:20,789 DEBUG - Starting WinSW in the service mode 2020-09-14 10:32:20,804 INFO - Starting C:\Program Files\Java\jre1.8.0_261\bin\javaw.exe -Xrs -jar "D:\Tools\Jenkins\agent.jar" -tcp "D:\Tools\Jenkins\port.txt" 2020-09-14 10:32:20,804 INFO - Extension loaded: killOnStartup 2020-09-14 10:32:20,804 DEBUG - Checking the potentially runaway process with PID=10752 2020-09-14 10:32:20,804 DEBUG - No runaway process with PID=10752. The process has been already stopped. 2020-09-14 10:32:20,820 INFO - Started process 10964 2020-09-14 10:32:20,820 DEBUG - Forwarding logs of the process System.Diagnostics.Process (javaw) to winsw.SizeBasedRollingLogAppender 2020-09-14 10:32:20,820 INFO - Recording PID of the started process:10964. PID file destination is D:\Tools\Jenkins\jenkins_agent.pid 2020-09-14 10:32:51,101 DEBUG - Starting WinSW in the service mode 2020-09-14 10:32:51,117 INFO - Starting C:\Program Files\Java\jre1.8.0_261\bin\javaw.exe -Xrs -jar "D:\Tools\Jenkins\agent.jar" -tcp "D:\Tools\Jenkins\port.txt" 2020-09-14 10:32:51,117 INFO - Extension loaded: killOnStartup 2020-09-14 10:32:51,117 DEBUG - Checking the potentially runaway process with PID=10964 2020-09-14 10:32:51,117 DEBUG - No runaway process with PID=10964. The process has been already stopped. 2020-09-14 10:32:51,132 INFO - Started process 10292 2020-09-14 10:32:51,132 DEBUG - Forwarding logs of the process System.Diagnostics.Process (javaw) to winsw.SizeBasedRollingLogAppender 2020-09-14 10:32:51,132 INFO - Recording PID of the started process:10292. PID file destination is D:\Tools\Jenkins\jenkins_agent.pid      
          Hide
          markewaite Mark Waite added a comment -

          You might compare the steps you are taking with the steps described in the Jenkins 2.249.1 upgrade testing blog post.

          • Jenkins controller installed from 32 bit MSI, agent with Java Web Start 8u144
          • Jenkins controller installed from 64 bit MSI, agent with IcedTea-Web
          • Jenkins controller installed from jenkins.war file, agent with IcedTea-Web
          Show
          markewaite Mark Waite added a comment - You might compare the steps you are taking with the steps described in the Jenkins 2.249.1 upgrade testing blog post . Jenkins controller installed from 32 bit MSI , agent with Java Web Start 8u144 Jenkins controller installed from 64 bit MSI , agent with IcedTea-Web Jenkins controller installed from jenkins.war file , agent with IcedTea-Web
          Hide
          georgelinsdell2 George Linsdell added a comment - - edited

          bump, Seeing the same response. 
          This method of launching slaves is critical as we require this method for a stable test complete integration.
          I've gone back through the process of configuring as documented in 

          I have had to upgrade my nodes from Windows10 1903 to 2004 to avoid the...
          "[2020-09-16 16:33:29] [windows-agents] Installing the Jenkins agent service
          [2020-09-16 16:33:29] [windows-agents] Copying jenkins-agent.exe
          ERROR: Unexpected error in launching an agent. This is probably a bug in Jenkins
          Also: java.lang.Throwable: launched here
          at hudson.slaves.SlaveComputer._connect(SlaveComputer.java:283)
          at hudson.model.Computer.connect(Computer.java:435)
          at hudson.slaves.SlaveComputer.doLaunchSlaveAgent(SlaveComputer.java:787)
          at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)"
          Error.

          Upon completing this I have attempted to reapply the steps documented under to ensure windows update changes were did not overwrite previously configured settings. https://github.com/jenkinsci/windows-slaves-plugin/blob/master/docs/troubleshooting.adoc 

          which previous resulted in a 6 working windows nodes of this control method.

          Please can you advise on information that can help you diagnose this problem. This upgrade of jenkins master to LTS has broken out entire UI Testing Capability.

          Show
          georgelinsdell2 George Linsdell added a comment - - edited bump, Seeing the same response.  This method of launching slaves is critical as we require this method for a stable test complete integration. I've gone back through the process of configuring as documented in  I have had to upgrade my nodes from Windows10 1903 to 2004 to avoid the... " [2020-09-16 16:33:29] [windows-agents] Installing the Jenkins agent service [2020-09-16 16:33:29] [windows-agents] Copying jenkins-agent.exe ERROR: Unexpected error in launching an agent. This is probably a bug in Jenkins Also: java.lang.Throwable: launched here at hudson.slaves.SlaveComputer._connect(SlaveComputer.java:283) at hudson.model.Computer.connect(Computer.java:435) at hudson.slaves.SlaveComputer.doLaunchSlaveAgent(SlaveComputer.java:787) at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)" Error. Upon completing this I have attempted to reapply the steps documented under to ensure windows update changes were did not overwrite previously configured settings.  https://github.com/jenkinsci/windows-slaves-plugin/blob/master/docs/troubleshooting.adoc   which previous resulted in a 6 working windows nodes of this control method. Please can you advise on information that can help you diagnose this problem. This upgrade of jenkins master to LTS has broken out entire UI Testing Capability.
          Hide
          markewaite Mark Waite added a comment -

          George Linsdell I'm not able to diagnose the problem. I don't use the WMI agents plugin.

          I was trying to offer suggestions that would help you and other users with your own investigation into the issue. I use Windows inbound agents that are launched from a command prompt and I use Windows agents that connect to the Windows OpenSSH server provided by Microsoft.

          Show
          markewaite Mark Waite added a comment - George Linsdell I'm not able to diagnose the problem. I don't use the WMI agents plugin. I was trying to offer suggestions that would help you and other users with your own investigation into the issue. I use Windows inbound agents that are launched from a command prompt and I use Windows agents that connect to the Windows OpenSSH server provided by Microsoft.
          mediss mohamed issaoui made changes -
          Attachment image-2020-09-17-09-54-59-182.png [ 52616 ]
          Hide
          mediss mohamed issaoui added a comment -

          i can't use openssh because it always asks for a password when logging in (authentication is by domain user)


          note: I used WMI agent on a slave on windows server 2019 is working fine, but with windows 10 is not until now

          Show
          mediss mohamed issaoui added a comment - i can't use openssh because it always asks for a password when logging in (authentication is by domain user) note: I used WMI agent on a slave on windows server 2019 is working fine, but with windows 10 is not until now
          Hide
          markewaite Mark Waite added a comment -

          WMI Windows build agent plugin 1.7 has been released with a fix for Jenkins 2.249.1 based installations.

          The issue that affected Jenkins 2.249.1 should not be an issue with Jenkns 2.235.5. I don't know what issue might be affecting a Jenkins 2.235.5 or earlier installation.

          Show
          markewaite Mark Waite added a comment - WMI Windows build agent plugin 1.7 has been released with a fix for Jenkins 2.249.1 based installations. The issue that affected Jenkins 2.249.1 should not be an issue with Jenkns 2.235.5. I don't know what issue might be affecting a Jenkins 2.235.5 or earlier installation.
          Hide
          hidminds Daniel Fischer added a comment -

          I get the same error message afer upgrading a win10 jenkins slave to windows 10 version 2004. I am using jenkins LTS 2.249.1 and WMI Windows Agents Plugin v1.7.

          The DCOM error code is documented here: https://docs.microsoft.com/en-us/windows/win32/com/com-error-codes-3

          RPC_E_INVALID_HEADER 0x80010111 which means "OLE received a packet with an invalid header."

           

          It seems that in Windows OS versions >=2004 the COMVERSION needs to be changed from 5.6 to 5.7:

          https://community.tenable.com/s/article/Update-of-COMVERSION-Minor-Version-in-DCOM-Remote-Protocol-Implementation

           

          Microsoft published a compatibility table here: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dcom/acc42954-4073-4f05-b850-efd562022077#Appendix_A_5

           

           

           

          Show
          hidminds Daniel Fischer added a comment - I get the same error message afer upgrading a win10 jenkins slave to windows 10 version 2004. I am using jenkins LTS 2.249.1 and WMI Windows Agents Plugin v1.7. The DCOM error code is documented here: https://docs.microsoft.com/en-us/windows/win32/com/com-error-codes-3 RPC_E_INVALID_HEADER 0x80010111 which means "OLE received a packet with an invalid header."   It seems that in Windows OS versions >=2004 the COMVERSION needs to be changed from 5.6 to 5.7 : https://community.tenable.com/s/article/Update-of-COMVERSION-Minor-Version-in-DCOM-Remote-Protocol-Implementation   Microsoft published a compatibility table here: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dcom/acc42954-4073-4f05-b850-efd562022077#Appendix_A_5      
          Hide
          mediss mohamed issaoui added a comment - - edited

          Thank you very much guys,
          I changed the launch method, actually I use (Launch agent by connecting it to the master) and works fine.

          Show
          mediss mohamed issaoui added a comment - - edited Thank you very much guys, I changed the launch method, actually I use ( Launch agent by connecting it to the master ) and works fine.
          mediss mohamed issaoui made changes -
          Environment jenkins version 2.235.5, windows server 2019, windows 10 pro jenkins version 2.235.5/2.249.1, windows server 2019, windows 10 pro
          georgelinsdell2 George Linsdell made changes -
          Comment [ So there has been no change successful connection behavior with our dev ops manager rolling out the regular jenkins updates as and when they become available, There was a breaking change to support master controlled nodes and there has been no further investigation work. since from the activity on this ticket.

          Is it appropriate that the solution for "you broke it" is to "Change the method of control". And not investigate the scenario that you broke and fix it.
           The "Launch agent by connecting it to the master" is a much less stable mechanism that the master being able to control the node and required additional maintenance. I blanket removed "Launch agent by connecting to the master" as it was not suitable for my use case. May I ask what is required to go about getting this resolved.

          I have 6 jenkins nodes which all have the correct configuration and were working pre-jenkins update.
           I have correct fire wall instruction to permit traffic Infact I documented the entire approach from collated sources in order to allow consistent setup between the nodes (In the comment below)

          Can somebody advise how I can provide more information to get this looked into?
          h1. Jenkins Node Modifications

          There are known difficulties with using the slave mode "Let Jenkins control this Windows agent as a Windows service". Jenkins has a large support document located [here|https://github.com/jenkinsci/windows-slaves-plugin/blob/master/docs/troubleshooting.adoc#access-is-denied-error]. Below are the steps required to get a windows 10 node to be run in this way.
          ||Action||Description||Notes||
          ||1|Set up the connection details| |
          ||2|If a suitable user account is not present create one.| |
          ||3|Change/Add registry Key 1:
            |
          |h3. Access is denied error
          When you get an error like "Access is denied. [0x00000005]", 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|
          ||4|Modify the firewall to accept TCP and UDP traffic|h3. Firewall
          By default, Windows Firewall prevents the TCP connections necessary to make this mechanism work. The firewall on the agent must allow the following exceptions (see [List of TCP&UDP port numbers|http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers]): * TCP Port [135|http://www.speedguide.net/port.php?port=135] (DCE/RPC Locator service) * TCP Port [139|http://www.speedguide.net/port.php?port=139] (NetBIOS Session Service)
           * TCP Port [445|http://www.speedguide.net/port.php?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))|

          Example Firewall related issues: “Error 0x800706BA The RPC server is unavailable.”, “SocketTimeoutException: Accept timed out”, “TransportException: Connection timeout”.
           The easiest way to track down firewall issues is to use [tcpdump|http://www.tcpdump.org/]. Just run the following command on the Jenkins server, which is trying to connect to the slave:
           G:  TestComplete TCP Enable → 135 ,139 ,445
           TestComplete UDP Enable → 137 ,138|
          ||5|SMB Protocol Configuration|{color:#005cc5}Run the following lines in a administrator powershell window. Jenkins does not support SMB2{color}
           
           Enable-WindowsOptionalFeature {color:#d73a49}-{color}Online {color:#d73a49}-{color}FeatureName smb1protocol
           {color:#005cc5}Set-SmbServerConfiguration{color} {color:#d73a49}-{color}EnableSMB1Protocol {color:#005cc5}$true{color}|
          ||6|Remote Registry Access|{color:#24292e}Elevated Power shell command:{color}
           {color:#24292e}Enable-PSRemoting{color}|
          ||7|Enable remote registry service|{color:#24292e}If so, start the control panel, open "Administrative Tools" then "Services" Locate the Remote Registry service on the list, and click "Start this service"{color}|
          ||8|User in admin group|h3. Agent under domain account
          If your agent 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)|
          ||9|from javawebstart|If java webstart has been use previously, there may be a conflict. so remove /move the old configuration and uninstall the java web start jenkins service.|
          ||10|Change Security Policy for MACHINENAME\Administrators|{color:#333333}TITLE{color}
           {color:#333333}How do I configure a user account to have ‘logon as a service’ permissions?{color}{color:#333333}QUESTION / PROBLEM{color}
           Please follow the KCS Knowledge Article guidelines to properly format your question or problem
           I am getting Service Logon Failure error 'This service account does not have the required user right "Log on as a service"' while starting server services. Can you please tell me the steps to configure my user account with Log On Service permission?{color:#333333}ANSWER / SOLUTION{color}
           Please follow the KCS Knowledge Article guidelines to properly format your answer/solution
           To add "Log on as a service" permissions: # Run *Start* > *Control Panel* > *Administrative Tools* > *Local Security Policy* # Select  *Local Policies* > *User Rights Assignment* > *Log on as a service*
           # 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.|

           h3. Local Security Settings # Start the control panel, go to "Administrative Tools", then "Local Security Policy". This will open up the "local security settings" window
           # Go to "Local Policies" > "Security Options" > "Network access: Sharing and security model for local accounts." Change that to "Classic."|
          ||11|Set Registry Key Permissions to Administrators not trusted installers|This can exhibit a [0x00000005] codeh3. WBEM Scripting Locator
           On current Windows systems, Jenkins requires access to the "WBEM Scripting Locator". The following steps allow that: # Launch 'regedit' (as Administrator)|

           # Find (Ctrl+F) the following registry key: "\{76A64158-CB41-11D1-8B02-00600806D9B6}" (it’s in HKEY_CLASSES_ROOT\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)
           # Restart Remote Registry Service (Administrative Tools / Services)

          Credit to Florian Vogle [on the Hudson wiki|http://wiki.hudson-ci.org/display/HUDSON/Windows+slaves+fail+to+start+via+DCOM].|
          ||12|TEMPORARY STEP - Disable firewalls|Even with the noted ports opened for TCP and UDP traffic, there were still Access denied errors. Disabling the firewall solved this however|
          ||13|Install Microsoft .NET 2.0 |[https://shenxianpeng.github.io/2020/07/jenkins-windows-agent-connect-problem/]
           Link above contains instructions to enabling .Net 2.0 framework on a windows 10 machine. These are no longer installed in the default windows 10 installation|
          ||14|Set the domain specific element in user name|{color:#172b4d}Windows may try to block the action of starting a service if you do not put the prefix. Prefixing the username with "computername\" resolves this issue for me.{color}
           {color:#172b4d}e.g. anegada/jenkins_user
           Otherwise the user account needs to be an administrative user on both the server side and client side (which is hard to achieve as server side is linux...{color}| ]
          Hide
          georgelinsdell2 George Linsdell added a comment - - edited

          So there has been no change successful connection behavior with our dev ops manager rolling out the regular jenkins updates as and when they become available, There was a breaking change to support master controlled nodes and there has been no further investigation work. since from the activity on this ticket.

          Is it appropriate that the solution for "you broke it" is to "Change the method of control". And not investigate the scenario that you broke and fix it.
          The "Launch agent by connecting it to the master" is a much less stable mechanism that the master being able to control the node and required additional maintenance. I blanket removed "Launch agent by connecting to the master" as it was not suitable for my use case. May I ask what is required to go about getting this resolved.

          I have 6 jenkins nodes which all have the correct configuration and were working pre-jenkins update.
          I have correct fire wall instruction to permit traffic Infact I documented the entire approach from collated sources in order to allow consistent setup between the nodes Can't comment it as Jira garbles the formatting.

          Can somebody advise how I can provide more information to get this looked into?

          [2021-01-04 14:03:05] [windows-agents] Connecting to principe
          ERROR: Message not found for errorCode: 0x80080005
          org.jinterop.dcom.common.JIException: Message not found for errorCode: 0x80080005
          at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:550)
          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:208)
          at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:294)
          at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
          at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
          at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          at java.base/java.lang.Thread.run(Thread.java:834)
          Caused by: org.jinterop.dcom.common.JIRuntimeException: Message not found for errorCode: 0x80080005
          at org.jinterop.dcom.core.JIRemActivation.read(JIRemActivation.java:191)
          at ndr.NdrObject.decode(NdrObject.java:19)
          at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:138)
          at rpc.Stub.call(Stub.java:112)
          at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:538)
          ... 11 more

          Show
          georgelinsdell2 George Linsdell added a comment - - edited So there has been no change successful connection behavior with our dev ops manager rolling out the regular jenkins updates as and when they become available, There was a breaking change to support master controlled nodes and there has been no further investigation work. since from the activity on this ticket. Is it appropriate that the solution for "you broke it" is to "Change the method of control". And not investigate the scenario that you broke and fix it. The "Launch agent by connecting it to the master" is a much less stable mechanism that the master being able to control the node and required additional maintenance. I blanket removed "Launch agent by connecting to the master" as it was not suitable for my use case. May I ask what is required to go about getting this resolved. I have 6 jenkins nodes which all have the correct configuration and were working pre-jenkins update. I have correct fire wall instruction to permit traffic Infact I documented the entire approach from collated sources in order to allow consistent setup between the nodes Can't comment it as Jira garbles the formatting. Can somebody advise how I can provide more information to get this looked into? [2021-01-04 14:03:05] [windows-agents] Connecting to principe ERROR: Message not found for errorCode: 0x80080005 org.jinterop.dcom.common.JIException: Message not found for errorCode: 0x80080005 at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:550) 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:208) at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:294) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.jinterop.dcom.common.JIRuntimeException: Message not found for errorCode: 0x80080005 at org.jinterop.dcom.core.JIRemActivation.read(JIRemActivation.java:191) at ndr.NdrObject.decode(NdrObject.java:19) at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:138) at rpc.Stub.call(Stub.java:112) at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:538) ... 11 more
          georgelinsdell2 George Linsdell made changes -
          Comment [ |*Action*|*Description*|*Notes*|
          |*1*|Set up the connection details| |
          |*2*|If a suitable user account is not present create one.| |
          |*3*|Change/Add registry Key 1:|*Access is denied error*
          When you get an error like "Access is denied. [0x00000005]", 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|
          |*4*|Modify the firewall to accept TCP and UDP traffic|*Firewall*
          By default, Windows Firewall prevents the TCP connections necessary to make this mechanism work. The firewall on the agent must allow the following exceptions (see [List of TCP&UDP port numbers|http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers]): * TCP Port [135|http://www.speedguide.net/port.php?port=135] (DCE/RPC Locator service)
           * TCP Port [139|http://www.speedguide.net/port.php?port=139] (NetBIOS Session Service)
           * TCP Port [445|http://www.speedguide.net/port.php?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))

          Example Firewall related issues: “Error 0x800706BA The RPC server is unavailable.”, “SocketTimeoutException: Accept timed out”, “TransportException: Connection timeout”.
          The easiest way to track down firewall issues is to use [tcpdump|http://www.tcpdump.org/]. Just run the following command on the Jenkins server, which is trying to connect to the slave:
          G:  TestComplete TCP Enable → 135 ,139 ,445
          TestComplete UDP Enable → 137 ,138|
          |*5*|SMB Protocol Configuration|Run the following lines in a administrator powershell window. Jenkins does not support SMB2
          Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol
           Set-SmbServerConfiguration -EnableSMB1Protocol $true|
          |*6*|Remote Registry Access|Elevated Power shell command:
          Enable-PSRemoting|
          |*7*|Enable remote registry service|If so, start the control panel, open "Administrative Tools" then "Services" Locate the Remote Registry service on the list, and click "Start this service"|
          |*8*|User in admin group|*Agent under domain account*
          If your agent 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)|
          |*9*|from javawebstart|If java webstart has been use previously, there may be a conflict. so remove /move the old configuration and uninstall the java web start jenkins service.|
          |*10*|Change Security Policy for MACHINENAME\Administrators|TITLE
           How do I configure a user account to have ‘logon as a service’ permissions?
          QUESTION / PROBLEM
           Please follow the KCS Knowledge Article guidelines to properly format your question or problem
          I am getting Service Logon Failure error 'This service account does not have the required user right "Log on as a service"' while starting server services. Can you please tell me the steps to configure my user account with Log On Service permission?
          ANSWER / SOLUTION
           Please follow the KCS Knowledge Article guidelines to properly format your answer/solution
          To add "Log on as a service" permissions: # Run *Start* > *Control Panel* > *Administrative Tools* > *Local Security Policy*
           # Select  *Local Policies* > *User Rights Assignment* > *Log on as a service*
           # 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.

           
          *Local Security Settings* # Start the control panel, go to "Administrative Tools", then "Local Security Policy". This will open up the "local security settings" window
           # Go to "Local Policies" > "Security Options" > "Network access: Sharing and security model for local accounts." Change that to "Classic."|
          |*11*|Set Registry Key Permissions to Administrators not trusted installers|This can exhibit a [0x00000005] code
          *WBEM Scripting Locator*
          On current Windows systems, Jenkins requires access to the "WBEM Scripting Locator". The following steps allow that: # Launch 'regedit' (as Administrator)
           # Find (Ctrl+F) the following registry key: "\{76A64158-CB41-11D1-8B02-00600806D9B6}" (it’s in HKEY_CLASSES_ROOT\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)
           # Restart Remote Registry Service (Administrative Tools / Services)

          Credit to Florian Vogle [on the Hudson wiki|http://wiki.hudson-ci.org/display/HUDSON/Windows+slaves+fail+to+start+via+DCOM].|
          |*12*|TEMPORARY STEP - Disable firewalls|Even with the noted ports opened for TCP and UDP traffic, there were still Access denied errors. Disabling the firewall solved this however|
          |*13*|Install Microsoft .NET 2.0 |[https://shenxianpeng.github.io/2020/07/jenkins-windows-agent-connect-problem/]
          Link above contains instructions to enabling .Net 2.0 framework on a windows 10 machine. These are no longer installed in the default windows 10 installation|
          |*14*|Set the domain specific element in user name|So there has been no change successful connection behavior with our dev ops manager rolling out the regular jenkins updates as and when they become available, There was a breaking change to support master controlled nodes and there has been no further investigation work. since from the activity on this ticket.
          Is it appropriate that the solution for "you broke it" is to "Change the method of control". And not investigate the scenario that you broke and fix it.
           The "Launch agent by connecting it to the master" is a much less stable mechanism that the master being able to control the node and required additional maintenance. I blanket removed "Launch agent by connecting to the master" as it was not suitable for my use case. May I ask what is required to go about getting this resolved.
          I have 6 jenkins nodes which all have the correct configuration and were working pre-jenkins update.
           I have correct fire wall instruction to permit traffic Infact I documented the entire approach from collated sources in order to allow consistent setup between the nodes (In the comment below)
          Can somebody advise how I can provide more information to get this looked into?| ]
          Hide
          georgelinsdell2 George Linsdell added a comment -

          So no further investigation of progress and the facility to use "Let Jenkins Control This Windows Agent As Windows Service" Can for Version 2.235.5 onwards. Can this be highlighted in the associated plugin? 

          https://plugins.jenkins.io/windows-slaves/

          Show
          georgelinsdell2 George Linsdell added a comment - So no further investigation of progress and the facility to use "Let Jenkins Control This Windows Agent As Windows Service" Can for Version 2.235.5 onwards. Can this be highlighted in the associated plugin?  https://plugins.jenkins.io/windows-slaves/

            People

            Assignee:
            mediss mohamed issaoui
            Reporter:
            mediss mohamed issaoui
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated: