Jira server fails to start with BindException error
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs 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
Summary
Users are unable to start or shut down a Jira application.
The following appears in the atlassian-jira.log
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Dec 20, 2011 12:25:27 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[5060]:
java.net.BindException: Cannot assign requested address
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:353)
at java.net.ServerSocket.bind(ServerSocket.java:336)
at java.net.ServerSocket.<init>(ServerSocket.java:202)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:406)
at org.apache.catalina.startup.Catalina.await(Catalina.java:676)
at org.apache.catalina.startup.Catalina.start(Catalina.java:628)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Exhibiting the same behavior, you may also see this error in the catalina.out
:
1
2
3
4
5
6
7
8
9
Sep 18, 2013 11:59:57 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[localhost:80]:
java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
Solution
Fix "Address already in use: JVM_Bind" error
Identify the port number in the error message and navigate to the $JIRAINSTALL/conf/server.xml and verify that the SHUTDOWN port and CONNECTOR port are different as seen below:
1 2 3
<Server port="8005" shutdown="SHUTDOWN"> ... <Connector port="8080" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false" maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443" acceptCount="100" disableUploadTimeout="true"/>
If they are different, then verify if any other services are running on the port.
Check the
server.xml
to ensure there are not multiple connector elements with the same port number.
For Windows
Open a command prompt and run the following to identify what is running on the port (8080 in the below example, could also be another port such as port 80)
1
netstat -nao | findstr ":8080"
⚠️ Some known Windows processes which can conflict with Tomcat functionality include local installations of MS Internet Information Services (IIS) and also MS SQL Reporting Services (SSRS).
Take note of the PID number of the culprit process and run the below command to identify it's service (replacing <PID>)
1
tasklist | findstr "<PID>"
Stop that process (in the Windows Task Manager and/or Windows Services), and restart Jira.
For Linux
In a terminal, run the below command to identify the the processes running on the port (8080 in the below example)
1
netstat -anlp | grep 8080
Stop the culprit PID, and restart Jira.
Fix "Cannot assign requested address" error
For Windows:
Navigate to
C:\Windows\System32\drivers\etc
, and edit thehosts
file.Make sure that this line is uncommented (else, add the line to the bottom of the file):
1
127.0.0.1 localhost
For Linux:
Edit
/etc/hosts.
Make sure that this line is uncommented (else, add the line to the top of the file):
1
127.0.0.1 localhost
JVM_Bind and Cannot assign requested address error causes
If the instance is throwing Address already in use: JVM_Bind
:
When a Jira application starts up, it listens on a port specified in the Tomcat
server.xml.
External traffic communicates through that port so it can talk to the Jira application.
Only one process can listen to a port at a time. If you attempt to listen with another application, the Operating System will not let you - in this case, we can see that with the exception above.
If another application (such as IIS or Apache or MS SQL Reporting Services) is running on that Tomcat port, the Jira application will not be able to start.
The
server.xml
may have multipleConnector
elements set up with the same port number.ℹ️ To check on how many instances of the application are currently running, run this command:
For Linux
ps aux | grep catalina
If the instance is throwing the Cannot assign requested address
error:
This is due to to the Operating System being unable to resolve the
localhost
, which is required to start and shutdown Tomcat. This is most commonly caused by a misconfiguredhosts
file.
Was this helpful?