根据此post确保一切正确 - 但未记录明确的错误。
Sql - 服务器连接字符串 - sonar.jdbc.url = JDBC:SQLSERVER:// SUNIL-DELL;的databaseName =声纳; integratedSecurity =真
错误 -
F:\sonarqube\sonarqube-6.2\bin\windows-x86-64>startsonar.bat
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2017.02.17 12:35:36 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory F:\sonarqube\sonarqube-6.2\temp
jvm 1 | 2017.02.17 12:35:36 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[es]: C:\Program Files\Java\jre1.8.0_121\bin\java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=F:\sonarqube\sonarqube-6.2\temp -javaagent:C:\Program Files\Java\jre1.8.0_121\lib\management-agent.jar -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer F:\sonarqube\sonarqube-6.2\temp\sq-process8223413915559248642properties
jvm 1 | 2017.02.17 12:35:49 INFO app[][o.s.p.m.Monitor] Process[es] is up
jvm 1 | 2017.02.17 12:35:49 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[web]: C:\Program Files\Java\jre1.8.0_121\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=F:\sonarqube\sonarqube-6.2\temp -javaagent:C:\Program Files\Java\jre1.8.0_121\lib\management-agent.jar -cp ./lib/common/*;./lib/server/*;F:\sonarqube\sonarqube-6.2\lib\jdbc\mssql\sqljdbc42.jar org.sonar.server.app.WebServer F:\sonarqube\sonarqube-6.2\temp\sq-process4020298620991371426properties
jvm 1 | 2017.02.17 12:36:09 INFO app[][o.s.p.m.Monitor] Process[es] is stopping
jvm 1 | 2017.02.17 12:36:09 ERROR app[][o.s.p.m.Monitor] Process[web] failed to start
jvm 1 | 2017.02.17 12:36:10 INFO app[][o.s.p.m.Monitor] Process[es] is stopped
wrapper | <-- Wrapper Stopped
记录: -
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2017.02.17 12:35:36 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory F:\sonarqube\sonarqube-6.2\temp
2017.02.17 12:35:36 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[es]: C:\Program Files\Java\jre1.8.0_121\bin\java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=F:\sonarqube\sonarqube-6.2\temp -javaagent:C:\Program Files\Java\jre1.8.0_121\lib\management-agent.jar -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer F:\sonarqube\sonarqube-6.2\temp\sq-process8223413915559248642properties
2017.02.17 12:35:49 INFO app[][o.s.p.m.Monitor] Process[es] is up
2017.02.17 12:35:49 INFO app[][o.s.p.m.JavaProcessLauncher] Launch process[web]: C:\Program Files\Java\jre1.8.0_121\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=F:\sonarqube\sonarqube-6.2\temp -javaagent:C:\Program Files\Java\jre1.8.0_121\lib\management-agent.jar -cp ./lib/common/*;./lib/server/*;F:\sonarqube\sonarqube-6.2\lib\jdbc\mssql\sqljdbc42.jar org.sonar.server.app.WebServer F:\sonarqube\sonarqube-6.2\temp\sq-process4020298620991371426properties
2017.02.17 12:36:09 INFO app[][o.s.p.m.Monitor] Process[es] is stopping
2017.02.17 12:36:09 ERROR app[][o.s.p.m.Monitor] Process[web] failed to start
2017.02.17 12:36:10 INFO app[][o.s.p.m.Monitor] Process[es] is stopped
<-- Wrapper Stopped
答案 0 :(得分:0)
如果 web.log 显示此信息(根据您的评论):
org.sonar.server.platform.web.PlatformServletContextListener java.lang.IllegalStateException:无法连接到数据库。请检查连接和设置(请参阅&#39; sonar.jdbc前缀的属性。&#39;)
然后,这意味着SonarQube无法使用提供的URL和凭据连接到数据库。通常检查:
如果仍然无能为力,建议在SonarQube运行的同一台机器上运行一个简单的数据库客户端,以更好地诊断任何URL /凭证问题(因为这里的基本问题独立于SonarQube本身)。