Manny Garcia wrote:
I'm attempting to start an instance of a glassfish server immediately after I've (gracefully) stopped it. When I try to restart it I get the following error:
There is a process already using the admin port 4849 -- it probably is another instance of a GlassFish server.
The problem is I do a netstat looking for the process that owns that port and I can't find anything! I have to find a pid to kill so I can restart the server. Does anyone have any ideas?
With TCP, sometime it takes a few minutes before the operating system frees up the port. To solve this, you have two options. You can put in a delay between the kill of the process to the restart of the process -- hopefully, it will be enough time for the OS to free the port. Another option is to open the port with the REUSEADDR option -- or configure glassflish to use that option.
Henry