'Address already in use' when Starting up Bitbucket Data Center


Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

The following exception is reported when starting up Bitbucket Data Center:

SEVERE: StandardServer.await: create[8006]:

java.net.BindException: Address already in use

        at java.net.PlainSocketImpl.socketBind(Native Method)

Cause

Another application is already running on the same port that Bitbucket Data Center is trying to use, or there is conflict with Bitbucket's additional HTTP connectors. 

Resolution

Check if there are other applications running that may be using the TCP port 7990

  1. If this is your first time running Bitbucket Server or you have recently added applications or made changes to the system, investigate what's running on port 7990 (Default port for Bitbucket Server) .
  2. If Bitbucket Server was not shut down properly, you can restart the machine or kill the process:
On Windows
1. Hit Ctrl-alt-delete and look at open programs. Look for {{java.exe}}.
2. From a command window, run {{netstat -an}}. Check which ports are in use. You can identify which application is running this way, then close it from the Task Manager.
On Linux
Run {{ps -aux \| grep java}}. This will show the java processes running and their process ids. You can kill a process with the command {{kill -9 <pid>}}.

3. If there is another application running on that port and you wish to continue running it on port 7990, you will need to change the default listening port for Bitbucket Server. Follow the steps on Change the port Bitbucket listens on to change the port for Bitbucket Server.

Check the bitbucket.properties  file for additional connectors

If no other applications are running that use the TCP port 7990, it may be that Bitbucket itself tries to re-use the same port for an additional connector.

  • By default, without server.port  directive in the bitbucket.properties  file, Bitbucket will listen on port 7990.
  • If there is another, additional connector defined with server.additional-connector.1.port=7990, Bitbucket will try to open the same port for the new connector and fail.

To solve it, there are two possibilities:

  1. Explicitly set the value of the  server.port (default port) directive to a different port not to be 7990; or
  2. Change the value of the  server.additional-connector.1.port (an additional one) not to be 7990. 


Last modified on Feb 24, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.