Address in property sonar.cluster.es.hosts is not a valid address

  • 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
1 Like

Hi,

Welcome to the community!

Kubernetes isn’t supported for the Data Center Edition in 8.9. The beta opened up in 9.1 and the feature went GA in 9.3.

All that said, if you have Data Center Editon, you certainly have access to our professional support engineers. You’ll probably be better off with them on this topic.

 
HTH,
Ann

2 Likes

Oh god, thanks for that!

I’ll start working with the newest versions

2 Likes

Exception in thread “main” org.sonar.process.MessageException: Address in property sonar.cluster.hosts is not a valid address: sonarqube-ha-sonarqube-dce-headless

unable to establish communication between sonarqube pods and elastic search pods, getting connection refused. I see services are also created