[英]How do i close an opened port in Windows 7?
当我尝试启动我的基于java的服务器时,有一条消息说该端口已经在使用......并且我的所有Java Web服务器都已停止...所以,如果有人可以帮助我,我会很感激...
If there is really still a process that has the port open, you can easily check for that (and close the process) via TCPView . 如果确实有一个进程打开了端口,您可以通过TCPView轻松检查(并关闭进程)。 It might be that the port is just lingering (for example due to not being shutdown properly), in which case you'd have to wait for the socket to close and check that the code is clear with regard to that. 可能是端口只是挥之不去(例如由于未正确关闭),在这种情况下,您必须等待套接字关闭并检查代码是否清楚。
I was trying to establish socket communication between PC ( JAVA Server )<--> Android ( Client ) 我试图在PC ( JAVA Server )之间建立套接字通信< - > Android ( 客户端 )
on Debugging, popped the problem : Address already in use
在调试时,弹出了问题: Address already in use
instant/feasible resolution i found out was to: 我发现即时/可行的解决方案是:
- run cmd as adminstrator 以管理员身份运行cmd
- netstat -abn netstat -abn
- find the process listening to the port of intrest 找到听取intrest端口的进程
- terminate the process from task manager 从任务管理器终止进程
PS : Unlike from an external application mentioned in previous answers, steps in this answer allows you to find out the used ports with the resources already present. PS:与之前答案中提到的外部应用程序不同,此答案中的步骤允许您查找已使用资源的已使用端口。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.