Hi Jeff,

Here is what I tried.

I got a Vagrant box of Ubuntu 14.04 and installed the GoCD server v19.4.0 
using the Debian package. I then upgraded my GoCD server to GoCD v19.8.0. 
With GoCD the agents auto-upgrade once the server is upgraded. My agent 
upgraded fine. 

I then separately upgraded an agent using apt-get and that worked fine to. 
I could always see the /var/lib/go-agent/config/token file. 

Could you confirm the version you upgraded from was 19.4.0 or was it an 
earlier version of GoCD?

On Thursday, September 19, 2019 at 2:03:38 AM UTC+5:30, Jeff Vincent wrote:
>
> I've recently updated from 19.4.0 (I think) to 19.8.0 (on Ubuntu 16.04).  
> On all of my agents I have four (4) agent processes running.
>
> For some reason, the /var/lib/go-agent/config/token file gets wiped out 
> during the upgrade and the agent won't connect to the server any more with 
> the error (below) in the log.
>
> I can clean out the guid.txt and it will regenerate a guid and new token, 
> but then I have to go update the GUID in all the environments that the 
> agent belonged to.  
>
> How can I force the go server to resend the token for the same guid?  Or 
> is there another way to fix this?
>
> 2019-09-18 14:21:37,126 ERROR [scheduler-1] AgentHTTPClientController:103 
> - Error occurred when agent tried to ping server:
> org.springframework.remoting.RemoteAccessException: Could not access HTTP 
> invoker remote service at [
> https://goserver/go/remoting/remoteBuildRepository]; nested exception is 
> java.lang.RuntimeException: Couldn't load token from filesystem
>         at 
> org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:226)
>         at 
> org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:153)
>         at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>         at 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
>         at com.sun.proxy.$Proxy10.ping(Unknown Source)
>         at 
> com.thoughtworks.go.agent.AgentHTTPClientController.ping(AgentHTTPClientController.java:98)
>         at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>         at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.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)
> Caused by: java.lang.RuntimeException: *Couldn't load token from 
> filesystem*
>         at 
> com.thoughtworks.go.util.ExceptionUtils.bomb(ExceptionUtils.java:41)
>         at 
> com.thoughtworks.go.config.IdFileService.load(IdFileService.java:47)
>         at 
> com.thoughtworks.go.config.TokenService.load(TokenService.java:22)
>         at 
> com.thoughtworks.go.config.DefaultAgentRegistry.token(DefaultAgentRegistry.java:39)
>         at 
> com.thoughtworks.go.agent.GoHttpClientHttpInvokerRequestExecutor.doExecuteRequest(GoHttpClientHttpInvokerRequestExecutor.java:70)
>         at 
> org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:137)
>         at 
> org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:202)
>         at 
> org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:184)
>         at 
> org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:150)
>         ... 16 common frames omitted
> Caused by: java.io.FileNotFoundException: *File 'config/token' does not 
> exist*
>         at 
> org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:297)
>         at 
> org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1805)
>         at 
> com.thoughtworks.go.config.IdFileService.load(IdFileService.java:45)
>         ... 23 common frames omitted
>
>
>

-- 
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/72ce4449-37b6-442b-bf5f-bf3a8c174f2e%40googlegroups.com.

Reply via email to