MSBuild.SonarQube.Runner未能连接到数据库MySQL
我正在尝试使用MSBuild.SonarQube.Runner进行分析。 遵循这里提到的步骤 我正在使用数据库-MySQL服务器5.6和 操作系统-Windows SonarQube.Analysis.xmlMSBuild.SonarQube.Runner未能连接到数据库MySQL,mysql,msbuild,sonarqube,Mysql,Msbuild,Sonarqube,我正在尝试使用MSBuild.SonarQube.Runner进行分析。 遵循这里提到的步骤 我正在使用数据库-MySQL服务器5.6和 操作系统-Windows SonarQube.Analysis.xml <Property Name="sonar.host.url">http://ipaddress:9000</Property> <Property Name="sonar.login">sonaruser</Property> &
<Property Name="sonar.host.url">http://ipaddress:9000</Property>
<Property Name="sonar.login">sonaruser</Property>
<Property Name="sonar.password">userpassword</Property>
<Property Name="sonar.jdbc.url">jdbc:mysql://ipaddress:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance</Property>
<Property Name="sonar.jdbc.username">sonardbuser</Property>
<Property Name="sonar.jdbc.password">sonardbuserpasswd</Property>
请帮助,我缺少什么?确保MSBuild.SonarQube.Runner
begin
和end
阶段使用的设置文件实际上是相同的。在end
调用过程中,正在启动的sonar runner尝试连接到默认数据库,如您在日志行中看到的:09:22:53.285 INFO-为JDBC创建JDBC数据源:h2:tcp://localhost/sonar
这是同一个文件,我在环境变量“path”中添加了MSBuild.SonarQube.Runner的路径,并打开VS命令提示符并从项目sln目录路径工作。请确保MSBuild.SonarQube.Runnerbegin
和end
阶段使用的设置文件实际上相同。在end
调用过程中,正在启动的sonar runner尝试连接到默认数据库,如您在日志行中看到的:09:22:53.285 INFO-为JDBC创建JDBC数据源:h2:tcp://localhost/sonar
这是同一个文件,我在环境变量“path”中添加了MSBuild.SonarQube.Runner的路径,并打开VS命令提示符,从project sln目录路径开始工作。
....
INFO: SonarQube Server 4.5.6
09:22:51.341 INFO - Load global referentials...
09:22:52.268 INFO - Load global referentials done: 929 ms
09:22:52.285 INFO - User cache: C:\Users\abcd\.sonar\cache
09:22:52.293 INFO - Install plugins
09:22:53.255 INFO - Install JDBC driver
09:22:53.285 INFO - Create JDBC datasource for jdbc:h2:tcp://localhost/sonar
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 5.864s
Final Memory: 3M/15M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.IllegalStateException: Fail to connect to database
at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)