Issue
When configuring Jenkins Agents as a service in a Windows 2012 machine, using the option Let Jenkins control this Windows agent as a Windows service the service does not come up and we can see a stack trace like the one shown below:
ERROR: Unexpected error in launching an agent. This is probably a bug in Jenkins
org.jinterop.dcom.common.JIException: Service Logon Failure
at org.jvnet.hudson.wmi.Win32Service$Implementation.start(Win32Service.java:149)
...
Or:
jcifs.util.transport.TransportException, java.net.SocketException: Connection reset
Environment
- CloudBees CI (CloudBees Core)
- CloudBees CI (CloudBees Core) on modern cloud platforms - Managed Master
- CloudBees CI (CloudBees Core) on modern cloud platforms - Operations Center
- CloudBees CI (CloudBees Core) on traditional platforms - Client Master
- CloudBees CI (CloudBees Core) on traditional platforms - Operations Center
- CloudBees Jenkins Enterprise
- CloudBees Jenkins Enterprise - Managed Master
- CloudBees Jenkins Enterprise - Operations Center
- CloudBees Jenkins Platform - Client Master
- CloudBees Jenkins Platform - Operations Center
- CloudBees Jenkins Distribution
- Jenkins LTS
- Windows 2012 server
Resolution
As explained in the WMI Windows Agents plugin troubleshooting page, this means that the server is requiring the usage of an unsupported protocol SMB 2. You will need to take additional steps described below to enable the supported protocol SMB 1.
Once that you enable the SMB 1 protocol, you will need to update the permissions for the registry keys mentioned in the link above. Finally, the agent should be able to start normally.
0 Comments