Startup Failing

I have been round and round on the installation of Sonarqube on a postgres db. I cannot seem to get the address correct. I’ve used the config guide but not getting it quite correct. The error is

 Launching a JVM...
jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
jvm 1    |
jvm 1    | 2020.10.08 09:29:51 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube\temp
jvm 1    | 2020.10.08 09:29:51 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1    | 2020.10.08 09:29:51 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\sonarqube\elasticsearch]: C:\Program Files\Java\jdk-11.0.8\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=C:\sonarqube\temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -Des.enforce.bootstrap.checks=true -Xmx512m -Xms512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\sonarqube\elasticsearch -Des.path.conf=C:\sonarqube\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
jvm 1    | 2020.10.08 09:29:51 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1    | Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
jvm 1    | 2020.10.08 09:29:52 INFO  app[][o.e.p.PluginsService] no modules loaded
jvm 1    | 2020.10.08 09:29:52 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1    | 2020.10.08 09:29:54 WARN  app[][o.e.t.TcpTransport] exception caught on transport layer [Netty4TcpChannel{localAddress=/127.0.0.1:59561, remoteAddress=/127.0.0.1:9001}], closing connection
jvm 1    | io.netty.handler.codec.DecoderException: java.io.StreamCorruptedException: invalid internal transport message format, got (48,54,54,50)
jvm 1    |      at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:472)
jvm 1    |      at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278)
jvm 1    |      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
jvm 1    |      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
jvm 1    |      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
jvm 1    |      at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
jvm 1    |      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
jvm 1    |      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
jvm 1    |      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
jvm 1    |      at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
jvm 1    |      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
jvm 1    |      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
jvm 1    |      at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
jvm 1    |      at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
jvm 1    |      at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:656)
jvm 1    |      at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:591)
jvm 1    |      at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:508)
jvm 1    |      at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470)
jvm 1    |      at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
jvm 1    |      at java.base/java.lang.Thread.run(Thread.java:834)
jvm 1    | Caused by: java.io.StreamCorruptedException: invalid internal transport message format, got (48,54,54,50)
jvm 1    |      at org.elasticsearch.transport.TcpTransport.readHeaderBuffer(TcpTransport.java:851)
jvm 1    |      at org.elasticsearch.transport.TcpTransport.readMessageLength(TcpTransport.java:837)
jvm 1    |      at org.elasticsearch.transport.netty4.Netty4SizeHeaderFrameDecoder.decode(Netty4SizeHeaderFrameDecoder.java:40)
jvm 1    |      at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502)
jvm 1    |      at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:441)
jvm 1    |      ... 19 common frames omitted

and the config file is
sonar.properties.txt (19.8 KB)

Hi, did you tried what is suggested here? (same error)

I did. And that helped but now its stopping here

In the interest of speed, since i am now somewhat pressed, does the installation of the demo work with no db ? I need to get this working and while I feel I am close, its not there

Hello Bill,

Could you please attach the logs from attach the logs from $INSTALLDIR/logs ?
In particular, wen.log should provide information here

Regards,

Eric

[web.log|attachment](upload://oIMxRLdsonar.log (154.5 KB) Nbd8HYeo5nLhspSBmrUI.log) (7.0 KB)

Hi Bill,

I could see you have attached $INSTALLDIR/logs/sonar.log
Could you also zip and attach the full logs folder content ?
If you can not, please share at least the $INSTALLDIR/logs/web.log file for our review

Thanks

Eric

All logs.zip (16.4 KB)
Sorry 0 I had attached both but I guess its one file at a time.
Here are all of them

Thanks for the logs.
The web.log contains
2020.10.11 10:27:20 ERROR web[o.s.s.a.EmbeddedTomcat] Fail to start web server

org.apache.catalina.LifecycleException: Failed to initialize connector [Connector[HTTP/1.1-9001]]

Which is typical of port conflict and port 9001 is already in use

When starting SonarQube, concurrent java process are launched
9001 is the default port for one of them (responsible for the internal ElasticSearch process)

You should fix your $INSTALLDIR/conf/sonar.properties and make sure the
sonar.web.port value either is commented out and defaults to its 9000 value
or set it to some other port not conflicting with 9001

I hope this helps

Eric

It was already changed to 9002 and just for fun I changed it to 9003 (same error), then 0 (same error). Is sonar-properties the only place that setting is ? It seems to point to 9001 no matter what I set.

Would it be possible to share your $INSTALLDIR/conf/sonar.properties (you may need to redact some sensitive information it contains)

Or only share port related content like
grep port $INSTALLDIR/conf/sonar.properties | grep -v ^#

Cheers

Eric

Also make sure (with tool like netstat on linux) that no other process is running on port 9001(remainder from a third party application or from a previous SonarQube java process that was not gracefully killed)
On Linux it looks like sudo netstat -anp | grep 9001

Eric

Your current configuration should allow starting the instance on port 9001.
Though not very conventional , there is nothing wrong with that
Therefore the best lead is on pending process on port 9001 that is conflicting
The netstat command shared previously should highlight it.

Eric

That didn’t work either.

Back to original. This is the logs and con without passwords. logs and conf no password.zip (30.9 KB)

There is a file (portdata.txt) that contains the output from netstat

The latest sonar.properties you have shared contains
sonar.web.port=9001 and sonar.search.port=9001
and this is expected to create port conflict at startup

Could you please try with
sonar.web.port=9000 and sonar.search.port=9002 ?

Also you confirm about the Sonarqube version ?

Cheers,

Eric

Wow. That was stupid of me. Looked for 900 and stopped.
Changed.

It was still failing on PostgreSQL but I just went back to embedded. for this Trial I didn’t need postgres as such.
Its working with the internal db so all good for now. Thank you

And thank you for the patience.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.