Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a script that will automatically stop a server and restart it on the same port/ip address. I've noticed that some mornings the server doesn't restart successfully because it gets Java BindExceptions. There is a 10 second delay between stopping the service and restarting it. (I found that having no delay will almost always guarantee a BindException, as the startup is very quick.)

Has anyone run into BindExceptions while running Windows Server 2008, even though they restart a service with a reasonable (10 secs) delay? As I mentioned, it only happens sometimes. I can increase the interval, but if there's a way to forefully refresh the locked ports before I attempt to bind the newly restarted server, that may be an easier route.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.