Skip to main content

Posts

Showing posts from January, 2010

Bind Exception, Netbeans 6.7.1 and Jetty server running Grails applications

While developing Grails applications on Netbeans IDE 6.7.1, I noticed an issue with the inbuilt servlet container, Jetty that is packaged with Netbeans IDE. Sometimes, Jetty server wouldn't stop even if we stop from the "Services" tab of the Netbeans IDE. It might show that it is already stopped under the "Services" section while it is still running in the background. Any attempts to Run the grails application after this event, will fail. You may get errors saying "Port already in Use" or "Address already in use: bind". The environment is windows/xp/vista. I'm assuming Jetty is using Port 8080 by default. The exception message in the console says " Server failed to start: java.net.BindException " Run the following command from the command prompt. netstat -o -n -a | findstr 8080 You may get output as below: TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 7972 In the above line, the PID(Process Identi