[Solved] BindHttpException[Failed to bind to 127.0.0.1:19001]; java.net.BindException: Address already in use

While installing SonarQube I encounter this issue and I could not find a solution immediately. After doing a lot of research, I could solve the issue. Here in this article, I am sharing the solution with a proper explanation.

Problem

If we try to analyze the issue we can clearly see that “Address already in use“. If we analyze further we can able to understand that 127.0.0.1:9001 is already in use. Due to this Sonar could not bind the application on 9001 port. Maybe this is because of 9001 port already beating used or held by some other program or application.

Solution

To solve this issue, we supposed to change the port number from 9001 to any other port, in the example I have would like to change to 9002 instead 9001. This we have to change in Sonar Properties file. So that SonarQube can bind its application to 9002 port instead 9001.

First step is to navigate to sonar.properties file as shown in below image.

Second step is to find sonar.search.port=9001 in sonar.properties file and replace to sonar.search.port=9002 as shown in the below image. Save the file and try to run StartSonar.bat file.

Conclusion

While installing SonarQube in windows, this issue will be encounter if the default port already in use. So if the user follows proper installation steps, then installing SonarQube is very easy. Here are the complete steps to install SonarQube below

Default image
Sreenivasa Rangan TR

Software professional with 7+ years of experience in all phases of software development with robust problem-solving skills and proven experience in creating and designing software in a test-driven environment.

One comment

Leave a Reply

%d bloggers like this: