之前tomcat 一直是好用的后来装了apache之后,又进行了一些配置就出问题了:tomcat起不来了。而且很奇怪,明明是打印出了启动成功信息“ Server startup in 1179 ms"可紧接着还是抛出了,端口被占用异常:
Apr 16, 2010 8:58:26 AM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Apr 16, 2010 8:58:26 AM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Apr 16, 2010 8:58:26 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4218 ms
Apr 16, 2010 8:58:26 AM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[8005]:
java.net.BindException: Cannot assign requested address
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:647)
at org.apache.catalina.startup.Catalina.start(Catalina.java:607)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
很奇怪的问题,时不时的解决了很长时间,有几个月呢。但是就是解决不了。网上搜的的都是说端口被占用,要不就是已经启动了tomcat之类的答案。但是很明确,不是这样的。
就这样断断续续的,一次一次的失败,今天我又一次迎难而上,但这次我很幸运,解决了:
最终原因是配置apache的时候把 127.0.0.1 地址转向到了(该C:\Windows\System32\drivers\etc\hosts文件下的配置项)其他地址,比如说abc.com.cn等等。
反正解决该问题的办法就是把C:\Windows\System32\drivers\etc\hosts文件下的127.0.0.1转回到localhost就可以了
Apr 16, 2010 8:58:26 AM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Apr 16, 2010 8:58:26 AM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Apr 16, 2010 8:58:26 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4218 ms
Apr 16, 2010 8:58:26 AM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[8005]:
java.net.BindException: Cannot assign requested address
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:647)
at org.apache.catalina.startup.Catalina.start(Catalina.java:607)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
很奇怪的问题,时不时的解决了很长时间,有几个月呢。但是就是解决不了。网上搜的的都是说端口被占用,要不就是已经启动了tomcat之类的答案。但是很明确,不是这样的。
就这样断断续续的,一次一次的失败,今天我又一次迎难而上,但这次我很幸运,解决了:
最终原因是配置apache的时候把 127.0.0.1 地址转向到了(该C:\Windows\System32\drivers\etc\hosts文件下的配置项)其他地址,比如说abc.com.cn等等。
反正解决该问题的办法就是把C:\Windows\System32\drivers\etc\hosts文件下的127.0.0.1转回到localhost就可以了