SonarQube - Elasticsearch 无法绑定

马特索姆

上周 SonarQube 已加载,运行良好且花哨。现在它抛出这个警告sonar.log

2017.03.16 11:58:47 WARN   es[o.e.bootstrap]  JNA not found. native methods will be disabled.
2017.03.16 11:58:47 INFO   es[o.elasticsearch.node]  [sonar-1489661925446] initialized
2017.03.16 11:58:47 INFO   es[o.elasticsearch.node]  [sonar-1489661925446] starting ...

当然没有开始。当我不在时,什么可能会改变?

编辑:在尝试停止声纳后我没有提供日志

Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2017.03.16 16:54:43 INFO  app[o.s.a.AppFileSystem] Cleaning or creating temp directory /proj/tn/tools/sonar/temp
2017.03.16 16:54:43 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[es]: /afs/sunrise.ericsson.se/se/app/vbuild/SLED11-x86_64/jdk/1.8.0_102/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=/proj/tn/tools/sonar/temp -javaagent:/afs/sunrise.ericsson.se/se/app/vbuild/SLED11-x86_64/jdk/1.8.0_102/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /proj/tn/tools/sonar/temp/sq-process8365491608077217541properties
2017.03.16 16:54:43 INFO   es[o.s.p.ProcessEntryPoint]  Starting es
2017.03.16 16:54:43 INFO   es[o.s.s.EsSettings]  Elasticsearch listening on 127.0.0.1:9001
2017.03.16 16:54:43 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] version[1.7.5], pid[438787], build[00f95f4/2016-02-02T09:55:30Z]
2017.03.16 16:54:43 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] initializing ...
2017.03.16 16:54:43 INFO   es[o.e.plugins]  [sonar-1489679683034] loaded [], sites []
2017.03.16 16:54:43 INFO   es[o.elasticsearch.env]  [sonar-1489679683034] using [1] data paths, mounts [[/proj/tn (seroisproj02002.mo.sw.ericsson.se:/uproj020036/tn)]], net usable_space [330.8gb], net total_space [4.4tb], types [nfs]
2017.03.16 16:54:44 WARN   es[o.e.bootstrap]  JNA not found. native methods will be disabled.
2017.03.16 16:54:45 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] initialized
2017.03.16 16:54:45 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] starting ...
2017.03.16 16:54:45 WARN   es[o.s.p.ProcessEntryPoint]  Fail to start es
org.elasticsearch.transport.BindTransportException: Failed to bind to [9001]
    at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:422) ~[elasticsearch-1.7.5.jar:na]
    at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:283) ~[elasticsearch-1.7.5.jar:na]
    at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.7.5.jar:na]
    at org.elasticsearch.transport.TransportService.doStart(TransportService.java:153) ~[elasticsearch-1.7.5.jar:na]
    at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:85) ~[elasticsearch-1.7.5.jar:na]
    at org.elasticsearch.node.internal.InternalNode.start(InternalNode.java:257) ~[elasticsearch-1.7.5.jar:na]
    at org.sonar.search.SearchServer.start(SearchServer.java:46) [sonar-search-5.6.2.jar:na]
    at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:102) ~[sonar-process-5.6.2.jar:na]
    at org.sonar.search.SearchServer.main(SearchServer.java:81) [sonar-search-5.6.2.jar:na]
Caused by: org.elasticsearch.common.netty.channel.ChannelException: Failed to bind to: /127.0.0.1:9001
    at org.elasticsearch.common.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) ~[elasticsearch-1.7.5.jar:na]
    at org.elasticsearch.transport.netty.NettyTransport$1.onPortNumber(NettyTransport.java:413) ~[elasticsearch-1.7.5.jar:na]
    at org.elasticsearch.common.transport.PortsRange.iterate(PortsRange.java:58) ~[elasticsearch-1.7.5.jar:na]
    at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:409) ~[elasticsearch-1.7.5.jar:na]
    ... 8 common frames omitted
Caused by: java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_102]
    at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_102]
    at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_102]
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_102]
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_102]
    at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193) ~[elasticsearch-1.7.5.jar:na]
    at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391) ~[elasticsearch-1.7.5.jar:na]
    at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315) ~[elasticsearch-1.7.5.jar:na]
    at org.elasticsearch.common.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) ~[elasticsearch-1.7.5.jar:na]
    at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[elasticsearch-1.7.5.jar:na]
    at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[elasticsearch-1.7.5.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_102]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_102]
    at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_102]
2017.03.16 16:54:45 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] stopping ...
2017.03.16 16:54:45 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] stopped
2017.03.16 16:54:45 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] closing ...
2017.03.16 16:54:45 INFO   es[o.elasticsearch.node]  [sonar-1489679683034] closed

服务器操作系统:Linux

马特索姆

问题解决了,有点惭愧,但正如日志所说,端口 9001 已被服务器上的其他人使用(可能是我自己之前的进程),因此 elasticsearch 无法绑定。

只需将其更改为 9002。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章