Skip to content

Instantly share code, notes, and snippets.

@appikonda
Last active November 27, 2019 19:18
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save appikonda/da5109ecbeb52db4d289caf95a265bcc to your computer and use it in GitHub Desktop.
Save appikonda/da5109ecbeb52db4d289caf95a265bcc to your computer and use it in GitHub Desktop.
Address already in use: JVM_Bind <null>:8080

###Exception:

Caused by: java.net.BindException: Address already in use: JVM_Bind <null>:8080
        at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:407)
        at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:623)
        at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
        at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119)
        at org.apache.catalina.connector.Connector.initInternal(Connector.java:981)
        ... 31 more

###Solution:

  1. Run Command Prompt as Adminstrator
  2. netstat -a -o -n
C:\WINDOWS\system32>netstat -a -o -n

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       900
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:1158           0.0.0.0:0              LISTENING       4920
  TCP    0.0.0.0:3389           0.0.0.0:0              LISTENING       8984
  TCP    0.0.0.0:3938           0.0.0.0:0              LISTENING       4180
  TCP    0.0.0.0:5520           0.0.0.0:0              LISTENING       4920
  TCP    0.0.0.0:5985           0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       10600
  TCP    0.0.0.0:47001          0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:49664          0.0.0.0:0              LISTENING       644

Find the PID for Local Address 0.0.0.0:8080 (In this example: 10600)

3.taskkill /F /PID 10600

C:\WINDOWS\system32>taskkill /F /PID 10600
SUCCESS: The process with PID 10600 has been terminated.

Done!

Restart the server.

@hiteshtomer1992
Copy link

C:\Windows\System32>taskkill /F /PID 1664
ERROR: The process with PID 1664 could not be terminated.
Reason: Access is denied.

i am getting below error. please help.thanks

@appikonda
Copy link
Author

appikonda commented Feb 13, 2019

C:\Windows\System32>taskkill /F /PID 1664
ERROR: The process with PID 1664 could not be terminated.
Reason: Access is denied.

i am getting below error. please help.thanks

Log in with admin access. Open CMD with Run as Administrator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment