Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Any way to set reuseAddress for the stop port of a Jetty server?

Currently, when a jetty server has to be force killed (possibly due to a bad GC day leading to the JVM being completely locked, or the OOM killer script passed to Java stepping in and killing the process), usual service monitoring mechanisms will respond by respawning the process. When this happens, there's a good chance that the stop port would still be in TIME_WAIT state and fails to bind with an 'Address already in use' error.

Java ServerSockets offer a way to avoid this by using the `setReuseAddress` method which sets socket option SO_REUSEADDR, should this be set, or an option be provided for this? Or is there some other way to do this I am missing?

Back to the top