Not able to start SonarQube server after running StartSonar.bat file

6.5k Views Asked by At

I tried running StartSonar.bat file, but it would stop or close abruptly.

Below is the snapshot of sonarqube server error:

enter image description here

3

There are 3 best solutions below

0
On

Sonar is trying to connect on port 9001 which is already in use. Take a look at what's running on port 9001 by navigating to Resource Monitor -->Network -->Listening Ports

In sonar.properties file, Change sonar port 9001 to any other available port. For example- 9003. Save the file and run the script StartSonar.bat to start sonar

0
On

The error suggest that you port 9001 is already use. Probable reasons:

  1. Another program using it. Check Task Manager -> Performance -> Open Resource Monitor ->Network ->Listening Ports
  2. Another instance of SonarCube is running and using it.
  3. Previous instance of SomarCube was not ended properly.

Solutions:

  1. If 1, then change the port of SonarCube server to something else. Read this.
  2. If 2, then you can wait till it ends.
  3. If 3, restart your system.
0
On
  1. We need to have the java 11 version installed for static tool analysis on sonarqube. For download and set up follow this link: https://java.tutorials24x7.com/blog/how-to-install-java-11-on-windows

  2. Even after this if you face an issue opening the StartSonar.bat file then, check task manager and kill all process/tasks related to java jdk. Because If you had already started Sonar and killed the process on command prompt, your JVM would still be running in the background.

  3. If the issue is not solved then go to conf folder in sonarqube and open sonar properties file and search for the 9000 port number and change sonar.web.port value to some other port number Eg.9050 and uncomment it. Similarly, search for port number 9001 and follow the same process.