2015-07-28 65 views
3

Glassfish服务器正在后台运行,我无法停止,启动或重新启动进程。我知道,重新启动系统将完成这项工作。有没有其他的流程来阻止这个过程?Glassfish正在后台运行

以下是详细信息:

  1. 当我尝试停下来,它说,这是domain1不运行:

    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. 但是我能够在网页浏览器中打开管理控制台为http://localhost:4848/common/index.jsf

  3. 当我试图启动或重新启动它抛出错误:

    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. 我试图找到PID与netstat -a -n -o命令端口4848。我有两个条目,但不是本地主机ID:

    TCP 0.0.0.0:4848   0.0.0.0:0    LISTENING  9116 
    TCP [::]:4848    [::]:0     LISTENING  9116 
    

回答

4

试试这个

taskkill /F /PID 9116 

还可以找到持有port 8080并杀死它们的进程的PID。您正在使用的Mac OS,你应该打开终端(如果上述解决方案不起作用)

netstat -aon | find "LISTENING" | find ":8080" 
taskkill /F /PID port_no_here 
+0

谢谢Shrini,它工作。 –

+0

高兴地帮助:) –

+0

这是一个很好的做法,“接受”有用的答案,因为它可以帮助未来访问此问题的每个人。 –

1

如果和会写如下:

jps 

(JPS - 是命令,帮助你看到的PID GlassFish的) 的这个过程在我的情况我有以下信息:

MBP-Dmytro:~ melnychukdv$ jps 
4004 ASMain 
4500 Jps 

之后,我们杀了这个PID(在我的情况下,4004):

sudo kill -4004 {PID} 

sudo kill 4004 {PID} 

这就是全部。