mac Tomcat v7.0 Server at localhost are already in use

来源:互联网 发布:vb趣味小游戏编程代码 编辑:程序博客网 时间:2024/05/01 06:01

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
  • 1
  • 1

如果你被占用的端口不是8080,请修改命令中的参数。 
该命令输出以下内容:

COMMAND   PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAMEjava    27132    kaige   41u  IPv6 0x9d80e4a27fc1081b      0t0  TCP *:http-alt (LISTEN)
  • 1
  • 2
  • 1
  • 2

我的Mac上占用8080端口的进程ID是27132,所以我再将这个进程杀死

kill -9 27132
  • 1
  • 1

请根据你的进程ID来修改次命令的最后一个参数

然后再次启动Eclipse中的Tomcat,可以正常启动了!

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