Jenkins agent crashed/Terminated Caused by: java.security.AccessControlException:

Viewed 2030
Nov 02, 2021 9:53:03 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFORMATION: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
Nov 02, 2021 9:53:03 AM org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader run
INFORMATION: Waiting for ProtocolStack to start.
Nov 02, 2021 9:53:08 AM hudson.remoting.UserRequest perform
WARNUNG: LinkageError while performing UserRequest:hudson.slaves.SlaveComputer$SlaveInitializer@6cfcc55d
java.lang.ExceptionInInitializerError


        at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:1042)
        at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:1033)
        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

I have jenkins agent running on windows 10 , when i start the agent via jnlp file its connect i can see "Connected" but then Terminated the next second , when I went into the Jenkins/remoting/logs i found out this error , any one can please help what is the issue and why its getting terminated after connection

My windows agent have OpenJDK 1.8.0 For Jnlp I am using open web start Jenkins is of latest version 2.318 on agent and master My master is of linux

Following steps I already tried I updated my agent JDK to JDK11 but no success so I just downgrade it , i tried to restart/reboot but nothing can helped

Please any jenkins expert can help me with this

2 Answers

Incase any one in future might search for this here is an answer to that problem

The problem does not lies within the jenkins agent or jenkins master but it is the problem with jnlp launcher as with Open web start

When I tried to connect my agent via cmd running command and passing agent.jar it connects to my master and works fine so any one in future ever encounter problem like this dont touch or change your jdk setting for master or agent but tried to figure out the security / certificate settings of java web start or Open web start whatever you are using

Thanks

For windows node only There are some dependecies, keep them at same location (dependecies) You can create the service manually if you have reference. or follow the below steps:

  1. create service using below command: sc create "service_name" binpath= "path to jenkins-slave.exe" start=auto
  2. Open RUN, type regedit --> this will take you to registry editor.
  3. on editor find your service: HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Services -> jenkins_slave (name is same as step 1)
  4. Click on service name and edit Object name (put a user that has access to this machine) -- save
  5. open services.msc and open jenkins_slave properties --> Logon --> enter password for user put in step 4.
  6. start the service -- boom jenkins node is connected :D
Related