端口没有被占用却提示Several ports (8005, 8080, 8009) required by Tomcat

来源:互联网 发布:visio软件破解版 编辑:程序博客网 时间:2024/06/14 06:33


问题描述,突然某一天,用eclipse启动tomcat的时候,弹出窗口提示:

Several ports (8005, 8080, 8009) required by Tomcat v6.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).”

这个太easy了,打开任务管理器,找javaw.exe的进程,kill掉,搞定,或者你随便度娘一下,很多的解决方案。


我这里说的这个,不是这个原因导致的。我用的是win7,解决过程就不阐述了,各种折腾,就差重装系统了。

1、我确定,端口没有被占用,即使我改tomcat的端口,一样提示这个错误。

2、我怀疑报错信息不对,就直接去tomcat的bin目录下,运行的startup.bat发现提示问题竟然是:

“unrecognized windows sockets error :10106”

3、搜索unrecognized windows sockets error :10106”没有找到合适的解决方案

4、之前用的好好的,现在启动不了,是我的环境改变了,开始思考我这几天的电脑变更过什么。禁用各种服务,重装jdk这些都做过,推断出,问题的原因不是我的电脑多了什么,而是少了什么,特别是少了什么关键服务导致tomcat启动失败。

5、改为搜索“sockets error :10106”,开始找资料参考,不只是java相关,主要有这个提示代码的都去看看,终于找到一篇“can not bind socket的文章(传送门:http://blog.csdn.net/whitehack/article/details/50936039?locationNum=2&fps=1),结合之前有人提到过,可能和网卡有关系,看到了“netsh命令感觉这个就是我要找的答案,随操作了一遍,问题解决。


解决办法:

1、运行cmd进入命令行界面;

2、运行命令: netsh winsock reset

3、重启电脑

在运行tomcat,可以正常启动。



阅读全文
0 0
原创粉丝点击