Skip to content

Commit da9a823

Browse files
updated readme for debugging
1 parent 76145b6 commit da9a823

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,51 @@ To build the jar, run `./gradlew clean build`
8383

8484
To build the jar, run `./gradlew deploy -Pserver_path=~/gocd`
8585

86+
## Troubleshooting
87+
88+
### Enable Debug Logs
89+
90+
#### If you are on GoCD version 19.6 and above:
91+
92+
Edit the file `wrapper-properties.conf` on your GoCD server and add the following options. The location of the `wrapper-properties.conf` can be found in the [installation documentation](https://docs.gocd.org/current/installation/installing_go_server.html) of the GoCD server.
93+
94+
```properties
95+
# We recommend that you begin with the index `100` and increment the index for each system property
96+
wrapper.java.additional.100=-Dplugin.cd.go.contrib.elasticagent.kubernetes.log.level=debug
97+
```
98+
99+
If you're running with GoCD server 19.6 and above on docker using one of the supported GoCD server images, set the environment variable `GOCD_SERVER_JVM_OPTIONS`:
100+
101+
```shell
102+
docker run -e "GOCD_SERVER_JVM_OPTIONS=-Dplugin.cd.go.contrib.elasticagent.kubernetes.log.level=debug" ...
103+
```
104+
105+
#### If you are on GoCD version 19.5 and lower:
106+
107+
* On Linux:
108+
109+
Enabling debug level logging can help you troubleshoot an issue with this plugin. To enable debug level logs, edit the file `/etc/default/go-server` (for Linux) to add:
110+
111+
```shell
112+
export GO_SERVER_SYSTEM_PROPERTIES="$GO_SERVER_SYSTEM_PROPERTIES -Dplugin.cd.go.contrib.elasticagent.kubernetes.log.level=debug"
113+
```
114+
115+
If you're running the server via `./server.sh` script:
116+
117+
```shell
118+
$ GO_SERVER_SYSTEM_PROPERTIES="-Dplugin.cd.go.contrib.elasticagent.kubernetes.log.level=debug" ./server.sh
119+
```
120+
121+
* On windows:
122+
123+
Edit the file `config/wrapper-properties.conf` inside the GoCD Server installation directory (typically `C:\Program Files\Go Server`):
124+
125+
```
126+
# config/wrapper-properties.conf
127+
# since the last "wrapper.java.additional" index is 15, we use the next available index.
128+
wrapper.java.additional.16=-Dplugin.cd.go.contrib.elasticagent.kubernetes.log.level=debug
129+
```
130+
86131
## License
87132
88133
```plain

0 commit comments

Comments
 (0)