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.