SonarQube version: 8.2.0.32929 (Developer Edition)
Platform: Docker Image official Developer Edition from Docker Hub
Jenkins Sonar plugin: 2.11
Jenkins version: 2.150.3 (Docker image)
Jenkins container starts in a swarm stack and resolves dns itself.
docker exec -it 3be96065a05f /bin/bash
jenkins@3be96065a05f:/$ ping xxxx.xxxx.xxxx
PING xxx.xxxx.xxx (xxxx) 56(84) bytes of data.
64 bytes from xxxx.xxxx.xxxx(xxxx): icmp_seq=1 ttl=63 time=0.338 ms
64 bytes from xxxx.xxxx.xxxx (xxxx): icmp_seq=2 ttl=63 time=0.399 ms
^Z
[1]+ Stopped ping xxxxx.xxx.xxxx
jenkins@3be96065a05f:/$
However when using hosname for sonarqube plugin it fails at the quality gate stage.
Checking status of SonarQube task ‘AXF59fw50CzZyg1RS2KY’ on server ‘SQUBE8’
Error 504 on http://xxxx.xxxx.xxxxx:9000/api/ce/task?id=AXF59fw50CzZyg1RS2KY : <!-- IE friendly error message walkround.
if error message from server is less than
512 bytes IE v5+ will use its own error
message instead of the one returned by
server. -->
html,body{height:100%;padding:0;margin:0;}.oc{display:table;width:100%;height:100%;}.ic{display:table-cell;vertical-align:middle;height:100%;}div.msg{display:block;border:1px solid #30c;padding:0;width:500px;font-family:helvetica,sans-serif;margin:10px auto;}h1{font-weight:bold;color:#fff;font-size:14px;margin:0;padding:2px;text-align:center;background: #30c;}p{font-size:12px;margin:15px auto;width:75%;font-family:helvetica,sans-serif;text-align:left;}504 DNS look up failed504 DNS look up failed
The webserver reported that an error occurred while trying to access the website. Please click here to return to the previous page.
URL: http://xxxx.xxxx.xxxx:9000/api/ce/task?id=AXF59fw50CzZyg1RS2KY<br />
<br/>User name:
<br/>Group name:
IP address works.