Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67000

JavaWebStart agents cannot connect due to AccessControlException

    • 2.335,2.332.1

      This week after the jenkins update of 2.317 and to 2.318 , my agent machine (windows 10) start getting terminated again and again after connected

       

      As normally I use jnlp file right click to launch , the jenkins agent windows appears and I can see Connected but within few seconds its got Terminated

       

      I went into the remoting folder to check out the logs and it prompts this error

       

      Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "hudson.util.RingBufferLogHandler.defaultSize" "read")

       

      Agent Java version : OpenJDK 1.8.0 301
      Jenkins version : Jenkins 2.318

      I am using Openwebstart for jnlp

       

      Complete log message (agent machine)

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

       

          [JENKINS-67000] JavaWebStart agents cannot connect due to AccessControlException

          Bilawal Ali created issue -
          Bilawal Ali made changes -
          Labels New: exception slave windows

          Mark Waite added a comment - - edited

          I can't duplicate the problem you're reporting. I have a Windows 10 agent connected by running a local batch script that runs the Java command with remoting.jar to connect to my Docker based controller running Jenkins 2.318. No loss of connection. No issues reported.

          I'm running remoting 4.10 on my Windows agent. What version of remoting are you running?

          I've now updated to use the 4.11 agent.jar with remoting.jar 4.11. No issues detected in any of the cases yet.

          The version node monitor plugin will show the version of remoting used by each of your agents. It will also allow you to enforce that agent remoting must match the remoting version on your controller.

          Mark Waite added a comment - - edited I can't duplicate the problem you're reporting. I have a Windows 10 agent connected by running a local batch script that runs the Java command with remoting.jar to connect to my Docker based controller running Jenkins 2.318. No loss of connection. No issues reported. I'm running remoting 4.10 on my Windows agent. What version of remoting are you running? I've now updated to use the 4.11 agent.jar with remoting.jar 4.11. No issues detected in any of the cases yet. The version node monitor plugin will show the version of remoting used by each of your agents. It will also allow you to enforce that agent remoting must match the remoting version on your controller.

          Bilawal Ali added a comment -

          markewaite first of all thankyou so much for your reply

          Can you please guide me how to check the remoting version , please dont be annoyed for my silly/basic questions as I am very new to jenkins world

           

          I am pretty sure that there is sort of mis match of JDK versions from my hand trying to figure out

           

          Thanks

          Bilawal Ali added a comment - markewaite first of all thankyou so much for your reply Can you please guide me how to check the remoting version , please dont be annoyed for my silly/basic questions as I am very new to jenkins world   I am pretty sure that there is sort of mis match of JDK versions from my hand trying to figure out   Thanks

          Mark Waite added a comment -

          The "Manage Jenkins" -> "System Information" page will show the Java information and operating system of the controller. The "System Information" page of the agent will show the Java information and operating system of the agent.

          The easiest way to see the remoting version number of an agent is to install the version node monitor plugin and then look at the remoting version column in the table of agents at the /computer/ URL on your Jenkins controller. I also have the Java version visible in a column on that table after installing the version node monitor plugin.

          Mark Waite added a comment - The "Manage Jenkins" -> "System Information" page will show the Java information and operating system of the controller. The "System Information" page of the agent will show the Java information and operating system of the agent. The easiest way to see the remoting version number of an agent is to install the version node monitor plugin and then look at the remoting version column in the table of agents at the /computer/ URL on your Jenkins controller. I also have the Java version visible in a column on that table after installing the version node monitor plugin.

          Bilawal Ali added a comment -

          Hey Mark thanks for your detailed reply

           

          I just checked and I also have remoting version 4.11 I have installed that node monitor plugin and configure that accordingly mentioned on jenkins website

          Still i am getting the same error log , I also upgraded JDK 11 on both of my agent machine and installed OpenWebStart for jnlp file but nothing changes and keep getting the same error that agent connected and than immediately Terminated and this cycle is continuing again and again

           

           

          Bilawal Ali added a comment - Hey Mark thanks for your detailed reply   I just checked and I also have remoting version 4.11 I have installed that node monitor plugin and configure that accordingly mentioned on jenkins website Still i am getting the same error log , I also upgraded JDK 11 on both of my agent machine and installed OpenWebStart for jnlp file but nothing changes and keep getting the same error that agent connected and than immediately Terminated and this cycle is continuing again and again    

          Mark Waite added a comment - - edited

          You may want to check with other Windows 10 machines to see if they have the same problem. You might consider checking the network configuration of that machine to see if it has something interesting configured in Windows firewall that might block ports or prevent access. You might consider checking the Windows logs to see if there is any indication why the network connection is being interrupted. Maybe an aggressive virus scanner is deciding that the Windows 10 machine is not allowed to talk over the network.

          You might check the file system permissions of the files on that computer to see if the files where the agent creates its logs have someone been locked so that the agent is not able to write them. You might check that there is not a second agent already running on the machine that might be using the same location for its configuration.

          Mark Waite added a comment - - edited You may want to check with other Windows 10 machines to see if they have the same problem. You might consider checking the network configuration of that machine to see if it has something interesting configured in Windows firewall that might block ports or prevent access. You might consider checking the Windows logs to see if there is any indication why the network connection is being interrupted. Maybe an aggressive virus scanner is deciding that the Windows 10 machine is not allowed to talk over the network. You might check the file system permissions of the files on that computer to see if the files where the agent creates its logs have someone been locked so that the agent is not able to write them. You might check that there is not a second agent already running on the machine that might be using the same location for its configuration.

          Bilawal Ali added a comment -

          For Network Configuration / Windows Firewall : I just checked the setting nothing unusual or any especial settings has been done to block any port or access

          I just disable all virus scanner from my remote machine (agent) and still issue persist , My remote machine currently only have one agent at a time which is asking to connect to master there is no any agent already there only one agent per machine.

          I just reinstall the windows set the jenkins again and still having same issue My agent connected but then terminated again

           

          Can I show you the demo if it is possible ?

          Bilawal Ali added a comment - For Network Configuration / Windows Firewall : I just checked the setting nothing unusual or any especial settings has been done to block any port or access I just disable all virus scanner from my remote machine (agent) and still issue persist , My remote machine currently only have one agent at a time which is asking to connect to master there is no any agent already there only one agent per machine. I just reinstall the windows set the jenkins again and still having same issue My agent connected but then terminated again   Can I show you the demo if it is possible ?

          Mark Waite added a comment -

          No, I'm sorry, but I'm not willing to spend the time to have you demonstrate the problem. There are commercial organizations that sell products based on Jenkins and are willing to provide support services for their products. Since I am unable to duplicate the problem, I recommend that we close this issue as "Cannot reproduce" and that you open a topic on https://community.jenkins.io that describes your configuration in detail and asks for help with the diagnosis.

          Mark Waite added a comment - No, I'm sorry, but I'm not willing to spend the time to have you demonstrate the problem. There are commercial organizations that sell products based on Jenkins and are willing to provide support services for their products. Since I am unable to duplicate the problem, I recommend that we close this issue as "Cannot reproduce" and that you open a topic on https://community.jenkins.io that describes your configuration in detail and asks for help with the diagnosis.

          Mark Waite added a comment -

          Closing as "cannot reproduce". Further exploration and questions need to happen in the user mailing list or on community.jenkins.io.

          Mark Waite added a comment - Closing as "cannot reproduce". Further exploration and questions need to happen in the user mailing list or on community.jenkins.io.
          Mark Waite made changes -
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            jglick Jesse Glick
            testengineer Bilawal Ali
            Votes:
            2 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: