错误翻译:
无法启动服务器,因为一个或多个端口无效。打开服务器编辑器并更正无效端口。

one or more of the ports are invalid. Open the server editor and correct the invalid ports
原因是装Tomcat的时候server shutdown port没有设置成8005,而是-1
如果想要了解Server元素中的 Shutdown
请点击链接:
https://blog.csdn.net/qq_43290288/article/details/102692720

解决完端口号无效之后,可能还会出现端口号被占用的情况

如下图所示:
多个端口被占用
one or more of the ports are invalid. Open the server editor and correct the invalid ports
一个端口被占用
one or more of the ports are invalid. Open the server editor and correct the invalid ports
原因:可能是在打开Tomcat的情况下关闭了Eclipse,或是Eclipse非正常关闭,导致先前的Tomcat没有被关闭,端口占用。或是其他软件占用了tomcat的端口号。

第一种方法:
一一强制终止每一个端口号,解决方法如下:

window下打开命令窗口(快捷键:win+R)→输入cmd打开命令窗口:输入 netstat -ano|findstr 8005 (什么端口号被占用就输入什么端口号),回车
one or more of the ports are invalid. Open the server editor and correct the invalid ports

再输入 taskkill /pid 4404 /f 回车 这里的4404对应上图的4404

one or more of the ports are invalid. Open the server editor and correct the invalid ports

再次启动tomcat可以成功启动

第二种方法:

修改端口号

tomcat->conf->server.xml文件->修改这里,记得是有protocol=“HTTP/1.1”字样的
那一行

one or more of the ports are invalid. Open the server editor and correct the invalid ports

建议采用第一种方法

相关文章: