我是 Java EE 7 的新手。
我有 Netbeans 7.4、GlassFish 4.0 和 Java EE 7。在 64 位 Windows 8.1 Pro 计算机中。我想要启动 GlassFish 4.0 Server,因此单击 Netbeans 中的“服务”选项卡,然后在“服务器”选项中右键单击 GlassFish Server 4.0,然后单击“启动”。
当我这样做时,我收到以下消息:“无法启动 GlassFish Server 4.0:服务器未运行时 HTTP 或 HTTPS 侦听器端口被占用”。我也有IIS服务器,但我把它停止了。停止 IIS 后,我尝试再次启动 GlassFish,但它向我显示了相同的消息。
Netbeans 中还有一个名为输出 - Java DB 数据库进程它向我展示了以下内容:
Tue May 06 22:03:11 GMT-05:00 2014 : Security manager installed using the Basic server security policy.
Tue May 06 22:03:11 GMT-05:00 2014 Thread[main,5,main] java.io.FileNotFoundException: D:\Users\Juan Jose\.netbeans-derby\derby.log (Access is denied)
Tue May 06 22:03:12 GMT-05:00 2014 : Could not listen on port 1527 on host localhost:
java.net.BindException: Address already in use: JVM_Bind
Tue May 06 22:03:12 GMT-05:00 2014 : Could not listen on port 1527 on host localhost:
java.net.BindException: Address already in use: JVM_Bind
我在 Windows 中运行 netstat -a 来查看 1527 端口发生了什么情况,并且该端口处于侦听模式。
那么如何才能知道是什么应用程序或进程占用了1527端口呢?
感谢您的帮助 !!
To find the process1 that keeps the busy port, try the following command:
netstat -ano | find "1527"
这将显示一行带有端口和进程标识符的行。例如。:
TCP 127.0.0.1:1527 0.0.0.0:0 LISTENING 2268
一旦您获得了进程 ID(例如2268
),运行以下命令释放端口(这将杀死进程):
taskkill /F /PID 2268
现在,尝试启动 Glassfish。
在 Linux 上:
lsof -Pnl +M -i6 | grep 1527
生产:
java 31139 1001 32u IPv6 114916062 0t0 TCP 127.0.0.1:1527 (LISTEN)
被杀死:
kill -9 31139
1 If you want to know the associated program, see How do I find out what service is using a certain port?
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)