I am trying to launch a Windows 10 Jenkins agent by pressing the Launch button at the node page:
When I do that, my browser asks me to download the jenkins-agent.jnlp file, which I save in my Downloads folder. I then start the agent by running a Windows cmd window as Administrator, going into the directory where I saved the jenkins-agend.jnlp file, and typing
jenkins-agent.jnlp
I then see the Jenkins agent window coming up, but after a few seconds it says “Terminated”.
I have no idea in what logs to look to know why it is failing. However, if I also download the agent.jar file and start the agent from the command line using the command
C:\Users\barvan34887.TREALITYSVS\Downloads>java -jar agent.jar -jnlpUrl http://jenkins.trealitysvs.net/computer/s%2Debl%2Djnks06%2D19/jenkins-agent.jnlp -secret 6897b4c167a2895b47fc83cacfa5edce7b4512846f802a6ae87dded9d65630cf
Mar 10, 2022 4:15:07 PM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: s-ebl-jnks06-19
Mar 10, 2022 4:15:07 PM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Mar 10, 2022 4:15:07 PM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 4.11
Mar 10, 2022 4:15:07 PM hudson.remoting.Engine startEngine
WARNING: No Working Directory. Using the legacy JAR Cache location: C:\Users\barvan34887.TREALITYSVS\.jenkins\cache\jars
Mar 10, 2022 4:15:07 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://jenkins.trealitysvs.net/]
Mar 10, 2022 4:15:07 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
Mar 10, 2022 4:15:07 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
Agent address: jenkins.trealitysvs.net
Agent port: 32775
Identity: b5:68:27:19:d1:73:7c:53:e1:f1:a3:a5:51:f0:d3:70
Mar 10, 2022 4:15:07 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Mar 10, 2022 4:15:07 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to jenkins.trealitysvs.net:32775
Mar 10, 2022 4:15:07 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP4-connect
Mar 10, 2022 4:15:07 PM org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader run
INFO: Waiting for ProtocolStack to start.
Mar 10, 2022 4:15:07 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Remote identity confirmed: b5:68:27:19:d1:73:7c:53:e1:f1:a3:a5:51:f0:d3:70
Mar 10, 2022 4:15:08 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected
Since I want to install this as a Windows service so that the agent starts automatically, I would like to get the first method working, so that I can select “Install as Service” from the menu.
What am I doing wrong? Or where to look for logfiles that could give an indication on what’s wrong?
My Jenkins version is 2.318 and java version is
C:\WINDOWS\system32>java -version
java version "1.8.0_321"
Java(TM) SE Runtime Environment (build 1.8.0_321-b07)
Java HotSpot(TM) Client VM (build 25.321-b07, mixed mode)