mac下eclipse的jetty插件无法起服务

Fatal Error] :1:40:The markup in the document following the root element must be well-formed.

2014-10-2917:11:18.802:INFO:/:WebxComponents: initialization completed

2014-10-2917:11:19.874:INFO:/:Initializing filter: webx

2014-10-2917:11:19.877:INFO:/:WebxFrameworkFilter - webx: initialization completed

2014-10-2917:11:19.928:WARN::failed SelectChannelConnector@0.0.0.0:80:java.net.SocketException: Permission denied

2014-10-2917:11:19.929:INFO::Started Ajp13SocketConnector@0.0.0.0:8009

2014-10-29 17:11:19.929:INFO::AJP13is not a secure protocol. Please protect port 8009

2014-10-2917:11:19.930:WARN::failed Server@19fbfd3a:java.net.SocketException: Permission denied

java.net.SocketException: Permission denied

      at sun.nio.ch.Net.bind0(Native Method)

      at sun.nio.ch.Net.bind(Net.java:444)

      at sun.nio.ch.Net.bind(Net.java:436)

      at

 

问题:

Mac使用eclipsejetty插件,无法起服务,报80端口无权限

原因:

Linux下只有root用户才能定使用1024以下的端口

解决方法:

一.eclipsejetty插件监听8080端口


 

二.用 ipfw 监听本地 80 端口然后转发到 8080 等端口。ipfw 是 OS X 自带的防火墙程序,类似 Linux 下的 iptables。

1.查看当前 ipfw规则:

sudo ipfw show

1.port 80 to8080 forward

sudo ipfw add100 fwd 127.0.0.1,8080 tcp from any to any 80 in

1.清除 ipfw规则

sudo ipfw flush

 

 

参考:http://www.ningoo.net/html/2012/eclipse_jetty_run_web_application_bind_port_80_on_linux.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值