Just as a followup,

The current go-agent I have installed is version 22.1.0-13913:

[root@mbv01 ~]# yum list --installed | grep gocd 
go-agent.noarch                             22.1.0-13913 
                                  @gocd 

While the server is running version v21.3.0.

gocd_manager.1.djkifkhv5351@mbs01    | jvm 1    | [Wed Apr 06 16:47:28 CEST 
2022]            GoCD Version: 21.3.0-13067 
gocd_manager.1.djkifkhv5351@mbs01    | jvm 1    | [Wed Apr 06 16:47:28 CEST 
2022]            Java Version: 15.0.2

Could the version difference between the client and the server be the cause 
of this?

Best Regards
Rasmus
onsdag den 6. april 2022 kl. 19.35.14 UTC+2 skrev Rasmus M:

> Hi there,
>
> I have a bit of an issue with the GoCD agent on a Rocky 8 x86 installation.
>
> Whenever I launch the systemd go-agent, the following exception is 
> produced in the /var/log/go-agent/go-agent.log file:
>
> 2022-04-06 19:32:44,065 ERROR [scheduler-1] AgentController:92 - [Agent 
> Loop] Error occurred during loop:  
> java.lang.reflect.InaccessibleObjectException: Unable to make field 
> private java.lang.String java.util.regex.Pattern.pattern accessible: module 
> java.base does not "opens java.util
> .regex" to unnamed module @4e04a765 
>        at 
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown 
> Source) 
>        at 
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown 
> Source) 
>        at java.base/java.lang.reflect.Field.checkCanSetAccessible(Unknown 
> Source) 
>        at java.base/java.lang.reflect.Field.setAccessible(Unknown Source) 
>        at 
> com.google.gson.internal.reflect.UnsafeReflectionAccessor.makeAccessible(UnsafeReflectionAccessor.java:44)
>  
>
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:159)
>  
>
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
>  
>
>        at com.google.gson.Gson.getAdapter(Gson.java:458) 
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117)
>  
>
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166)
>  
>
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
>  
>
>        at com.google.gson.Gson.getAdapter(Gson.java:458) 
>        at 
> com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53)
>  
>
>        at com.google.gson.Gson.getAdapter(Gson.java:458) 
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117)
>  
>
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166)
>  
>
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
>  
>
>        at com.google.gson.Gson.getDelegateAdapter(Gson.java:541) 
>        at 
> com.thoughtworks.go.remote.adapter.RuntimeTypeAdapterFactory.create(RuntimeTypeAdapterFactory.java:238)
>  
>
>        at com.google.gson.Gson.getAdapter(Gson.java:458) 
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117)
>  
>
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166)
>  
>
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
>  
>
>        at com.google.gson.Gson.getAdapter(Gson.java:458) 
>        at 
> com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53)
>  
>
>        at com.google.gson.Gson.getAdapter(Gson.java:458) 
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117)
>  
>
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166)
>  
>
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
>  
>
>        at com.google.gson.Gson.getAdapter(Gson.java:458) 
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117)
>  
>
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166)
>  
>
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
>  
>
>        at com.google.gson.Gson.getAdapter(Gson.java:458) 
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117)
>  
>
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166)
>  
>
>        at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
>  
>
>        at com.google.gson.Gson.getDelegateAdapter(Gson.java:541) 
>        at 
> com.thoughtworks.go.remote.adapter.RuntimeTypeAdapterFactory.create(RuntimeTypeAdapterFactory.java:238)
>  
>
>        at com.google.gson.Gson.getAdapter(Gson.java:458) 
>        at com.google.gson.Gson.fromJson(Gson.java:931) 
>        at com.google.gson.Gson.fromJson(Gson.java:897) 
>        at com.google.gson.Gson.fromJson(Gson.java:846) 
>        at com.google.gson.Gson.fromJson(Gson.java:817) 
>        at 
> com.thoughtworks.go.agent.RemotingClient.getWork(RemotingClient.java:79) 
>        at 
> com.thoughtworks.go.agent.AgentHTTPClientController.retrieveWork(AgentHTTPClientController.java:153)
>  
>
>        at 
> com.thoughtworks.go.agent.AgentHTTPClientController.work(AgentHTTPClientController.java:130)
>  
>
>        at 
> com.thoughtworks.go.agent.AgentController.loop(AgentController.java:86) 
>        at jdk.internal.reflect.GeneratedMethodAccessor8.invoke(Unknown 
> Source) 
>        at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown 
> Source) 
>        at java.base/java.lang.reflect.Method.invoke(Unknown Source) 
>        at 
> org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
>  
>
>        at 
> org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
>  
>
>        at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown 
> Source) 
>        at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown 
> Source) 
>        at 
> java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
>  
> Source) 
>        at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
>        at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
> Source) 
>        at java.base/java.lang.Thread.run(Unknown Source)
>
> The Rocky 8 VM is currently using Java 17:
>
> [root@mbv01 ~]# java --version 
> openjdk 17.0.2 2022-01-18 LTS 
> OpenJDK Runtime Environment 21.9 (build 17.0.2+8-LTS) 
> OpenJDK 64-Bit Server VM 21.9 (build 17.0.2+8-LTS, mixed mode, sharing)
>
> But I have also tried with java-8-openjdk and java-11-openjdk without it 
> having any effect on the produced Exception.
>
> Do you have any tips on how to resolve this?
>
> Best Regards
> Rasmus
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/70bcb389-92e0-4fd8-9840-75ef0aa95dden%40googlegroups.com.

Reply via email to