我正在尝试在Linux x86_64上安装sonarqube-5.1,我在下面的步骤中做了
1: sudo wget http://downloads.sonarsource.com/sonarqube/sonarqube-5.1.zip
2:解压缩sonarqube-5.1.zip
3: sudo mv sonarqube-5.1 / usr / local /
4: sudo /usr/local/sonar/bin/linux-x86-64/sonar.sh start
输出
启动SonarQube ...
开始SonarQube。
但是当我试图打开http://my_local_IP:9000然后它给出了以下错误
无法连接
Firefox无法在my_local_IP:9000建立与服务器的连接。
该网站可能暂时无法使用或太忙。再试一次 片刻。
如果您无法加载任何页面,请检查计算机的网络连接。
如果您的计算机或网络受防火墙或代理保护,请确保允许Firefox访问网络。
如果我在上述步骤中遗漏了任何内容,请帮助您正确/错过步骤。
以下是sonar.log
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2015.09.29 05:58:22 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-28.b13.el6_6.x86_64/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/home/cadmin/software/sonarqube-5.1/temp -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /tmp/sq-process7829107144547289706properties
2015.09.29 05:58:22 INFO es[o.s.p.ProcessEntryPoint] Starting search
2015.09.29 05:58:22 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[search]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-28.b13.el6_6.x86_64/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/home/cadmin/software/sonarqube-5.1/temp -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /tmp/sq-process7829107144547289706properties
2015.09.29 05:58:22 INFO es[o.s.p.ProcessEntryPoint] Starting search
2015.09.29 05:58:22 INFO es[o.s.s.SearchServer] Starting Elasticsearch[sonarqube] on port 9001
2015.09.29 05:58:23 INFO es[o.elasticsearch.node] [sonar-1443520701614] version[1.4.4], pid[31840], build[c88f77f/2015-02-19T13:05:36Z]
2015.09.29 05:58:23 INFO es[o.elasticsearch.node] [sonar-1443520701614] initializing ...
2015.09.29 05:58:23 INFO es[o.e.plugins] [sonar-1443520701614] loaded [], sites []
2015.09.29 05:58:26 INFO es[o.elasticsearch.node] [sonar-1443520701614] initialized
2015.09.29 05:58:26 INFO es[o.elasticsearch.node] [sonar-1443520701614] starting ...
2015.09.29 05:58:26 WARN es[o.e.common.network] failed to resolve local host, fallback to loopback
java.net.UnknownHostException: ip-my_private_IP.ec2.internal: ip-my_private_IP.ec2.internal: unknown error
at java.net.InetAddress.getLocalHost(InetAddress.java:1484) ~[na:1.8.0_45]
at org.elasticsearch.common.network.NetworkUtils.<clinit>(NetworkUtils.java:55) ~[elasticsearch-1.4.4.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.createClientBootstrap(NettyTransport.java:350) [elasticsearch-1.4.4.jar:na]
at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:250) [elasticsearch-1.4.4.jar:na]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) [elasticsearch-1.4.4.jar:na]
at org.elasticsearch.transport.TransportService.doStart(TransportService.java:91) [elasticsearch-1.4.4.jar:na]
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) [elasticsearch-1.4.4.jar:na]
at org.elasticsearch.node.internal.InternalNode.start(InternalNode.java:242) [elasticsearch-1.4.4.jar:na]
at org.sonar.search.SearchServer.start(SearchServer.java:46) [sonar-search-5.1.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:77) [sonar-process-5.1.jar:na]
at org.sonar.search.SearchServer.start(SearchServer.java:46) [sonar-search-5.1.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:77) [sonar-process-5.1.jar:na]
at org.sonar.search.SearchServer.main(SearchServer.java:80) [sonar-search-5.1.jar:na]
Caused by: java.net.UnknownHostException: ip-my_private_IP.ec2.internal: unknown error
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) ~[na:1.8.0_45]
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:907) ~[na:1.8.0_45]
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1302) ~[na:1.8.0_45]
at java.net.InetAddress.getLocalHost(InetAddress.java:1479) ~[na:1.8.0_45]
... 10 common frames omitted
2015.09.29 05:58:26 INFO es[o.e.transport] [sonar-1443520701614] bound_address {inet[/0.0.0.0:9001]}, publish_address {inet[/my_private_IP:9001]}
2015.09.29 05:58:26 INFO es[o.e.discovery] [sonar-1443520701614] sonarqube/LmpMNIoNRo6GxkSamD74sQ
2015.09.29 05:58:29 INFO es[o.e.cluster.service] [sonar-1443520701614] new_master [sonar-1443520701614][LmpMNIoNRo6GxkSamD74sQ][localhost][inet[/my_private_IP:9001]]{rack_id=sonar-1443520701614}, reason: zen-disco-join (elected_as_master)
2015.09.29 05:58:29 INFO es[o.elasticsearch.node] [sonar-1443520701614] started
2015.09.29 05:58:29 INFO es[o.e.gateway] [sonar-1443520701614] recovered [0] indices into cluster_state
2015.09.29 05:58:29 INFO app[o.s.p.m.Monitor] Process[search] is up
2015.09.29 05:58:30 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-28.b13.el6_6.x86_64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=/home/cadmin/software/sonarqube-5.1/temp -cp ./lib/common/*:./lib/server/*:/home/cadmin/software/sonarqube-5.1/lib/jdbc/mysql/mysql-connector-java-5.1.34.jar org.sonar.server.app.WebServer /tmp/sq-process1305181292822442579properties
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=160m; support was removed in 8.0
2015.09.29 05:58:31 INFO web[o.s.p.ProcessEntryPoint] Starting web
2015.09.29 05:58:31 INFO web[o.s.s.app.Webapp] Webapp directory: /home/cadmin/software/sonarqube-5.1/web
2015.09.29 05:58:31 INFO web[o.s.p.ProcessEntryPoint] Starting web
2015.09.29 05:58:31 INFO web[o.s.s.app.Webapp] Webapp directory: /home/cadmin/software/sonarqube-5.1/web
2015.09.29 05:58:32 INFO web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-my_public_IP-38099"]
2015.09.29 05:58:32 ERROR web[o.a.c.h.Http11NioProtocol] Failed to initialize end point associated with ProtocolHandler ["http-nio-my_public_IP-38099"]
java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_45]
at sun.nio.ch.Net.bind(Net.java:437) ~[na:1.8.0_45]
at sun.nio.ch.Net.bind(Net.java:429) ~[na:1.8.0_45]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_45]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_45]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:343) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:730) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:457) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.connector.Connector.initInternal(Connector.java:960) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:567) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:851) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:340) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:62) [sonar-server-5.1.jar:na]
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:340) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:62) [sonar-server-5.1.jar:na]
at org.sonar.server.app.WebServer.start(WebServer.java:40) [sonar-server-5.1.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:77) [sonar-process-5.1.jar:na]
at org.sonar.server.app.WebServer.main(WebServer.java:66) [sonar-server-5.1.jar:na]
2015.09.29 05:58:32 ERROR web[o.a.c.c.StandardService] Failed to initialize connector [Connector[HTTP/1.1-38099]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-38099]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:567) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:851) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:340) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:62) [sonar-server-5.1.jar:na]
at org.sonar.server.app.WebServer.start(WebServer.java:40) [sonar-server-5.1.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:77) [sonar-process-5.1.jar:na]
at org.sonar.server.app.WebServer.main(WebServer.java:66) [sonar-server-5.1.jar:na]
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:962) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) [tomcat-embed-core-8.0.18.jar:8.0.18]
... 10 common frames omitted
Caused by: java.net.BindException: Cannot assign requested address
... 10 common frames omitted
Caused by: java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_45]
at sun.nio.ch.Net.bind(Net.java:437) ~[na:1.8.0_45]
at sun.nio.ch.Net.bind(Net.java:429) ~[na:1.8.0_45]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_45]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_45]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:343) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:730) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:457) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.connector.Connector.initInternal(Connector.java:960) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
... 11 common frames omitted
2015.09.29 05:58:32 WARN web[o.s.p.ProcessEntryPoint] Fail to start web
java.lang.RuntimeException: org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[-1]]
at com.google.common.base.Throwables.propagate(Throwables.java:156) ~[guava-10.0.1.jar:na]
at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:65) ~[sonar-server-5.1.jar:na]
at org.sonar.server.app.WebServer.start(WebServer.java:40) [sonar-server-5.1.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:77) ~[sonar-process-5.1.jar:na]
at org.sonar.server.app.WebServer.main(WebServer.java:66) [sonar-server-5.1.jar:na]
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[-1]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:340) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:62) ~[sonar-server-5.1.jar:na]
... 3 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [StandardService[Tomcat]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:851) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
... 6 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to initialize connector [Connector[HTTP/1.1-38099]]
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:574) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) ~[tomcat-embed-core-8.0.18.jar:8.0.18]
... 8 common frames omitted
2015.09.29 05:58:32 INFO app[o.s.p.m.TerminatorThread] Process[search] is stopping
2015.09.29 05:58:32 INFO es[o.s.p.StopWatcher] Stopping process
2015.09.29 05:58:32 INFO es[o.elasticsearch.node] [sonar-1443520701614] stopping ...
2015.09.29 05:58:32 INFO es[o.elasticsearch.node] [sonar-1443520701614] stopped
2015.09.29 05:58:32 INFO es[o.elasticsearch.node] [sonar-1443520701614] closing ...
2015.09.29 05:58:32 INFO es[o.elasticsearch.node] [sonar-1443520701614] closed
2015.09.29 05:58:32 INFO app[o.s.p.m.TerminatorThread] Process[search] is stopped
<-- Wrapper Stopped
答案 0 :(得分:1)
我们遇到了同样的问题,并且可以通过在/ etc / hosts中添加主机名来解决它。
答案 1 :(得分:0)
Template.template_name.helpers({
users: function(){ return Meteor.users.find() }
});
主要是由于端口冲突。主机上的其他一些服务可能使用了端口9000。 将默认声纳端口从9000更改为9080或任何打开的随机端口。
sonar.properties文件中的 "java.net.BindException: Cannot assign requested address"
并重启声纳服务。
连续检查日志,运行
sonar.web.port=9080
命令。
要检查9000端口是否被任何进程占用, 停止声纳服务,如果它存在则杀死声纳过程并按照命令激活:
tailf <sonarqube-installation-directory>/logs/sonar.log