Page 1 of 1

launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 09 Nov 2021, 17:05
by TestEngineer
I have jenkins agent running on windows 10 , when i start the agent via jnlp using OPENWEBSTART 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

I read some where to update towards OpenJDK 11 , i tried that too but it does not help

Following is the log details:

Nov 09, 2021 9:53:03 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFORMATION: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
Nov 09, 2021 9:53:03 AM org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader run
INFORMATION: Waiting for ProtocolStack to start.
Nov 09, 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



OpenJdk version : Open JDK 1.8.2 265
OpenWebStart version : 1.4.0
Windows OS : 10
Jenkins Version : 2.318

Because of the problem every time i have to run my jenkins agent.jar file to get make my agent online

Any hint/help in this regards

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 09 Nov 2021, 17:10
by Andreas Ehret
Could you please also add the logs of your OpenWebStart installation?
https://openwebstart.com/docs/FAQ.html# ... _find_them

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 10 Nov 2021, 18:35
by Janak Mulani
Please attach the log files that are created when you run the Jnlp using OWS.

The above log is for the itw-settings app used to configure OWS deployment properties.

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 16 Nov 2021, 11:37
by Janak Mulani
Janak Mulani wrote: 10 Nov 2021, 18:35 Please attach the log files that are created when you run the Jnlp using OWS.

The above log is for the itw-settings app used to configure OWS deployment properties.
I requested you to attach the log files. not copy them. You can zip the log files and attach to your post. It is difficult to read and search the log file that you have copied in your post.

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 16 Nov 2021, 20:48
by TestEngineer
Hello Janak

My apologies

Both log files has been attached.

Regards and Thanks

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 22 Nov 2021, 14:38
by TestEngineer
Please any can help with issue

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 22 Nov 2021, 20:38
by Stephan Classen
so there are many errors about the application trying to read properties which protected by the security manager.
Can you disable the security manager and test if this gets you further.


<security>
<all-permissions/>
</security>

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 23 Nov 2021, 13:18
by TestEngineer
In my jnlp file i already added this tag
<security>
<all-permissions/>
</security>

I opened my jnlp file via notepad editor and this tag is already present in my jnlp file

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 26 Nov 2021, 09:02
by Stephan Classen
Have you also changed this on the server. Because OWS will download the latest version of the JNLP from the server and use that instead of the one on your filesystem.

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 26 Nov 2021, 10:03
by Stephan Classen
We also just released version 1.5.0 which has improvements which may help in your case.
So please give it a try and send us a fresh set of log files in case you still encounter the problem

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 26 Nov 2021, 11:22
by TestEngineer
yes it has also done on the server
as mentioned by you i just updated the open webstart , restart the computer and tried to run , unfortunately i still encounter the same problem. Attached is the log files.

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 26 Nov 2021, 15:38
by Stephan Classen
Can you pass "--nosecurity" as an argument to javaws when launching the JNLP.

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 29 Nov 2021, 14:38
by TestEngineer
Hi
Can you please guide how to do that , I actually opened my jnlp file via right click Open With OpenWebStart.
you mean i have to pass "--nosecurity" inside security tag in jnlp file
Thanks

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 30 Nov 2021, 14:47
by Stephan Classen
You can pass this only on the command line.

Open a powershell or cmd window and navigate to your jnlp file.

Then enter the following command "javaws <name of your jnlp> --nosecurity"

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 02 Dec 2021, 13:23
by TestEngineer
I tried it with the above command still its getting the same error
First step its connected and then immediately after connected its get terminated.

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 02 Dec 2021, 13:51
by Stephan Classen
by passing the --nosecurity you disabled all security in OWS and ITW.
There is not more things to disable.

Do you know if your application is defining its own SecurityManager?

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 07 Dec 2021, 13:58
by TestEngineer
As far as i know application is not defining any security manager , it works in past with java web start recently after shifting to OWS i start receiving this error
Do you know how i can check that if application defining its own security manager ?

Re: launch Jenkins agent jnlp file via OpenWebStart crashed Caused by: java.security.AccessControlException:

Posted: 08 Dec 2021, 09:33
by Janak Mulani
You can check the source code or check if the app is running in a sandbox (there should be an icon on the window).