如何在 Windows 中杀死 glassfish 服务器?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3158878/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 07:25:22  来源:igfitidea点击:

How to kill a glassfish server in Windows?

windowsglassfishglassfish-3

提问by kuester2000

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.

我尝试使用命令“asadmin start-domain”在我的 Windows XP 系统中启动 glassfishv3 服务器。由于超时,启动失败。当我尝试重新启动时,我收到一条错误消息,指出端口 4848 已被另一个进程使用。当我尝试使用“asadmin stop-domain”停止服务器时,我收到它没有运行的错误。

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

知道如何解决这个僵局吗?我找不到要杀死的名为 glassfish 或 asadmin 的 Windows 进程。

回答by John Weldon

The process will be java.exe

该过程将是 java.exe

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

您可以使用 sysinternals 工具之一,例如 tcpview.exe 来查看哪个程序实际在使用该端口。

回答by Jim

Adding to Alexis' answer,

添加到亚历克西斯的回答,

jps -v

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

将向您展示有关 Java 进程的更多信息。注意pid。您必须正确配置您的路径才能使其正常工作。

Then do

然后做

taskkill /pid <pid>

回答by Alexis MP

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

您还可以使用jps来列出您机器上的所有 Java 进程。GlassFish 服务器主类称为ASMain