2015-07-28 63 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} 

這就是全部。