Sonarqube 8.2 and Postgress 12.2 not working

Hello,
i’ve installed postgres 12.2 and Sonarqube 8.2 and Elasticsearch 7.6.2 at firstime by myself.
I’ve started postgres and i’ve created sonar-db and sonar-user within postgres.
I cann access to my postgres instance with pgAdmin
At the sonarqube.properties i’ve set this:

sonar.jdbc.username=sonaruser
sonar.jdbc.password=sonaruser
sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube?currentSchema=sonarqube

Then i’ve installed InstallNTService.bat and StartNTService.bat
and started sonarqube again as administrator.
So got this error

jvm 1    | 2020.04.16 00:09:59 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube-8.2.0.32929\temp
jvm 1    | 2020.04.16 00:09:59 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1    | 2020.04.16 00:09:59 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\sonarqube-8.2.0.32929\elasticsearch]: C:\Program Files\Java\jdk-11.0.2\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-8.2.0.32929\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-8.2.0.32929\elasticsearch -Des.path.conf=C:\sonarqube-8.2.0.32929\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
jvm 1    | 2020.04.16 00:09:59 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1    | OpenJDK 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.04.16 00:09:59 INFO  app[][o.e.p.PluginsService] no modules loaded
jvm 1    | 2020.04.16 00:09:59 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1    | 2020.04.16 00:10:02 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
jvm 1    | 2020.04.16 00:10:02 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1    | 2020.04.16 00:10:02 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1    | 2020.04.16 00:10:02 INFO  app[][o.e.c.t.TransportClientNodesService] failed to get node info for {#transport#-1}{FlaE1HFWSb-e9qDYImIxfg}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
jvm 1    | java.lang.IllegalStateException: Future got interrupted
jvm 1    |      at org.elasticsearch.common.util.concurrent.FutureUtils.get(FutureUtils.java:60)
jvm 1    |      at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:34)
jvm 1    |      at org.elasticsearch.transport.ConnectionManager.internalOpenConnection(ConnectionManager.java:209)
jvm 1    |      at org.elasticsearch.transport.ConnectionManager.openConnection(ConnectionManager.java:80)
jvm 1    |      at org.elasticsearch.transport.TransportService.openConnection(TransportService.java:367)
jvm 1    |      at org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler.doSample(TransportClientNodesService.java:411)
jvm 1    |      at org.elasticsearch.client.transport.TransportClientNodesService$NodeSampler.sample(TransportClientNodesService.java:362)
jvm 1    |      at org.elasticsearch.client.transport.TransportClientNodesService.addTransportAddresses(TransportClientNodesService.java:201)
jvm 1    |      at org.elasticsearch.client.transport.TransportClient.addTransportAddress(TransportClient.java:342)
jvm 1    |      at org.sonar.application.es.EsConnectorImpl$MinimalTransportClient.<init>(EsConnectorImpl.java:108)
jvm 1    |      at org.sonar.application.es.EsConnectorImpl.buildTransportClient(EsConnectorImpl.java:89)
jvm 1    |      at org.sonar.application.es.EsConnectorImpl.getTransportClient(EsConnectorImpl.java:74)
jvm 1    |      at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:61)
jvm 1    |      at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:88)
jvm 1    |      at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:73)
jvm 1    |      at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:58)
jvm 1    |      at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:220)
jvm 1    |      at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:285)
jvm 1    | Caused by: java.lang.InterruptedException: null
jvm 1    |      at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1343)
jvm 1    |      at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:251)
jvm 1    |      at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:94)
jvm 1    |      at org.elasticsearch.common.util.concurrent.FutureUtils.get(FutureUtils.java:57)
jvm 1    |      ... 17 common frames omitted

What can i check? what can i do?

Hi,

Welcome to the community!

Start by checking your server logs to see if you see other, more specific (helpful) errors.

 
HTH,
Ann

Do i need explicity elasticsearch for using sonarcube with postgres?
I get two different error. One is when i start elasticsearch and other one, when i start postgres and sonarcube.

Hi,

SonarQube starts up and manages an Elasticsearch thread. All SonarQube’s threads depend on and health-check each other. So the thing to so is figure out which one fell down first and brought the rest with it. That’s usually intuit-able from the errors in the logs.

Particularly at startup, the primary suspects are going to be

  1. connecting to the DB - errors found in web.log
  2. ES having enough/proper resources - errors found in es.log

What errors are you seeing in which logs?

 
Ann

Thank you for the right hint. I’am new on sonarcube administration, so i’ve looked for error in sonar.log and not at the web.log.
After that i’ve fixed postgres connectivity-issue

1 Like