Reputation: 517
Glassfish Server is running in background and I am not able to stop, start or restart the process. I know, restarting the system will do the job. Is there any other process to stop the process?
Here is the details:
When I try to stop, it says it is domain1 is not running:
C:\Server\glassfish4\glassfish\bin>asadmin stop-domain
CLI306: Warning - The server located at C:\Server\glassfish4\glassfish\domains\domain1 is not running.
Command stop-domain executed successfully.
However I am able to open admin console in web browser for http://localhost:4848/common/index.jsf
When I am trying to start or restart it throws error:
C:\Server\glassfish4\glassfish\bin>asadmin start-domain There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server. Command start-domain failed.
C:\Server\glassfish4\glassfish\bin>asadmin restart-domain Server is not running, will attempt to start it... There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server. Command restart-domain failed.
I tried to find PID with netstat -a -n -o
command for the port 4848. I got two entries but not localhost id:
TCP 0.0.0.0:4848 0.0.0.0:0 LISTENING 9116
TCP [::]:4848 [::]:0 LISTENING 9116
Upvotes: 5
Views: 7712
Reputation: 4453
Try this
taskkill /F /PID 9116
Also find the PIDs of processes which hold port 8080
and kill them. (If above solution don't work)
netstat -aon | find "LISTENING" | find ":8080"
taskkill /F /PID process_id_here
Upvotes: 6
Reputation: 2494
If are you using Mac OS you should open terminal and will write following:
jps
(jps - is command that help you to see PID of this process of GlassFish) in my case I have following information:
MBP-Dmytro:~ melnychukdv$ jps
4004 ASMain
4500 Jps
After that we just kill this PID (in my case it is 4004):
sudo kill -4004 {PID}
or
sudo kill 4004 {PID}
That's all.
Upvotes: 3