Jenkins can't reach Sonarqube

若如初见. 提交于 2021-01-27 19:16:10

问题


I am currently trying to get my Jenkins/Sonar integration to work.

Here is what I have: Jenkins is working Sonarqube is working (reachable from webinterface) Ports are open

However! I tried all possible settings, Jenkins insists that Sonarqube is Localhost:9000, no matter what I tell it (and even if, this should work too). This leads to following:

and ultimately lets the build fail. What could I try to rectify this?


回答1:


localhost:9000 is the default sonar qube url, regarding the official documentation. You'll have to set the correct url in your pom.xml (assuming you're ussing Maven, which seems to be the case).

if you set the sonar.host.url property in your pom.xml or settings.xml with your correct sonar qube url (ie: 192.168.0.9 for example), it should work as expected

       <properties>
            <!-- Optional URL to server. Default value is http://localhost:9000 -->
            <sonar.host.url>
              http://myserver:9000
            </sonar.host.url>
        </properties>


来源:https://stackoverflow.com/questions/38995148/jenkins-cant-reach-sonarqube

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!