码迷,mamicode.com
首页 > 其他好文 > 详细

tomcat点击startup.bat出现闪退,启动不成功的解决办法

时间:2020-01-15 00:09:03      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:failed   already   connector   bind   except   输入   不成功   access   快捷   

问题描述:tomcat点击startup.bat出现命令行闪退的情况
打开startup.bat,在第一行加入
SET JAVA_HOME=D:\jdk\jdk1.8.0_121【jdk路径】
SET TOMCAT_HOME=D:\apache-tomcat-8.5.29\apache-tomcat-8.5.29【tomcat路径】

技术图片

 

打开shutdown.bat,同样的在第一行输入:
SET JAVA_HOME=D:\jdk\jdk1.8.0_121【jdk路径】
SET TOMCAT_HOME=D:\apache-tomcat-8.5.29\apache-tomcat-8.5.29【tomcat路径】
技术图片

 

 

【注:tomcat路径不要加bin】

双击tomcat目录里面的bin下面的startup.bat,如果出现以下情况,是端口被占用了,
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[AJP/1.3-8009]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:549)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:875)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
at org.apache.catalina.startup.Catalina.load(Catalina.java:632)
at org.apache.catalina.startup.Catalina.load(Catalina.java:655)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:309)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:995)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
… 12 more
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1086)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:268)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:581)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:993)
… 13 more
技术图片

 

 

快捷键win+r,输入cmd,进入命令行,输入shutdown.sh
然后再重新启动一下,h
还是命令行输入,startup.bat
技术图片

 

 

然后浏览器输入http:localhost:8080,出现以下界面就成功了:

技术图片

tomcat点击startup.bat出现闪退,启动不成功的解决办法

标签:failed   already   connector   bind   except   输入   不成功   access   快捷   

原文地址:https://www.cnblogs.com/coder-wf/p/12194443.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!