java.lang.RuntimeException: 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

,

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.

,
via Stack Overflow by Coffee

Check which program is running on the given port

Windows : netstat -a -b -n (Use Resource Monitor if you are admin) Linux : lsof -i:<port>

Kill the process

Windows taskkill -pid <process-id> /f Linux kill -9 <process-id>

Solutions on the web

via Stack Overflow by jayasree s
, 9 months ago
java.net.BindException: Address already in use: bind
via GitHub by rouseguy
, 1 year ago
java.net.BindException: Address already in use
java.lang.RuntimeException: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at org.seleniumhq.jetty9.server.ServerConnector.open(ServerConnector.java:321)
at org.seleniumhq.jetty9.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.seleniumhq.jetty9.server.ServerConnector.doStart(ServerConnector.java:236)
at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.seleniumhq.jetty9.server.Server.doStart(Server.java:366)
at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.openqa.selenium.remote.server.SeleniumServer.boot(SeleniumServer.java:147)
at org.openqa.grid.selenium.GridLauncherV3$1.launch(GridLauncherV3.java:229)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 week ago
Once, 2 weeks ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
163 more bugmates

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