Access Denied Error for Agent

795 views
Skip to first unread message

Alexander Partsch

unread,
Jul 27, 2017, 6:02:08 AM7/27/17
to go-cd
Hi,

I have my GoCD Server and Agent running on the same server. GoCD Server is behind an nginx proxy with the name build.example.com. I set the GO_SERVER_URL in the /etc/default/go-agent file to https://build.example.com/go ... the service starts without an error, I could see the agent in the agents list on my GoCD Server Web App, I enabled it and then it says Status=LostContact. Looking into the go-agent.log I see the following error:

2017-07-27 11:56:18,063 [pingThread] ERROR thoughtworks.go.agent.AgentHTTPClientController:84 - Error occurred when agent tried to ping server:
org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [https://build.example.com/go/remoting/remoteBuildRepository]; nested exception is org
.apache.http.NoHttpResponseException: Did not receive successful HTTP response: status code = 403, status message = [Access Denied]
       at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:212)
       at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:145)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
       at com.sun.proxy.$Proxy6.ping(Unknown Source)
       at com.thoughtworks.go.agent.AgentHTTPClientController.ping(AgentHTTPClientController.java:80)
       at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
       at org.springframework.scheduling.support.MethodInvokingRunnable.run(MethodInvokingRunnable.java:65)
       at org.springframework.scheduling.timer.DelegatingTimerTask.run(DelegatingTimerTask.java:70)
       at java.util.TimerThread.mainLoop(Timer.java:555)
       at java.util.TimerThread.run(Timer.java:505)
Caused by: org.apache.http.NoHttpResponseException: Did not receive successful HTTP response: status code = 403, status message = [Access Denied]
       at com.thoughtworks.go.agent.GoHttpClientHttpInvokerRequestExecutor.validateResponse(GoHttpClientHttpInvokerRequestExecutor.java:86)
       at com.thoughtworks.go.agent.GoHttpClientHttpInvokerRequestExecutor.doExecuteRequest(GoHttpClientHttpInvokerRequestExecutor.java:64)
       at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:136)
       at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:192)
       at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:174)
       at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:142)
       ... 12 more


I enabled basic auth with password file on the server, but that shouldn't matter right? Gitlab OAuth Plugin is also enabled.

Appreciate any help on this! 

Alexander Partsch

unread,
Jul 27, 2017, 6:52:50 AM7/27/17
to go-cd
EDIT: Found this message in the go-agent.log

No mapping found for HTTP request with URI [/go/remoting/remoteBuildRepository]] in DispatcherServlet with name 'spring-
cruise-remoting'

Ketan Padegaonkar

unread,
Jul 27, 2017, 6:57:38 AM7/27/17
to go-cd

Reverse proxies are not supported for the agent server communication. Please connect your agents to port 8154 directly.


--
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 go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages