Error starting SonarQube

Hi , I was trying to launch SonarQube and it stop throwing this error as shown below .
Can somebody please help me out ?

wrapper  | --> Wrapper Started as Console
wrapper  | 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.04.02 15:13:00 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Sonar\sonarqube-7.9.2\sonarqube-7.9.2\temp
jvm 1    | 2020.04.02 15:13:00 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1    | 2020.04.02 15:13:01 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\Sonar\sonarqube-7.9.2\sonarqube-7.9.2\elasticsearch]: C:\Users\M1049142\Desktop\jdk-11.0.5_windows-x64_bin\jdk-11.0.5\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:\Sonar\sonarqube-7.9.2\sonarqube-7.9.2\temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\Sonar\sonarqube-7.9.2\sonarqube-7.9.2\elasticsearch -Des.path.conf=C:\Sonar\sonarqube-7.9.2\sonarqube-7.9.2\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
jvm 1    | 2020.04.02 15:13:01 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.04.02 15:13:02 INFO  app[][o.e.p.PluginsService] no modules loaded
jvm 1    | 2020.04.02 15:13:02 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1    | 2020-04-02 15:13:05,602 main ERROR Unable to move file C:\Sonar\sonarqube-7.9.2\sonarqube-7.9.2\logs\es.log to C:\Sonar\sonarqube-7.9.2\sonarqube-7.9.2\logs\es.2020-04-01.log: java.nio.file.FileSystemException C:\Sonar\sonarqube-7.9.2\sonarqube-7.9.2\logs\es.log -> C:\Sonar\sonarqube-7.9.2\sonarqube-7.9.2\logs\es.2020-04-01.log: The process cannot access the file because it is being used by another process.
jvm 1    |
jvm 1    | 2020-04-02 15:13:05,620 main ERROR Unable to delete file C:\Sonar\sonarqube-7.9.2\sonarqube-7.9.2\logs\es.log: java.nio.file.FileSystemException C:\Sonar\sonarqube-7.9.2\sonarqube-7.9.2\logs\es.log: The process cannot access the file because it is being used by another process.
jvm 1    |
jvm 1    | 2020.04.02 15:13:05 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
jvm 1    | 2020.04.02 15:13:05 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1    | 2020.04.02 15:13:05 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1    | 2020.04.02 15:13:06 INFO  app[][o.e.c.t.TransportClientNodesService] failed to get node info for {#transport#-1}{bi2xqIFhQEi8JwEo4yTm8w}{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:201)
jvm 1    |      at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:258)
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
wrapper  | <-- Wrapper Stopped

Hi,

Welcome to the community!

I’ve moved your post to a new topic because it wasn’t directly related to the one you added to (similar symptom, different error). I’ve also code-formatted your logs by adding ``` on the line before an on the line after to make them easier to read.

Once that was done, it was a lot easier to spot your problem:

I’ll excerpt the interesting parts:

ERROR Unable to move file C:\Sonar\sonarqube-7.9.2\sonarqube-7.9.2\logs\es.log to C:\Sonar\sonarqube-7.9.2\sonarqube-7.9.2\logs\es.2020-04-01.log ... The process cannot access the file because it is being used by another process.

I see that you’re on Windows. I’m guessing you have a virus scanner or some other “helpful” process running on the machine that has blocked SonarQube’s control of its own logs. You need to get that process under control.

 
HTH,
Ann

1 Like

A post was split to a new topic: SonarQube not staring - ES Error

  1. Create your Windows Service
  2. Set the Status Type to Automatic in the Properties
  3. Restart you Server
    And now its running.