恳请高手入,tomcat6.exe一闪而过,不能访问http://127.0.0.1:8080/或http://localhost:8080
本人安装的是apache-tomcat-6.0.20.exe,一路安装下去都没问题。端口选择的是8080,tomcat6.0不再需要JDK支持,只需要JRE,故安装过程中默认选择的是jre的路径,请回答者明白这一点。jdk是1.6版本。
但是不管我选择开始程序菜单:Configure Tomcat中的Start启动tomcat还是直接启动Tomcat 6.0\bin下的tomcat6.exe都是一闪而过,访问不了http://127.0.0.1:8080。 注意,我不是新手,jdk可以用,Java现在还可编程。就是安装tomcat有问题,不知我安装的IIS和tomcat有什么冲突,本来IIS可以用,但是安装VS2008后不能用了,现在变得一团糟。
环境变量设置如下:
JRE_HOME: C:\Program Files\Java\jre6
并在Java Options里加入了一句-Djre.home=C:\Program Files\Java\jre6,启动TOMCAT还是不行。
网上说的把msvcr71.dll拷贝到Tomcat 6.0\bin目录也是不行的。
还有人说 deleting tomcat install,可是我不想遇到问题就这样逃避过去。
一些classpath真的要设吗?比如网上说的.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tool.jar;%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\common\lib\servlet-api.jar;%CATALINA_HOME%\common\lib\jsp-api.jar我以前装过tomcat6.0,这些要设?而且tomcat6.0目录中没有common这个文件夹,我省去common直接用lib的目录设置还是不行。
还原系统后这一次安装不知怎么的出现这问题。
我去网上搜了好些天回答的基本都是由先人回答tomcat5.5或者更低版本的复制过去的。很多回答都是一样的,所以也请不要不懂的人贴一些copy的来,如果有用的还好。不过我基本看过,也试过,没用。
我知道卸载干净后再装一次别的版本应该可以,但是我不想这样做,我想明白如何根本解决这一问题,不然每个人遇到这个问题都卸载不知缘由下次还会被困住。
日志文件如下:
2010-9-5 22:11:44 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.16.
2010-9-5 22:11:44 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], ra
ndom [true].
2010-9-5 22:11:45 org.apache.coyote.http11.Http11AprProtocol init
严重: Error initializing endpoint
java.lang.Exception: Socket bind failed: [730049] ???????????У??????ó??????
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:623)
at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.jav
a:107)
at org.apache.catalina.connector.Connector.initialize(Connector.java:105
8)
at org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:535)
at org.apache.catalina.startup.Catalina.load(Catalina.java:555)
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.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
2010-9-5 22:11:45 org.apache.catalina.startup.Catalina load
严重: Catalina.start
LifecycleException: Protocol handler initialization failed: java.lang.Exception
: Socket bind failed: [730049] ???????????У??????ó??????
at org.apache.catalina.connector.Connector.initialize(Connector.java:106
0)
at org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:535)
at org.apache.catalina.startup.Catalina.load(Catalina.java:555)
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.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
2010-9-5 22:11:45 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1184 ms
2010-9-5 22:11:45 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2010-9-5 22:11:45 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.20
2010-9-5 22:11:46 org.apache.coyote.http11.Http11AprProtocol start
严重: Error starting endpoint
java.lang.Exception: Socket bind failed: [730049] ???????????У??????ó??????
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:623)
at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:730)
at org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.ja
va:137)
at org.apache.catalina.connector.Connector.start(Connector.java:1131)
at org.apache.catalina.core.StandardService.start(StandardService.java:5
31)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2010-9-5 22:11:46 org.apache.catalina.startup.Catalina start
严重: Catalina.start:
LifecycleException: service.getName(): "Catalina"; Protocol handler start fail
ed: java.lang.Exception: Socket bind failed: [730049] ???????????У??????ó??????
at org.apache.catalina.connector.Connector.start(Connector.java:1138)
at org.apache.catalina.core.StandardService.start(StandardService.java:5
31)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2010-9-5 22:11:46 org.apache.catalina.startup.Catalina start
信息: Server startup in 1352 ms
2010-9-5 22:11:46 org.apache.catalina.core.StandardServer await
严重: StandardServer.await: create[8005]:
java.net.BindException: Cannot assign requested address: JVM_Bind
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.<init>(Unknown Source)
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(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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
java.util.logging.ErrorManager: 1
java.lang.NullPointerException
at org.apache.juli.FileHandler.publish(FileHandler.java:137)
at java.util.logging.Logger.log(Unknown Source)
at java.util.logging.Logger.doLog(Unknown Source)
at java.util.logging.Logger.logp(Unknown Source)
at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:165)
at org.apache.juli.logging.DirectJDKLog.info(DirectJDKLog.java:115)
at org.apache.coyote.http11.Http11AprProtocol.pause(Http11AprProtocol.ja
va:154)
at org.apache.catalina.connector.Connector.pause(Connector.java:1073)
at org.apache.catalina.core.StandardService.stop(StandardService.java:56
3)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:633)
at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalin
a.java:676)
2010-9-5 22:11:46 org.apache.coyote.http11.Http11AprProtocol pause
信息: Pausing Coyote HTTP/1.1 on http-8080
2010-9-5 22:11:46 org.apache.coyote.ajp.AjpAprProtocol pause
信息: Pausing Coyote AJP/1.3 on ajp-8009
2010-9-5 22:11:47 org.apache.catalina.core.StandardService stop
信息: Stopping service Catalina
2010-9-5 22:11:47 org.apache.catalina.connector.MapperListener destroy
警告: Error unregistering MBeanServerDelegate
java.lang.NullPointerException
at org.apache.catalina.connector.MapperListener.destroy(MapperListener.j
ava:171)
at org.apache.catalina.connector.Connector.stop(Connector.java:1179)
at org.apache.catalina.core.StandardService.stop(StandardService.java:59
3)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:633)
at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalin
a.java:676)
2010-9-5 22:11:47 org.apache.coyote.http11.Http11AprProtocol destroy
信息: Stopping Coyote HTTP/1.1 on http-8080
2010-9-5 22:11:47 org.apache.catalina.connector.Connector stop
严重: Coyote connector has not been started
[color=#FF0000]恳请高手解答![/color]
[解决办法]
Socket bind failed:
很明显的绑定失效
你有一定基础. 为什么不开个DOS窗运行那个start 批处理呢? 在DOS窗口里,就可以看到具体的出错提示了.
不过, 你的LOG里已经指出来了.
1 确认你的 tomcat 使用的端口(看你的信息里面, 应该是使用的默认端口 8080 8009 8005).
2 确认你绑定的地址.
3 确认你绑定的地址及端口没有被占用. 特别是 8080 8009 8005 端口不能被占用.
[解决办法]
你确认没有被占用. 但错误信息是提示被占用...
还是仔细检查吧...
必要时, 可以把其它任何软件都关了. 最小化系统 运行 tomcat .
[解决办法]