-
问题描述:
mac下的Eclipse中内置的Tomcat,启动时报一下错误:Several ports (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).
-
解决办法:
- 打开终端,输入以下命令
lsof -i :8080
- 如果你被占用的端口不是8080,请修改命令中的参数。 该命令输出以下内容:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 27132 kaige 41u IPv6 0x9d80e4a27fc1081b 0t0 TCP *:http-alt (LIS
-
我的Mac上占用8080端口的进程ID是27132,所以我再将这个进程杀死
kill -9 27132
请根据你的进程ID来修改次kill命令的最后一个参数
然后再次启动Eclipse中的Tomcat,可以正常启动了!
- 打开终端,输入以下命令