一、异常错误
- Maven启动
tomcat:run
时,出现 SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"]
错误
Jun 20, 2022 5:36:45 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jun 20, 2022 5:36:45 PM org.apache.coyote.AbstractProtocol init
SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"]
java.net.BindException: Address already in use: NET_Bind <null>:8080
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:407)
二、原因
三、解决方法
- cmd输入
netstat -ano|findstr 8080
,找到占用8080端口的进程 - 列对应的分别是:协议-本地地址-外部地址-状态-PID
- 输入
taskkill /f /pid PID
终止8080端口进程,此例PID为5476,故输入taskkill /f /pid 5476
- 或者打开任务管理器,找到PID为5476的进程将其结束
- 重新启动
tomcat:run
,一直转圈但未报出SEVERE: Failed
异常,表示tomcat是正常运行的,打开浏览器输入访问地址即可
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)