-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
-
Jenkins 2.491 running version 3.1021.va_cc11b_de26a_e on OpenJDK 17.0.13
When starting the agent, reflection issues are printed in the log, although they do not seem to affect general functionality.
<===[JENKINS REMOTING CAPACITY]===>channel started Remoting version: 3283.v92c105e0f819 Launcher: SSHLauncher Communication Protocol: Standard in/out This is a Unix agent ERROR: Unexpected error in launching an agent. This is probably a bug in Jenkins Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to ci-control-node-name at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1923) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:384) at hudson.remoting.Channel.call(Channel.java:1112) at hudson.FilePath.act(FilePath.java:1298) at PluginClassLoader for envinject//org.jenkinsci.plugins.envinject.EnvInjectComputerListener.onOnline(EnvInjectComputerListener.java:144) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:751) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:441) at PluginClassLoader for ssh-slaves//hudson.plugins.sshslaves.SSHLauncher.startAgent(SSHLauncher.java:638) at PluginClassLoader for ssh-slaves//hudson.plugins.sshslaves.SSHLauncher.lambda$launch$0(SSHLauncher.java:458) java.lang.reflect.InaccessibleObjectException: Unable to make private native java.lang.reflect.Field[] java.lang.Class.getDeclaredFields0(boolean) accessible: module java.base does not "opens java.lang" to unnamed module @3c7b4dee at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:200) at java.base/java.lang.reflect.Method.setAccessible(Method.java:194) at PluginClassLoader for envinject//org.jenkinsci.plugins.envinject.service.EnvInjectMasterEnvVarsSetter.getModifiers(EnvInjectMasterEnvVarsSetter.java:29) at PluginClassLoader for envinject//org.jenkinsci.plugins.envinject.service.EnvInjectMasterEnvVarsSetter.call(EnvInjectMasterEnvVarsSetter.java:67) at PluginClassLoader for envinject//org.jenkinsci.plugins.envinject.service.EnvInjectMasterEnvVarsSetter.call(EnvInjectMasterEnvVarsSetter.java:19) at hudson.remoting.UserRequest.perform(UserRequest.java:225) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:391) at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:81) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840) Agent successfully connected and online
That's not really a bug but a limitation when you use java17. It is caused by the envinject plugin.
On the upgrade guide https://www.jenkins.io/doc/upgrade-guide/2.479/ there is explained how you can add options to the java call for an agent to avoid this problem.