Jorge Guzman Bozo
Jorge Guzman Bozo

Reputation: 11

Elasticsearch error when running Sonarqube 6.7 on Windows

I'm using JDK 1.8.0_161 as the Java runtime. When I run the StartSonar.bat I get the following exception:

 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

My properties file:

--------------------------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------------------------

Upvotes: 1

Views: 4215

Answers (2)

cidermole
cidermole

Reputation: 6078

On the loglevel, you can see that this is a WARN message.

The real error is caused by something else.

Check the sonarqube\logs folder for details.

Upvotes: 0

SK1
SK1

Reputation: 7

Please check your web log file inside the logs folder(C:\sonarqube\logs). Sonarqube is trying to use a port which is already occupied, force kill the port worked for me.

Upvotes: 1

Related Questions