-
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
Docker image: sonarqube:8.9.10-community -
what are you trying to achieve
I’m trying to setup Sonarqube in my Kubernetes cluster using the official Helm Chart.
The sonarqube pod starts and runs normally (I can access it through the sonarqube service) but after about 2 minutes, it gets stopped and then a new pod starts and it continues looping like this.
- what have you tried so far to achieve this
I checked the sonarqube pod logs, but nothing seems to be wrong, no errors.
I check the events and I can see the the liveness probes fails, so I checked the probe command and it looks like this:
exec [sh -c host="$(hostname -i || echo '127.0.0.1')"
reply=$(wget -qO- --header="X-Sonar-Passcode: $SONAR_WEB_SYSTEMPASSCODE" http://${host}:9000/sonarqube/api/system/liveness 2>&1)
if [ -z "$reply" ]; then exit 0; else exit 1; fi
What I understand is it tests if the response of the http call is empty or not, if it’s empty it exits 0 (ok) and if it’s not empty it exists 1 (ko). So it looks like it should be reversed no ?
As this looks quite big, I guess I don’t understand it correctly, so I would like somebody to explain the idea behind this probe command.
Thanks a lot !