一个可以正常启动的Tomact,一直在用,突然出现弹框提示启动失败
控制台显示
七月 03, 2020 7:55:07 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["http-bio-8080"]
七月 03, 2020 7:55:07 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["ajp-bio-8009"]
七月 03, 2020 7:55:07 上午 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service Catalina
七月 03, 2020 7:55:07 上午 org.apache.coyote.AbstractProtocol stop
信息: Stopping ProtocolHandler ["http-bio-8080"]
七月 03, 2020 7:55:07 上午 org.apache.coyote.AbstractProtocol stop
信息: Stopping ProtocolHandler ["ajp-bio-8009"]
七月 03, 2020 7:55:07 上午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["http-bio-8080"]
七月 03, 2020 7:55:07 上午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["ajp-bio-8009"]
netstat -ano | findstr 8080
netstat -ano | findstr 8009
没有显示有占用的(如果有一般为java.exe,javaw.exe),重启都不好使,端口占用情况排除,一时想不到原因,查看Tomact的启动日志文件
七月 03, 2020 7:55:04 上午 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\develop\Java\jdk1.7.0_72\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\app\Administrator\product\11.2.0\dbhome_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\develop\Java\jdk1.7.0_72\bin;C:\Program Files\MySQL\MySQL Server 5.5\bin;D:\Program Files\Git\cmd;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Roaming\Composer\vendor\bin;E:\xampp\mysql\bin;;.
七月 03, 2020 7:55:05 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
七月 03, 2020 7:55:05 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
七月 03, 2020 7:55:05 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 425 ms
七月 03, 2020 7:55:05 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
七月 03, 2020 7:55:05 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.52
七月 03, 2020 7:55:05 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\develop\apache-tomcat-7.0.52\webapps\docs
七月 03, 2020 7:55:06 上午 org.apache.catalina.util.SessionIdGenerator createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [1,114] milliseconds.
七月 03, 2020 7:55:06 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\develop\apache-tomcat-7.0.52\webapps\examples
七月 03, 2020 7:55:07 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\develop\apache-tomcat-7.0.52\webapps\host-manager
七月 03, 2020 7:55:07 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\develop\apache-tomcat-7.0.52\webapps\manager
七月 03, 2020 7:55:07 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\develop\apache-tomcat-7.0.52\webapps\ROOT
七月 03, 2020 7:55:07 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
七月 03, 2020 7:55:07 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
七月 03, 2020 7:55:07 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 2138 ms
七月 03, 2020 7:55:07 上午 org.apache.catalina.core.StandardServer await
严重: StandardServer.await: create[localhost:8009]:
java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(DualStackPlainSocketImpl.java:106)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:190)
at java.net.ServerSocket.bind(ServerSocket.java:376)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:426)
at org.apache.catalina.startup.Catalina.await(Catalina.java:777)
at org.apache.catalina.startup.Catalina.start(Catalina.java:723)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
七月 03, 2020 7:55:07 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["http-bio-8080"]
七月 03, 2020 7:55:07 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["ajp-bio-8009"]
七月 03, 2020 7:55:07 上午 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service Catalina
七月 03, 2020 7:55:07 上午 org.apache.coyote.AbstractProtocol stop
信息: Stopping ProtocolHandler ["http-bio-8080"]
七月 03, 2020 7:55:07 上午 org.apache.coyote.AbstractProtocol stop
信息: Stopping ProtocolHandler ["ajp-bio-8009"]
七月 03, 2020 7:55:07 上午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["http-bio-8080"]
七月 03, 2020 7:55:07 上午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["ajp-bio-8009"]
经查询缺少tcnative-1.dll(不太清楚为何会丢失此文件),下载对应版本的放入Tomact的bin下,Tomact可以正常启动,但是eclipse无法正常启动Tomact,还是同样的问题,因为在调试过程中将服务删除了(eclipse内置Tomact和安装的Tomact的区别),以为是配置的问题,经查询需要在jdk的bin中也需要增加。
启动服务成功