jetty 7启动时加上jetty.xml报错

wingfly110 发布于 2015/07/08 16:53
阅读 1K+
收藏 0

jetty 7启动时加上jetty.xml报错(java -jar start.jar etc/jetty.xml):

2015-07-08 16:49:12.113:WARN:oejuc.AbstractLifeCycle:FAILED SelectChannelConnector@0.0.0.0:8081: java.net.BindException:
 Address already in use: bind
java.net.BindException: Address already in use: bind
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
        at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
        at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
        at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
        at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.server.Server.doStart(Server.java:292)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1274)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jetty.start.Main.invokeMain(Main.java:473)
        at org.eclipse.jetty.start.Main.start(Main.java:615)
        at org.eclipse.jetty.start.Main.main(Main.java:96)
2015-07-08 16:49:12.143:WARN:oejuc.AbstractLifeCycle:FAILED org.eclipse.jetty.server.Server@28e51e50: java.net.BindExcep
tion: Address already in use: bind
java.net.BindException: Address already in use: bind
        at sun.nio.ch.Net.bind0(Native Method)



不加就能启动成功,咋回事?

加载中
0
_________0
_________0
不是名写的吗
0
_________0
_________0
2015-07-0816:49:12.113:WARN:oejuc.AbstractLifeCycle:FAILED SelectChannelConnector@0.0.0.0:8081: java.net.BindException:
 Address already in use: bind
java.net.BindException: Address already in use: bind
0
wingfly110
wingfly110

引用来自“_________0”的评论

2015-07-0816:49:12.113:WARN:oejuc.AbstractLifeCycle:FAILED SelectChannelConnector@0.0.0.0:8081: java.net.BindException:
 Address already in use: bind
java.net.BindException: Address already in use: bind

端口确定没被占用,0.0.0.0:8081中0.0.0.0为嘛不是127.0.0.1

如何解释启动命令中不加jetty.xml就能成功启动

返回顶部
顶部