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.