SonarQube server [https://localhost/sonar] can not be reached

Hi Team,

SonarQube 6.7.7
I work with stevedore. So I have several containers :

  • Sonarqube 6.7.7
  • Jenkins 2.249.1
  • nginx

docker-compose conf :
sonar:
container_name: sonar
restart: always
image: sonarqube:6.7.7-community
environment:
- SONARQUBE_JDBC_URL=jdbc:mysql://mysql:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
- SONARQUBE_JDBC_USERNAME=
- SONARQUBE_JDBC_PASSWORD=
- TZ=Europe/Paris
command: -Dsonar.web.context=/sonar
volumes:
- pic_sandbox_sonar_data:/opt/sonarqube/data
- pic_sandbox_sonar_plugins:/opt/sonarqube/extensions/plugins
- pic_sandbox_sonar_conf:/opt/sonarqube/conf

jenkins:
container_name: jenkins
restart: always
image: jenkins/jenkins:2.249.1-lts-jdk11
environment:
- JENKINS_OPTS=–prefix=/jenkins
- JENKINS_JAVA_OPTIONS="-Djavax.net.ssl.trustStore=/usr/local/openjdk-11/lib/security/cacerts"
- no_proxy=xxx.fr
- TZ=Europe/Paris
volumes:
- pic_sandbox_jenkins_master_data:/var/jenkins_home
- pic_sandbox_jenkins_master_jdk:/usr/local/openjdk-11
- /var/run/docker.sock:/var/run/docker.sock

Small precision, I have two jenkins, two sonar, and two nginx. Of course, they are not on the same docker network, the containers all have different names and the nginx don’t expose the same port.

I have a JAVA project and I have a problem with the sonar analysis in jenkins. The following error message is displayed:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project cbf-syntax-editor: Unable to execute SonarQube: Fail to get bootstrap index from server: No route to host

Do you have an idea ?
I’ve already checked the configuration that looks good to me. I’ve pinged between the containers that works.

Hi,

First, 6.7.7 is well past EOL. You should upgrade immediately. Your upgrade path is:

6.7.7 -> 7.9.4 -> 8.5.1 (last step optional)

Beyond that

looks like some sort of network issue to me. I suppose the first thing to check is that you’ve provided the correct SonarQube server URL (sonar.host.url) to analysis, either on the command line or via configuration files. If you have, then… it’s about your network.

 
HTH,
Ann

Hi,

I did the necessary migrations and tests at each new lts. As a result, it is most likely a network problem. I haven’t solved it yet, but it’s probably not related to sonarque.

Thx,
Victor

1 Like