Thursday, February 20, 2014

Production tips#2 : Glassfish Server cannot start. Port is occupied

Ports management is another key point to be taken serious especially when you deploying many application scattered over different domains, this in addition to your utilities software running in your PC. To come back to our concern :
 Then after getting this warning window popping up repeatedly what to do ?
 You need to know the port creating problem.
 In the case you are using glassfish with netbeans, right clicking the server will show you some useful information regarding the port.
Else you may go to your domain.xml file    under    C:\glassfishv3\glassfish\domains\domain1\config  to see the         <network-listeners> (around line 190) ports :

After your port is known , go to the command line or DOS. (CMD) and check the process id.

cmd> netastat -aon


     
kill the process. Here for port 8080 the pid=1988

cmd> taskkill /f /pid 1988

Finally it is done. Run your server now and enjoy !!

No comments:

Post a Comment