devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.28k stars 359 forks source link

Exception in thread "main" java.net.BindException: Address already in use #1582

Open a5a5a9 opened 3 years ago

a5a5a9 commented 3 years ago

What happened? hot reloading not working in the devspace-quickstart-java example

Exception in thread "main" java.net.BindException: Address already in use at java.base/sun.nio.ch.Net.bind0(Native Method) at java.base/sun.nio.ch.Net.bind(Net.java:552) at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:336) at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:294) at java.base/sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:88) at jdk.httpserver/sun.net.httpserver.ServerImpl.(ServerImpl.java:101) at jdk.httpserver/sun.net.httpserver.HttpServerImpl.(HttpServerImpl.java:50)

What did you expect to happen instead? After a change in the QuickStart.java the hotreload triggers but it fails to launch the app thru the java -jar command.

How can we reproduce the bug? (as minimally and precisely as possible) run the devspace-quickstart-java example , make a change in the Quickstart.java code and the launch will fail with:

Exception in thread "main" java.net.BindException: Address already in use

Local Environment:

Kubernetes Cluster:

/kind bug

FabianKramm commented 3 years ago

@a5a5a9 thanks for creating this issue! We'll take a look and will fix the problem