java 运行 Glassfish 3.1.2.2 时出错:地址 localhost:4848 is already in use

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15186099/
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-10-31 18:45:34  来源:igfitidea点击:

Error running Glassfish 3.1.2.2: Address localhost:4848 is already in use

javajspintellij-ideaglassfishport

提问by user2121529

I have installed my glassfish on port 4848, then I have a test project in IntelliJ IDEA that contains .jspfiles which I want to run on glassfish.I've read a tutorial on how to run an application on glassfish via IntelliJ here, but when I do the job I get the following error:

我已经安装了GlassFish的端口4848,然后我有一个测试项目中包含的IntelliJ IDEA .jsp,我想上运行glassfish.I've阅读如何通过的IntelliJ运行在GlassFish应用程序的教程文件在这里,但是当我做这项工作我收到以下错误:

Error running Glassfish 3.1.2.2: Address localhost:4848 is already in use

How to fix this?

如何解决这个问题?

回答by user1897690

From the error you are getting it seems that a glassish instance is already running on that port and IntelliJ is trying to start up a new one. Did you start your glassfish instance via command line? Maybe you could try starting it up with IntelliJ and see if that works better ...

从您收到的错误来看,该端口上似乎已经运行了一个透明的实例,而 IntelliJ 正在尝试启动一个新实例。您是否通过命令行启动了 glassfish 实例?也许你可以尝试用 IntelliJ 启动它,看看它是否效果更好......

回答by Laura Riera

On S.O. Windows: in console you input netstat -anoand you see the port and service's ID. Then you input taskkill /pid numberIDServiceor taskkill /f /pid numberIDService

在 SO Windows 上:在控制台中输入netstat -ano并看到端口和服务的 ID。然后你输入taskkill /pid numberIDServicetaskkill /f /pid numberIDService

回答by quento

it could be not only glassfish, u could check which application is using port 4848. To do that u should enter "netstat -ao" in your cmd to find that proccess and delete it. Then try again to run glassfish

它可能不仅是 glassfish,您还可以检查哪个应用程序正在使用端口 4848。为此,您应该在 cmd 中输入“netstat -ao”以找到该进程并将其删除。然后再次尝试运行 glassfish