Failed background tasks after upgrading to SonarQube 8.4 developer edition

Hi,

After upgrading from SQ 7.9.3 Community Edition to the SQ 8.4.0 Developer Edition (8.4.0.35506
) I noticed the following background task errors:

SonarQube completed the reload of project data. Some tasks failed causing some projects to remain unavailable.

List of failed tasks:

Error message:

java.lang.IllegalStateException: Fail to execute ES refresh request on indices 'issues'
	at org.sonar.server.es.request.ProxyRefreshRequestBuilder.get(ProxyRefreshRequestBuilder.java:44)
	at org.sonar.server.es.request.ProxyRefreshRequestBuilder.get(ProxyRefreshRequestBuilder.java:32)
	at org.sonar.server.es.BulkIndexer.stop(BulkIndexer.java:120)
	at org.sonar.server.issue.index.IssueIndexer.doIndex(IssueIndexer.java:261)
	at org.sonar.server.issue.index.IssueIndexer.indexOnAnalysis(IssueIndexer.java:115)
	at org.sonar.ce.task.projectanalysis.taskprocessor.IndexIssuesStep.lambda$execute$1(IndexIssuesStep.java:52)
	at java.base/java.util.Optional.ifPresent(Unknown Source)
	at org.sonar.ce.task.projectanalysis.taskprocessor.IndexIssuesStep.execute(IndexIssuesStep.java:48)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:81)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:72)
	at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:59)
	at org.sonar.ce.task.projectanalysis.taskprocessor.IssueSyncTaskProcessor.process(IssueSyncTaskProcessor.java:59)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:235)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:217)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:162)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:137)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:89)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: NoNodeAvailableException[None of the configured nodes were available: [{sonarqube}{2ImMpJJCSlGQkwkyyOMGFw}{s09UdvjnQFezThXfGuawRQ}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}]]; nested: NodeNotConnectedException[[sonarqube][127.0.0.1:9001] Node not connected];
	at org.elasticsearch.client.transport.TransportClientNodesService$RetryListener.onFailure(TransportClientNodesService.java:294)
	at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:59)
	at org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:533)
	at org.elasticsearch.action.TransportActionNodeProxy.execute(TransportActionNodeProxy.java:48)
	at org.elasticsearch.client.transport.TransportProxyClient.lambda$execute$0(TransportProxyClient.java:60)
	at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:253)
	at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:60)
	at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:388)
	at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:403)
	at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:391)
	at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1262)
	at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:46)
	at org.sonar.server.es.request.ProxyRefreshRequestBuilder.get(ProxyRefreshRequestBuilder.java:42)
	... 26 more
Caused by: NodeNotConnectedException[[sonarqube][127.0.0.1:9001] Node not connected]
	at org.elasticsearch.transport.ConnectionManager.getConnection(ConnectionManager.java:151)
	at org.elasticsearch.transport.TransportService.getConnection(TransportService.java:557)
	at org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:529)
	... 36 more

How can I fix the issue with failed tasks? Everything else seems to work fine.
I tried to search for an option to restart these tasks but did not find anything.

Viktors

Hi, welcome to the community. Is this troubleshooting helpful ?

Hi Pierre,

Thanks, it was helpful. I deleted /data/es6 directory, restarted SQ instance, and error was gone.
However, it was not clear to me what is the correct way to stop SQ instance, therefore I skipped this step.

Glad you succeeded. Instruction to operate SonarQube are here, if that can help.

1 Like

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