[SOLVED] Ubuntu - Unable to start SonarQube

Dear,

I have installed SonarQube 8.9 LTS on a Ubuntu 20.04. And I have a problem to start the instance after the installation.

On this ubuntu, I don’t have a lot of package installed. Just NextCloud, GitLab and Jenkins.

I used the document from Sonar Qube to install it :
-install postgreSQL as database

  • add a specific user to sonar sonarqube
  • edit “sonar.properties” file as mentionned
  • running sonarqube as service with systemd

I have an error into the sonar log when I start the service with the service file :

	... 10 common frames omitted
Caused by: java.net.ConnectException: Connexion refusée
	at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:777)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:174)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:148)
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:351)
	at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221)
	at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
	at java.base/java.lang.Thread.run(Thread.java:829)
2022.05.20 12:44:45 ERROR app[][o.s.a.p.EsManagedProcess] Failed to check status
org.elasticsearch.ElasticsearchException: java.util.concurrent.ExecutionException: java.net.ConnectException: Connexion refusée
	at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2695)
	at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:2171)
	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:2137)
	at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:2105)
	at org.elasticsearch.client.ClusterClient.health(ClusterClient.java:151)
	at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:64)
	at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:98)
	at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:83)
	at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:68)
	at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:220)
	at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:285)

Hi @Yannick and welcome to the community :wave:

Can you check the logs directory in your sonarqube installation for more information? Sonarqube does not always log everything to stdout (and to the journal with systemd) in my experience.

Hi,

Thanks you for your help.

I solved my problem just before seeing your message.

I used the script sonar.sh to start the instance instead of the service file. And the problem was clearly indicated into the “es.log” log file (elasticsearch). I forgot to set the maximum number of memory maps for elasticsearch (vm.max_map_count=262144) into “sysctl.conf” file.

And now, I have access to sonarqube with “http://localhost:9000” address.

Ah that’s good to hear. Feel free to mark your solution :slightly_smiling_face:

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