我已经在 CentOS 上安装了 SonarQube,并且 Sonar 服务处于活动状态并正在运行。在配置文件中,使用端口设置为 9000。但是 Sonar UI 无法从localhost:9000
.
这是我的声纳日志:
2019.07.17 15:11:13 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2019.07.17 15:11:13 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2019.07.17 15:11:13 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube/temp/conf/es
2019.07.17 15:11:13 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2019.07.17 15:11:13 INFO app[][o.e.p.PluginsService] no modules loaded
2019.07.17 15:11:13 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2019.07.17 15:11:20 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2019.07.17 15:11:20 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.2.5.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process5654348533781620634properties
2019.07.17 15:11:29 INFO app[][o.s.a.SchedulerImpl] Process[web] is up
2019.07.17 15:11:29 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='ce', ipcIndex=3, logFilenamePrefix=ce]] from [/opt/sonarqube]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.2.5.jar org.sonar.ce.app.CeServer /opt/sonarqube/temp/sq-process1052960785390598020properties
2019.07.17 15:11:33 INFO app[][o.s.a.SchedulerImpl] Process[ce] is up
2019.07.17 15:11:33 INFO app[][o.s.a.SchedulerImpl] SonarQube is up
根据文档
此外,请务必在对配置进行任何更改后重新启动服务。