81

我无法启动 GlassFish,因为它一直显示以下错误消息:

SEVERE: Shutting down v3 due to startup exception : No free port within range: 8080=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@ed7d1

如何在 Windows Vista 上找到哪些应用程序正在使用哪些端口?我尝试使用以下目标使用 nmap zenmap:

http://127.0.0.1:8080

但我得到的只是:

Starting Nmap 5.51 ( http://nmap.org ) at 2011-08-05 12:05 Central Daylight Time

NSE: Loaded 57 scripts for scanning.

Read data files from: C:\Program Files\Nmap
Nmap done: 0 IP addresses (0 hosts up) scanned in 4.55 seconds
           Raw packets sent: 0 (0B) | Rcvd: 0 (0B)
WARNING: No targets were specified, so 0 hosts scanned.
4

4 回答 4

118

网络统计呢?

http://support.microsoft.com/kb/907980

命令是netstat -anob

(确保以管理员身份运行命令)

我得到:

C:\Windows\system32>netstat -anob

活动连接

     Proto  Local Address          Foreign Address        State           PID
  TCP           0.0.0.0:80                0.0.0.0:0                LISTENING         4
 Can not obtain ownership information

  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       692
  RpcSs
 [svchost.exe]

  TCP    0.0.0.0:443            0.0.0.0:0              LISTENING       7540
 [Skype.exe]

  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
 Can not obtain ownership information
  TCP    0.0.0.0:623            0.0.0.0:0              LISTENING       564
 [LMS.exe]

  TCP    0.0.0.0:912            0.0.0.0:0              LISTENING       4480
 [vmware-authd.exe]

如果要检查特定端口,使用的命令是: netstat -aon | 从同一路径findstr 8080

于 2011-08-05T17:15:05.363 回答
10

要查看您的机器上可用的端口,请运行:

C:>  netstat -an |find /i "listening"
于 2011-08-05T17:13:35.853 回答
7

可能没有其他应用程序正在运行。套接字可能没有从前一个会话完全关闭,在这种情况下,您可能需要等待一段时间,然后该套接字上的 TIME_WAIT 到期。不幸的是,在该套接字过期之前,您将无法使用该端口。如果您可以在等待一段时间(几分钟)后启动服务器,则问题不是由于端口 8080 上运行的其他应用程序造成的。

于 2011-08-05T17:20:58.493 回答
3

在命令提示符下,执行:

netstat -nb
于 2011-08-05T17:15:02.137 回答