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 GitHub by Yongyao
, 1 year ago
Address already in use: bind
via ignite-user by Ravi, 1 year ago
Address already in use: bind
via GitHub by lewismc
, 1 year ago
Address already in use: bind
via ignite-user by Vladimir Ozerov, 1 year ago
Address already in use: bind
via askubuntu.com by Unknown author, 1 year ago
via Apache's JIRA Issue Tracker by Andrew Ash, 1 year ago
Address already in use
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)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 4 days ago
Once, 1 week 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.