一尘不染

蚀和tomcat

tomcat

我正在尝试将eclipse与tomcat集成。我的系统是Debian
Lenny,我已经从http://tomcat.apache.org/安装了tomcat
。我的问题是,从eclipse中启动Tomcat时,出现以下错误:

SEVERE: StandardServer.await: create[8005]: 
java.net.SocketException: Invalid argument
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
    at java.net.ServerSocket.bind(ServerSocket.java:319)
    at java.net.ServerSocket.<init>(ServerSocket.java:185)
    at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
    at org.apache.catalina.startup.Catalina.await(Catalina.java:662)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:614)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Jun 16, 2010 9:54:34 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Jun 16, 2010 9:54:34 PM org.apache.catalina.connector.Connector pause
SEVERE: Protocol handler pause failed
java.net.SocketException: Network is unreachable
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:529)
    at java.net.Socket.connect(Socket.java:478)
    at java.net.Socket.<init>(Socket.java:375)
    at java.net.Socket.<init>(Socket.java:218)
    at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:487)
    at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:284)
    at org.apache.jk.server.JkMain.pause(JkMain.java:725)
    at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153)
    at org.apache.catalina.connector.Connector.pause(Connector.java:1029)
    at org.apache.catalina.core.StandardService.stop(StandardService.java:566)
    at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
    at org.apache.catalina.startup.Catalina.stop(Catalina.java:648)
    at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:692)

我怀疑这与java选项java.net.preferIPv4Stack有关。

提前致谢!


阅读 257

收藏
2020-06-16

共1个答案

一尘不染

我可以通过在本地运行配置-> Tomcat 6.0 Server下添加-Djava.net.preferIPv4Stack = true来解决此问题。

2020-06-16