'Address already in use' when Starting up Stash

Troubleshooting Installation

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The following exception is reported when starting up Stash:

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 Stash is trying to use.

Resolution

  1. If this is your first time running Stash or you have recently added applications or made changes to the system, investigate what's running on port 7990 (Default port for Stash) .
  2. If Stash 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 Stash. For this edit the server.xml file and change the following two lines:

<Server port="8006" shutdown="SHUTDOWN">
 <Connector port="7990" protocol="HTTP/1.1"

to something like:

<Server port="8007" shutdown="SHUTDOWN">
 <Connector port="7991" protocol="HTTP/1.1"
This will change the port to 7991 for Stash.

Last modified on Mar 30, 2016

Was this helpful?

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