在mac yosemite用eclipse启动tomcat时卡在 preparing launch delegate

在最新的mac 系统 Yosemite做开发,有时候需要用到80端口,但是由于系统原因,1024以下需要root权限,网络上的解决办法:

1.直接用root启动tomcat;但是不能用eclipse debug;

2.用pf(pfctl)设置端口转发,把80端口请求转发到8080.

?

注意网上很多都是用ipfw,在Yosemite里面是停用了。 问题初步解决。 但是,本机测试没问题,但是你想局域网访问甚至外网访问是不行(像做移动开发往往需要手机访问PC来实时调试)

?

经本人测试,停用pf,改用apache或者nginx来转发80请求!

?

注意,如果eclipse启动tomcat时卡在eclipse preparing launch delegate...

然后报错:

Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.

?

可能是你之前设置过pf,这时候把pf停用了就可以了:sudo pfctl -d

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。