在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

猜你喜欢

转载自junjie-liao-qq-com.iteye.com/blog/2185993
今日推荐