-
versions used (SonarQube, Scanner, Plugin, and any relevant extension):
Sonar 8.9.6-datacenter. No plugins -
error observed
Exception in thread "main" org.sonar.process.MessageException: Address in property sonar.cluster.es.hosts is not a valid address: sonarqube-sonarqube-dce-search-1, sonarqube-sonarqube-dce-search-2
-
steps to reproduce
Use helm (GitHub - SonarSource/helm-chart-sonarqube) to deploy default Sonarqube configurations on AWS EKS cluster.
I’m using a custom helm values file because I’m pointing to internal images of search and sq servers. Those images are the same as we can find on dockerhub under tags of dataceter-app and datacenter-search. I’m doing that because the cluster does not have access to the internet.
Command applied:helm upgrade --install -n sonarqube-dce sonarqube sonarqube/sonarqube-dce -f k8s_configs/sonarqube/sonar_helm_values.yaml
If I update the environment variable “sonar.cluster.es.hosts” to point to the service host sonarqube-sonarqube-dce-search.sonarqube-dce.svc.cluster.local
, the error goes away. But with that configuration I get another one afterwards because no pod for search will become the master one.
Apparently there’s a problem with checking URLs on the class “ClusterSettings.java - method on row 144”. That java method will require something close to a FQDN present. And inside Kubernetes, the simple string “sonarqube-sonarqube-dce-search-0” is already a valid host.
I’ve also already tried overwriting the sonar.cluster.es.hosts variable by adding the pod FQDN as well like:
sonarqube-sonarqube-dce-search-0.sonarqube-dce.pod.cluster.local,sonarqube-sonarqube-dce-search-1.sonarqube-dce.pod.cluster.local,sonarqube-sonarqube-dce-search-2.sonarqube-dce.pod.cluster.local
But still I get the same error message
- potential workaround
No workaround so far