由于粘贴了堆栈跟踪,我无法启动 tomcat,而且我不相信答案是在 Java 中。我尝试更改端口并确认另一个端口(8005)也失败并显示相同的错误消息。如何验证我的 linux 网络设置是否允许 Java 使用端口?
EDIT2:看来这个盒子是入侵的受害者。我认为标记此帖子以供版主关闭是有意义的,因为不能期望受损的盒子正常运行。感谢大家的时间和精力。
编辑: /bin 中的包损坏可能是负责任的。我不得不用 up2date 更新一些。
额外信息:
回复:类似的问题,我通过检查 netstat 消除了 JVM_BIND 的可能性。
ping localhost 只是挂起:
$ ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
-- no responses ---
--- localhost ping statistics ---
9 packets transmitted, 0 received, 100% packet loss, time 8000ms
平谷歌作品:
$ ping google.com
PING google.com (74.125.225.228) 56(84) bytes of data.
-- responses removed ---
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 1.389/1.417/1.443/0.048 ms, pipe 2
例外:
SEVERE: StandardServer.await: create[8036]:
java.net.BindException: Cannot assign requested address
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.(Unknown Source)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Jun 5, 2013 12:49:05 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8035
Jun 5, 2013 12:49:05 PM org.apache.catalina.connector.Connector pause
SEVERE: Protocol handler pause failed
java.net.SocketException: Invalid argument or cannot assign requested address
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:492)
at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:289)
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)