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

Illegal reflective access by hudson.remoting.RemoteClassLoader to method java.lang.ClassLoader.getClassLoadingLock

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • remoting
    • Windows Server 2019

      Starting with version 2.343 Jenkins shows all nodes (agents/slaves) as offline

      Those are older nodes, so still called slaves.

      In jenkins-slave.err.log this is protocolled:

       
      Apr. 14, 2022 11:32:02 VORM. hudson.remoting.jnlp.Main createEngine
      INFORMATION: Setting up slave: Jenkins-Slave-E2
      Apr. 14, 2022 11:32:02 VORM. hudson.remoting.jnlp.Main$CuiListener <init>
      INFORMATION: Jenkins agent is running in headless mode.
      Apr. 14, 2022 11:32:03 VORM. hudson.remoting.jnlp.Main$CuiListener status
      INFORMATION: Locating server among http://swsbuild2.sws.local/jenkins/
      Apr. 14, 2022 11:32:03 VORM. org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
      INFORMATION: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
      Apr. 14, 2022 11:32:03 VORM. hudson.remoting.jnlp.Main$CuiListener status
      INFORMATION: Agent discovery successful
        Agent address: **************
        Agent port:    1
        Identity:      **************
      Apr. 14, 2022 11:32:03 VORM. hudson.remoting.jnlp.Main$CuiListener status
      INFORMATION: Handshaking
      Apr. 14, 2022 11:32:03 VORM. hudson.remoting.jnlp.Main$CuiListener status
      INFORMATION: Connecting to s**************
      Apr. 14, 2022 11:32:03 VORM. hudson.remoting.jnlp.Main$CuiListener status
      INFORMATION: Trying protocol: JNLP4-connect
      Apr. 14, 2022 11:32:03 VORM. hudson.remoting.jnlp.Main$CuiListener status
      INFORMATION: Remote identity confirmed: **************
      Apr. 14, 2022 11:32:03 VORM. hudson.remoting.jnlp.Main$CuiListener status
      INFORMATION: Connected
      WARNING: An illegal reflective access operation has occurred
      WARNING: Illegal reflective access by hudson.remoting.RemoteClassLoader (file:/E:/E2/slave.jar) to method java.lang.ClassLoader.getClassLoadingLock(java.lang.String)
      WARNING: Please consider reporting this to the maintainers of hudson.remoting.RemoteClassLoader
      WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
      WARNING: All illegal access operations will be denied in a future release

      After reverting Jenkins to version 2.342 the issue is gone

          [JENKINS-68271] Illegal reflective access by hudson.remoting.RemoteClassLoader to method java.lang.ClassLoader.getClassLoadingLock

          Basil Crow added a comment -

          Please provide the output of java -version on both your controller and on the agent, as well as the version of Remoting being used on the agent.

          Basil Crow added a comment - Please provide the output of java -version on both your controller and on the agent, as well as the version of Remoting being used on the agent.

          Agents and controller run on the same system.

          H:\>"%JAVA_HOME%\bin\java.exe" -version
          openjdk version "11.0.13" 2021-10-19 LTS
          OpenJDK Runtime Environment Microsoft-27990 (build 11.0.13+8-LTS)
          OpenJDK 64-Bit Server VM Microsoft-27990 (build 11.0.13+8-LTS, mixed mode)

          I'm not sure where to find the version of Remoting?
          slave.jar was created on 2017-04-28. It's quite old...
           
          I've just now seen the <download> tag inside the jenkins-slave.xml 
          I assume it's recommented to uncomment this?

          Benjamin Buchfink added a comment - Agents and controller run on the same system. H:\>"%JAVA_HOME%\bin\java.exe" -version openjdk version "11.0.13" 2021-10-19 LTS OpenJDK Runtime Environment Microsoft-27990 (build 11.0.13+8-LTS) OpenJDK 64-Bit Server VM Microsoft-27990 (build 11.0.13+8-LTS, mixed mode) I'm not sure where to find the version of Remoting? slave.jar was created on 2017-04-28. It's quite old...   I've just now seen the <download> tag inside the jenkins-slave.xml  I assume it's recommented to uncomment this?

          Ok that solves the issue. I uncommented the <download> tag, changed 'slave.jar' in the download url to 'agent.jar' and now I'm running on current Remoting and everything's working fine again. Thank's for the input!

          Benjamin Buchfink added a comment - Ok that solves the issue. I uncommented the <download> tag, changed 'slave.jar' in the download url to 'agent.jar' and now I'm running on current Remoting and everything's working fine again. Thank's for the input!

          Agents were using a very old version of Remoting

          Benjamin Buchfink added a comment - Agents were using a very old version of Remoting

            Unassigned Unassigned
            swsbb Benjamin Buchfink
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: