我最近在我的linux机器( x86_64 GNU/Linux )上安装了Sonarqube4.5.1。
我可以用./sonar.sh start
命令启动声纳。在使用./sonar.sh status
命令检查声纳状态时,它说是SonarQube is running (18493)
,但是当我试图打开仪表板url http://ip-address:9000
时,它会在浏览器上显示“连接拒绝”消息。
在运行mvn sonar:sonar -Dsonar.host.url=http://localhost:9000
命令时,我得到以下错误:
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.4:sonar (default-cli) on project app-dao: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.4:sonar failed: SonarQube server can not be reached at http://localhost:9000. Please check the parameter 'sonar.host.url'. Connection refused -> [Help 1]
我还尝试了maven connecting to Sonar中提到的解决方案,并在maven的conf/setings.xml文件中添加了以下条目,但仍然无法解决这个问题。
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- EXAMPLE FOR MYSQL -->
<sonar.jdbc.username>admin</sonar.jdbc.username>
<sonar.jdbc.password>admin</sonar.jdbc.password>
<sonar.host.url>http://localhost:9000</sonar.host.url>
</properties>
</profile>
发布于 2014-11-18 17:22:11
今天早上刚碰到这个问题。通过配置服务器访问MySQL数据库:http://docs.codehaus.org/display/SONAR/Installing来解决此问题
您希望编辑{sonar_home}/conf/sonar.properties并取消对url、用户名和密码的注释。
如果愿意,您可能需要添加一个新的数据库用户。
发布于 2015-06-22 09:35:41
你必须先启动声纳服务器。
转到\sonar-3.5.1\bin\windows-x86-32
并双击StartSonar.bat
发布于 2017-05-11 06:05:45
在安装目录中的conf文件夹中,sonar.properties文件有一个属性sobar.web.host。如果您已经显式定义了一个ip,这可能会导致这个问题。注释掉并重新启动服务器。这对我有用。
https://stackoverflow.com/questions/26994688
复制相似问题