Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to kill a glassfish server in Windows?

I tried to start a glassfishv3 server in my windows XP system with the command "asadmin start-domain". The start failed due to a timeout. When I try to start again I get an error saying that the port 4848 is allready in use by another process. When I try to stop the server with "asadmin stop-domain" I get the error that it is not running.

Any idea how to solve this deadlock? I cannot find a Windows process with the name glassfish or asadmin to kill.

like image 531
kuester2000 Avatar asked Jul 01 '10 14:07

kuester2000


3 Answers

The process will be java.exe

You can use one of the sysinternals tools, like tcpview.exe for example to see which program is actually using that port.

like image 197
John Weldon Avatar answered Nov 09 '22 20:11

John Weldon


Adding to Alexis' answer,

jps -v

will show you more about the java processes. Note the pid. You must have configured your path correctly for this to work.

Then do

taskkill /pid <pid>
like image 37
Jim Avatar answered Nov 09 '22 21:11

Jim


You can also use jps to list all the Java processes on you machine. The GlassFish server main class is called ASMain

like image 4
Alexis MP Avatar answered Nov 09 '22 22:11

Alexis MP