远程机器上的声纳 - 跑步者没有选择正确的jdbc连接?

时间:2013-06-14 11:22:35

标签: sonarqube sonar-runner

我在RHEL6.2服务器上有sonarqube 3.5.1和sonar-runner 2.2.1,sonar-runner对我下载的样本数据工作正常。

但是,我已经将sonar-runner部署到Windows客户端,并且无法连接到H2数据库。

INFO: Sonar Server 3.5.1
11:58:19.960 INFO  - Load batch settings
11:58:20.116 INFO  - User cache: C:\Users\e01942082\.sonar\cache
11:58:20.132 INFO  - Install plugins
11:58:21.739 INFO  - -------------  Executing Project Scan
11:58:22.113 INFO  - Install JDBC driver
11:58:22.129 INFO  - Apply project exclusions
11:58:22.129 WARN  - H2 database should be used for evaluation purpose only
11:58:22.129 INFO  - Create JDBC datasource for jdbc:h2:tcp://localhost/sonar
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 8.393s
Final Memory: 2M/15M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Fail to connect to database
ERROR: Caused by: Cannot create PoolableConnectionFactory (Connection is broken: "java.net.ConnectException: Connection refused: connect: localhost" [90067-167])
ERROR: Caused by: Connection is broken: "java.net.ConnectException: Connection refused: connect: localhost" [90067-167]
ERROR: Caused by: Connection refused: connect

所以,我已经更新了sonarqube中的声纳属性

# Comment the following line to deactivate the default embedded database.
sonar.jdbc.url:                            jdbc:h2:tcp://gbrpsr000000711.xxxxxxxxx.xxxxxxxxxxx.com:9092/sonar
sonar.jdbc.driverClassName:                org.h2.Driver

和sonar-runner使用

连接到服务器
sonar.host.url=http://gbrpsr000000711.xxxxxxx.xxxxxxxx.com:9000/sonar

不清楚为什么它拿起localhost而不是服务器的完整url。在进行配置更改之前,当我启动服务时,我是否遗漏了某些内容/或者是否已嵌入?

谢谢你的帮助

的dD

0 个答案:

没有答案