在Windows上运行Sonarqube 6.7时出现Elasticsearch错误

时间:2018-01-17 16:49:45

标签: elasticsearch sonarqube

我使用JDK 1.8.0_161作为Java运行时。当我运行StartSonar.bat时,我得到以下异常:

 2018.01.17 11:27:10 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Users\jguzmanb\Downloads\sonar\temp
`enter code here`2018.01.17 11:27:10 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:22412
2018.01.17 11:27:10 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\Users\jguzmanb\Downloads\sonar\elasticsearch]: C:\Program Files\Java\jre1.8.0_161\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\Users\jguzmanb\Downloads\sonar\elasticsearch -cp lib/* org.elasticsearch.bootstrap.Elasticsearch -Epath.conf=C:\Users\jguzmanb\Downloads\sonar\temp\conf\es
2018.01.17 11:27:10 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2018.01.17 11:27:10 INFO  app[][o.e.p.PluginsService] no modules loaded
2018.01.17 11:27:10 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.01.17 11:27:19 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2018.01.17 11:27:19 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [C:\Users\jguzmanb\Downloads\sonar]: C:\Program Files\Java\jre1.8.0_161\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\Users\jguzmanb\Downloads\sonar\temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*;./lib/server/*;C:\Users\jguzmanb\Downloads\sonar\lib\jdbc\mysql\mysql-connector-java-5.1.42.jar org.sonar.server.app.WebServer C:\Users\jguzmanb\Downloads\sonar\temp\sq-process8452829030556415962properties
2018.01.17 11:27:24 INFO  app[][o.s.a.SchedulerImpl] Process [web] is stopped
2018.01.17 11:27:24 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.01.17 11:27:24 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2018.01.17 11:27:24 WARN  app[][o.e.t.n.Netty4Transport] exception caught on transport layer [[id: 0x8620473c, L:/127.0.0.1:22466 - R:/127.0.0.1:22412]], closing connection
java.io.IOException: Se ha forzado la interrupción de una conexión existente por el host remoto
    at sun.nio.ch.SocketDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(Unknown Source)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
    at sun.nio.ch.IOUtil.read(Unknown Source)
    at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
    at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:433)
    at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1100)
    at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:372)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
    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)
    at java.lang.Thread.run(Unknown Source)
2018.01.17 11:27:24 WARN  app[][o.e.t.n.Netty4Transport] exception caught on transport layer [[id: 0x8623fc7c, L:/127.0.0.1:22464 - R:/127.0.0.1:22412]], closing connection

我的属性文件:

--------------------------------------------------------------------------------------------------
DATABASE Mysql
sonar.jdbc.username=sonarqube
sonar.jdbc.password=sonarqube
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
--------------------------------------------------------------------------------------------------
WEB SERVER
sonar.web.host=localhost
TCP port for incoming HTTP connections. Default value is 9000.
sonar.web.port=9000
--------------------------------------------------------------------------------------------------
ELASTICSEARCH
sonar.search.port=0
--------------------------------------------------------------------------------------------------

2 个答案:

答案 0 :(得分:0)

请检查日志文件夹(C:\ sonarqube \ logs)中的Web日志文件。 Sonarqube试图使用已经被占用的端口,强行杀死该端口对我有用。

答案 1 :(得分:0)

在日志级别上,您可以看到这是一条警告消息。

真正的错误是由其他原因引起的。

检查sonarqube\logs文件夹以获取详细信息。