Enable agent debug log

505 views
Skip to first unread message

Gerd Katzenbeisser

unread,
Jul 18, 2016, 3:03:40 AM7/18/16
to go-cd
Hi @all!

The agents on one of our build cannot connect to the server anymore. 

2016-07-18 08:49:36,113 [loopThread] INFO  go.agent.service.SslInfrastructureService:93 - [Agent Registration] Starting to register agent
2016-07-18 08:49:36,129 [loopThread] ERROR go.agent.service.SslInfrastructureService:112 - [Agent Registration] There was a problem registering with the go server.
java.lang.StringIndexOutOfBoundsException: String index out of range: -4
at java.lang.String.charAt(Unknown Source)
at org.bouncycastle.util.encoders.Base64Encoder.decode(Unknown Source)
at org.bouncycastle.util.encoders.Base64.decode(Unknown Source)
at org.bouncycastle.util.io.pem.PemReader.loadObject(Unknown Source)
at org.bouncycastle.util.io.pem.PemReader.readPemObject(Unknown Source)
at com.thoughtworks.go.security.Registration.fromJson(Registration.java:49)

I want to enable the debug log level to get more infos about what is going wrong. But I don't know how to do that. What I tried so far is:

  • Change all lines mentioning log level INFO to DEBUG in config/log4j.properties 
  • Uncomment the line mentioning Agent Debug in wrapper-agent.conf
    set.JVM_DEBUG=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=%JVM_DEBUG_PORT%
  • Set all wrapper.*.loglevel to DEBUG in wrapper-agent.conf
But I still only get Info level. How do I correctly enable the debug log level?

greets
Gerd

Ketan Padegaonkar

unread,
Jul 18, 2016, 3:07:42 AM7/18/16
to go-cd
You want to configure it using `go-agent-log4j.properties` in the directory where you installed the go agent.

--
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.

Gerd Katzenbeisser

unread,
Jul 18, 2016, 3:41:20 AM7/18/16
to go...@googlegroups.com
Thanks for the quick reply. I only had a look at the config folder and missed the file in the agents dir.

--
You received this message because you are subscribed to a topic in the Google Groups "go-cd" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/go-cd/zLqeECge1t4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to go-cd+un...@googlegroups.com.

ddor...@thoughtworks.com

unread,
Jul 20, 2016, 6:21:48 PM7/20/16
to go-cd
@Gerd: Did you solve your problem? I'm having the same issue...

ddor...@thoughtworks.com

unread,
Jul 20, 2016, 6:36:03 PM7/20/16
to go-cd
Ok, I was able to solve the problem with Aravind's help

I was getting the same stacktrace as you @Gerd. In the go-server, my new agent was in 'Pending' state. I was able to then just enable that agent and now it is working just fine.

Cheers,

Duda.

ddor...@thoughtworks.com

unread,
Jul 20, 2016, 6:38:50 PM7/20/16
to go-cd
There is an open issue for that now: https://github.com/gocd/gocd/issues/2464

Thanks,

Duda.
Reply all
Reply to author
Forward
0 new messages