java.net.BindException: Address already in use: bind

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

It might be that there's another process connecting to the same port you're trying to use, try to kill it or change the connection port.

,

Its saying that a Java application is trying to connect on port but that port is already being used by some other process and JVM Bind to that particular port is failed.

Solutions on the web

via Oracle Community by 843833, 1 year ago
Address already in use: bind
via Google Groups by sagar naik, 2 years ago
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:108)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
at com.sun.enterprise.web.connector.grizzly.SelectorThread.initEndpoint(SelectorThread.java:494)
at org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnector.java:1415)
at com.sun.enterprise.web.WebContainer.start(WebContainer.java:673)
at com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:430)
at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:300)
at com.sun.enterprise.server.PEMain.run(PEMain.java:265)
at com.sun.enterprise.server.PEMain.main(PEMain.java:217)

Users with the same issue

11 times, 6 days ago
Samebug visitor profile picture
Unknown user
Once, 1 week ago
Once, 2 weeks ago
3 times, 1 month ago
Once, 1 month ago
151 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.