SonarQube 7.1-Debian安装-拒绝连接

SonarQube 7.1-Debian安装-拒绝连接,sonarqube,Sonarqube,我第一次运行SonarQube 7.1时遇到问题。我在日志中仍然有一个错误,如下所示: /sonar.sh控制台 2020.01.16 15:55:24 DEBUG app[][o.e.c.t.TransportClientNodesService] failed to connect to node [{#transport#-1}{NGq4ygvgSFGtJZHz_LNBIQ}{127.0.0.1}{127.0.0.1:9001}], ignoring... org.elasticsearc

我第一次运行SonarQube 7.1时遇到问题。我在日志中仍然有一个错误,如下所示:

/sonar.sh控制台

2020.01.16 15:55:24 DEBUG app[][o.e.c.t.TransportClientNodesService] failed to connect to node [{#transport#-1}{NGq4ygvgSFGtJZHz_LNBIQ}{127.0.0.1}{127.0.0.1:9001}], ignoring...
org.elasticsearch.transport.ConnectTransportException: [][127.0.0.1:9001] connect_timeout[30s]
    at org.elasticsearch.transport.netty4.Netty4Transport.connectToChannels(Netty4Transport.java:362)
    at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:570)
    at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:117)
    at org.elasticsearch.transport.TransportService.openConnection(TransportService.java:351)
    at org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler.doSample(TransportClientNodesService.java:407)
    at org.elasticsearch.client.transport.TransportClientNodesService$NodeSampler.sample(TransportClientNodesService.java:357)
    at org.elasticsearch.client.transport.TransportClientNodesService$ScheduledNodeSampler.run(TransportClientNodesService.java:390)
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:569)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:9001
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:352)
    at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:632)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
    ... 1 common frames omitted
Caused by: java.net.ConnectException: Connection refused
    ... 10 common frames omitted

我试图在Ubuntu 19.10和Debian 10上运行它。为什么这么过时的版本?因为我必须弄清楚如何将它升级到最新版本,所以我正在创建测试环境来实现这一点。 很久以前,确实有人创建了当前的产品,因为那时没有人碰它:)

到目前为止已经做了哪些工作: -我已停止并禁用ufw和iptables -Java版本与生产上的版本几乎相同

sonarqube@sonarqube-srv:/$ java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
  • 声纳配置如下所示:
当我运行
/sonar.sh start
插入
/sonar.sh控制台
时,会出现如下错误:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fe83110eb21, pid=5723, tid=0x00007fe848814700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_231-b11) (build 1.8.0_231-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.231-b11 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# J 21 C1 java.lang.String.getChars(II[CI)V (62 bytes) @ 0x00007fe83110eb21 [0x00007fe83110eb00+0x21]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /opt/sonarqube-7.1/elasticsearch/hs_err_pid5723.log

有人知道我遗漏了什么吗?

您正在使用端口9001。在配置中,您可以阅读:#Elasticsearch端口。默认值为9001。使用0获得一个空闲端口。#作为安全预防措施,应被防火墙阻止且不暴露于互联网。可能防火墙中发生了某些更改,或者您正在以根用户身份运行sonaqube,这是不允许的。将端口设置从9001更改为0不会改变任何内容。仍然是相同的错误:``jvm 1 | 2020.01.20 14:50:34调试应用程序[][o.e.c.t.TransportClientNodeService]未能连接到节点[{transport}-1}{7wuCGfkIRQmuK9Q1BBQv4g}{127.0.0.1}{127.0.0.1:34459}],忽略。。。jvm 1 | org.elasticsearch.transport.ConnectTransportException:[[127.0.0.1:34459]连接超时[30s]jvm 1 |位于org.elasticsearch.transport.netty4.Netty4Transport.connectToChannels(Netty4Transport.java:362)``我以sonarqube用户的身份运行它,而不是以root用户的身份运行它。
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fe83110eb21, pid=5723, tid=0x00007fe848814700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_231-b11) (build 1.8.0_231-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.231-b11 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# J 21 C1 java.lang.String.getChars(II[CI)V (62 bytes) @ 0x00007fe83110eb21 [0x00007fe83110eb00+0x21]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /opt/sonarqube-7.1/elasticsearch/hs_err_pid5723.log