[英]netstat lots of 127.0.0.1:8080 TIME_WAIT
我发现这个帖子和我一样,但没有找到解决方案。 所以,当我做netstat -n
我得到了以下内容:
TCP 127.0.0.1:52144 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52145 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52146 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52147 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52148 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52149 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52150 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52151 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52152 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52153 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52154 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52155 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52156 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52157 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52158 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52159 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52160 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52161 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52162 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52163 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52164 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52165 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52166 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52167 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52168 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52169 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52170 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52171 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52172 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52173 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52174 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:52175 127.0.0.1:8080 TIME_WAIT
...
还有很多。 当我ping localhost:8080
,我得到: Ping request could not find host localhost:8080. Please check the name and try again.
Ping request could not find host localhost:8080. Please check the name and try again.
当我ping localhost
,我得到:
Pinging TA52273.com [::1] with 32 bytes of data:
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Ping statistics for ::1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
当我在FF上尝试localhost:8080时,我得到空白页面,只是空白页面。 当我在chrome上尝试localhost:8080时,我得到了: Oops! This link appears to be broken. Did you mean: localhost8080.net
Oops! This link appears to be broken. Did you mean: localhost8080.net
localhost:8080没有响应。
任何想法,可能是错的。 我可以毫无问题地启动tomcat。 但是,当我部署我的应用程序时,正在发生的事情。
至于TIME_WAIT,我不担心。 有关详细信息,请查看此文章 。
至于ping,这是不正确的:
ping localhost:8080
这是正确的:
ping localhost
即,在执行ping时不指定端口。
使用例如nc
, wget
或telnet
来验证某个端口正在监听(到HTTP)。
现在针对您的webapp问题,您的WAR是什么以及您在哪里部署它? 如果它是例如doh.war
并且您已将其部署在$CATALINA_BASE/webapps
,那么您应该将浏览器指向
http://127.0.0.1:8080/doh
假设Tomcat正在localhost上监听8080。
在我的情况下,有很多进程转到TCP端口111.'chkconfig | grep nscd'透露NIS缓存没有运行。 我启用了nscd,问题就消失了。
chkconfig nscd on
只需ping到该端口并再次检查netstat,该行不再显示为time_wait
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.