Glassfish is running in background
Asked Answered
L

2

5

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:

  1. 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.

  2. However I am able to open admin console in web browser for http://localhost:4848/common/index.jsf

  3. 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.

  4. 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
    
Locoweed answered 28/7, 2015 at 9:20 Comment(0)
F
6

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
Fehr answered 28/7, 2015 at 9:21 Comment(0)
E
3

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.

Eaten answered 31/1, 2016 at 22:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.