Mac系统下Tomcat端口号被占用,没法正常启动的问题。

来源:互联网 发布:php上传文件到服务器 编辑:程序博客网 时间:2024/05/24 03:16

如果eclipse突然崩溃了,或者是非正常退出了,会导致之前的Tomcat没有正常关闭,端口号被占用。会出现以下的问题:

    Several ports (8005, 8080, 8009) required by Tomcat v7.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).

解决办法:杀掉占用端口的进程

在mac系统下查看某端口号的进程和关闭该进程:

sudo lsof -i :端口号 :可以获取该端口号下的进程的信息,获取其PID。

关闭使用某端口号的进程

sudo kill -9 PID



原创粉丝点击