# Jenkins Windows 10 agent won't start, says 'Terminated'

**URL:** <https://community.jenkins.io/t/jenkins-windows-10-agent-wont-start-says-terminated/1770>\
**Category:** Using Jenkins\
**Created:** [March 10, 2022, 3:19pm UTC](https://community.jenkins.io/t/jenkins-windows-10-agent-wont-start-says-terminated/1770 "2022-03-10T15:19:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BartVandewoestyne](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/bartvandewoestyne/32/502_2.png) [@BartVandewoestyne](https://community.jenkins.io/u/BartVandewoestyne)\
**Post date:** [March 10, 2022, 3:19pm UTC](https://community.jenkins.io/t/jenkins-windows-10-agent-wont-start-says-terminated/1770/1 "2022-03-10T15:19:26Z")

</div>

I am trying to launch a Windows 10 Jenkins agent by pressing the Launch button at the node page:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/9/97fb808acaa0143459b1ba8c3139f1da5f19b4ef.png)  
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

```auto
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

```auto
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

```auto
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)

```

---

<div class="post-metadata">

**Author:** ![BartVandewoestyne](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/bartvandewoestyne/32/502_2.png) [@BartVandewoestyne](https://community.jenkins.io/u/BartVandewoestyne)\
**Post date:** [March 10, 2022, 3:34pm UTC](https://community.jenkins.io/t/jenkins-windows-10-agent-wont-start-says-terminated/1770/2 "2022-03-10T15:34:06Z")

</div>

In the meanwhile, I have found how to enable the Java console, and it shows me the following error:

```auto
Mar 10, 2022 4:32:24 PM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: s-ebl-jnks06-19
Mar 10, 2022 4:32:24 PM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 4.11
Mar 10, 2022 4:32:24 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:32:24 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
Mar 10, 2022 4:32:24 PM org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader run
INFO: Waiting for ProtocolStack to start.
Mar 10, 2022 4:32:26 PM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:hudson.slaves.SlaveComputer$SlaveInitializer@43b015f3
java.lang.ExceptionInInitializerError
	at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:1050)
	at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:1041)
	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:376)
	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
	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 hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:122)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "hudson.util.RingBufferLogHandler.defaultSize" "read")
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at com.sun.javaws.security.JavaWebStartSecurity.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
	at java.lang.System.getProperty(Unknown Source)
	at java.lang.Integer.getInteger(Unknown Source)
	at java.lang.Integer.getInteger(Unknown Source)
	at hudson.util.RingBufferLogHandler.<clinit>(RingBufferLogHandler.java:39)
	... 11 more

```

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [March 10, 2022, 3:42pm UTC](https://community.jenkins.io/t/jenkins-windows-10-agent-wont-start-says-terminated/1770/3 "2022-03-10T15:42:52Z")

</div>

Several alternatives are offered in

[https://issues.jenkins.io/browse/JENKINS-67000](https://issues.jenkins.io/browse/JENKINS-67000)

Alternatives include:

- Install [Jenkins 2.332.1](https://www.jenkins.io/changelog-stable/#v2.332.1) that includes the fix
- Use a batch file or powershell script to start the agent instead of starting from the jnlp file. Define a service that runs the batch file
- Switch to use the [Microsoft OpenSSH service](https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse) on the Windows computer to [run the agent](https://github.com/jenkinsci/ssh-slaves-plugin/blob/80a9538ba9b0bb6caa049cab9eb4d1ee26d51434/doc/CONFIGURE.md#launch-windows-agents-using-microsoft-openssh)

---

<div class="post-metadata">

**Author:** ![BartVandewoestyne](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/bartvandewoestyne/32/502_2.png) [@BartVandewoestyne](https://community.jenkins.io/u/BartVandewoestyne)\
**Post date:** [March 14, 2022, 9:28pm UTC](https://community.jenkins.io/t/jenkins-windows-10-agent-wont-start-says-terminated/1770/4 "2022-03-14T21:28:09Z")

</div>

Thanks. I was indeed suffering the JENKINS-67000 issue, and upgrading to some version higher than 2.332.1 fixed the problem.
