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 GitHub by Smull99
, 1 year ago
java.net.BindException: Address already in use
via GitHub by boyberm
, 1 year ago
java.net.BindException: Address already in use
via GitHub by StephanBijzitter
, 1 year ago
java.net.BindException: Address already in use
via GitHub by qwertychacha2002
, 1 year ago
java.net.BindException: Address already in use
via GitHub by blindxscript
, 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 io.undertow.Undertow.start(Undertow.java:142)
at org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainer.start(UndertowEmbeddedServletContainer.java:121)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:293)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:760)
at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:360)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:306)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)
at ink.abb.pogo.scraper.MainKt.main(Main.kt:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:104)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:61)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
9 times, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 4 days ago
Once, 1 week ago
163 more bugmates

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