记录一下tomcat的./startup.sh完成之后没有tomcat进程问题

入门 专栏收录该内容
7 篇文章 0 订阅

朋友说他服务器80访问不了,貌似是tomcat的问题
一开始我以为是tomcat坏掉了,我准备去下载新的tomcat
后来我觉得我应该研究研究哪坏了
于是我试着开启和关闭tomcat
于是有了这个报错界面

[root@GaoShang bin]# ./shutdown.sh 
Using CATALINA_BASE:   /usr/local/tomcat/apache-tomcat-8.5.51
Using CATALINA_HOME:   /usr/local/tomcat/apache-tomcat-8.5.51
Using CATALINA_TMPDIR: /usr/local/tomcat/apache-tomcat-8.5.51/temp
Using JRE_HOME:        /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64
Using CLASSPATH:       /usr/local/tomcat/apache-tomcat-8.5.51/bin/bootstrap.jar:/usr/local/tomcat/apache-tomcat-8.5.51/bin/tomcat-juli.jar
Apr 26, 2020 2:51:00 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Could not contact [localhost:8005]. Tomcat may not be running.
Apr 26, 2020 2:51:00 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop: 
java.net.ConnectException: Connection refused (Connection refused)
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:607)
	at java.net.Socket.connect(Socket.java:556)
	at java.net.Socket.<init>(Socket.java:452)
	at java.net.Socket.<init>(Socket.java:229)
	at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:504)
	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.stopServer(Bootstrap.java:389)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:479)


于是我就开始思索8005找不到
于是我觉得应该是8005被占用了

[root@GaoShang bin]# netstat -apn
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1371/sshd           
tcp        0      0 172.17.39.110:22        223.90.37.134:58071     ESTABLISHED 1979/sshd: root@pts 
tcp        0      0 172.17.39.110:22        223.90.189.89:53843     ESTABLISHED 2093/sshd: root@pts 
tcp        0      0 172.17.39.110:52800     100.100.30.26:80        ESTABLISHED 1192/AliYunDun      
tcp        0      0 172.17.39.110:22        223.90.37.134:58057     ESTABLISHED 1960/sshd: root@pts 
tcp        0     36 172.17.39.110:22        223.90.189.89:54269     ESTABLISHED 2222/sshd: root@pts 
tcp        0      0 172.17.39.110:22        223.90.189.89:53361     ESTABLISHED 1565/sshd: root@not 
tcp        0      0 172.17.39.110:45678     100.100.27.15:3128      ESTABLISHED 670/CmsGoAgent-Work 
tcp        0      0 172.17.39.110:35210     100.100.105.70:80       TIME_WAIT   -                   
tcp6       0      0 :::3306                 :::*                    LISTEN      1173/mysqld         
udp        0      0 0.0.0.0:68              0.0.0.0:*                           815/dhclient        
udp        0      0 127.0.0.1:323           0.0.0.0:*                           661/chronyd         
udp6       0      0 ::1:323                 :::*                                  661/chronyd         

并没有某个万恶的java占用了8005
顺便
我发现竟然连80都没有(我在servlet.xml设置了80还用了Nginx代理)
所以tomcat并没有启动起来
于是我就找到了这个办法
SEVERE: Could not contact [localhost:8005] (base port [8005] and offset [0]). Tomcat may not be runn
然而对我没用
于是我又找了一个
SEVERE: Could not contact localhost:8005. Tomcat may not be running. Connection refused (Connection
分别是修改内存和修改java设置文件

这个问题是Tomcat内存导致的,可以修改下Tomcat内存,切换到bin目录下面,使用
vi catalina.sh
修改catalina.sh文件,在位置cygwin=false前,插入以下内容
JAVA_OPTS="-Xms512m -Xmx1024m -Xss2048K -XX:PermSize=256m -XX:MaxPermSize=512m"
————————————————
版权声明:本文为CSDN博主「彭珂个人网」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/pk694046220/article/details/96324326

解决方案:找到 jdk1.8.xx 的安装路径,修改其子目录 /jre/lib/security/ 下的 “java.security” 文件中的 “securerandom.source=file:/dev/random” 为 "securerandom.source=file:/dev/./urandom "
————————————————
版权声明:本文为CSDN博主「markix」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_31772441/article/details/80472968

然而···无法解决
于是我开始找tomcat启动日志
/usr/local/tomcat/apache-tomcat-8.5.51/logs
看一看启动日志

[root@GaoShang logs]# tail -n 200  catalina.out 

然后出来一大堆东西

		... 7 more
	Caused by: java.lang.IllegalArgumentException: The main resource set specified [/springbootdemo-0.0.1-SNAPSHOT] is not valid
		at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:748)
		at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:706)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		... 9 more
26-Apr-2020 14:54:37.770 SEVERE [main] org.apache.catalina.startup.Catalina.start The required Server component failed to start so Tomcat is unable to start.
	org.apache.catalina.LifecycleException: A child container failed during start
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942)
		at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:766)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.startup.Catalina.start(Catalina.java:688)
		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.start(Bootstrap.java:343)
		at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
	Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: A child container failed during start
		at java.util.concurrent.FutureTask.report(FutureTask.java:122)
		at java.util.concurrent.FutureTask.get(FutureTask.java:192)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:931)
		... 13 more
	Caused by: org.apache.catalina.LifecycleException: A child container failed during start
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942)
		at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at java.lang.Thread.run(Thread.java:748)
	Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@2eec8f0]
		at java.util.concurrent.FutureTask.report(FutureTask.java:122)
		at java.util.concurrent.FutureTask.get(FutureTask.java:192)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:931)
		... 8 more
	Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@2eec8f0]
		at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
		at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4814)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4949)
		... 7 more
	Caused by: java.lang.IllegalArgumentException: The main resource set specified [/springbootdemo-0.0.1-SNAPSHOT] is not valid
		at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:748)
		at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:706)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		... 9 more
26-Apr-2020 14:54:37.771 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-80"]
26-Apr-2020 14:54:37.771 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
26-Apr-2020 14:54:37.776 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-80"]
26-Apr-2020 15:02:33.860 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/8.5.51
26-Apr-2020 15:02:33.862 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Feb 5 2020 22:26:25 UTC
26-Apr-2020 15:02:33.862 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.51.0
26-Apr-2020 15:02:33.862 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
26-Apr-2020 15:02:33.862 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            3.10.0-1062.18.1.el7.x86_64
26-Apr-2020 15:02:33.862 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
26-Apr-2020 15:02:33.862 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64/jre
26-Apr-2020 15:02:33.862 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_242-b08
26-Apr-2020 15:02:33.862 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
26-Apr-2020 15:02:33.862 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat/apache-tomcat-8.5.51
26-Apr-2020 15:02:33.862 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat/apache-tomcat-8.5.51
26-Apr-2020 15:02:33.863 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/apache-tomcat-8.5.51/conf/logging.properties
26-Apr-2020 15:02:33.863 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
26-Apr-2020 15:02:33.863 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
26-Apr-2020 15:02:33.863 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
26-Apr-2020 15:02:33.863 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
26-Apr-2020 15:02:33.863 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
26-Apr-2020 15:02:33.863 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat/apache-tomcat-8.5.51
26-Apr-2020 15:02:33.863 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat/apache-tomcat-8.5.51
26-Apr-2020 15:02:33.863 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/apache-tomcat-8.5.51/temp
26-Apr-2020 15:02:33.863 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
26-Apr-2020 15:02:33.947 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]
26-Apr-2020 15:02:33.957 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
26-Apr-2020 15:02:33.977 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 486 ms
26-Apr-2020 15:02:34.002 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
26-Apr-2020 15:02:34.002 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.51
26-Apr-2020 15:02:34.034 SEVERE [Catalina-startStop-1] org.apache.catalina.core.ContainerBase.startInternal A child container failed during start
	java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@337fec82]
		at java.util.concurrent.FutureTask.report(FutureTask.java:122)
		at java.util.concurrent.FutureTask.get(FutureTask.java:192)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:931)
		at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at java.lang.Thread.run(Thread.java:748)
	Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@337fec82]
		at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
		at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4814)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4949)
		... 7 more
	Caused by: java.lang.IllegalArgumentException: The main resource set specified [/springbootdemo-0.0.1-SNAPSHOT] is not valid
		at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:748)
		at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:706)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		... 9 more
26-Apr-2020 15:02:34.036 SEVERE [main] org.apache.catalina.core.ContainerBase.startInternal A child container failed during start
	java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: A child container failed during start
		at java.util.concurrent.FutureTask.report(FutureTask.java:122)
		at java.util.concurrent.FutureTask.get(FutureTask.java:192)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:931)
		at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:766)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.startup.Catalina.start(Catalina.java:688)
		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.start(Bootstrap.java:343)
		at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
	Caused by: org.apache.catalina.LifecycleException: A child container failed during start
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942)
		at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at java.lang.Thread.run(Thread.java:748)
	Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@337fec82]
		at java.util.concurrent.FutureTask.report(FutureTask.java:122)
		at java.util.concurrent.FutureTask.get(FutureTask.java:192)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:931)
		... 8 more
	Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@337fec82]
		at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
		at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4814)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4949)
		... 7 more
	Caused by: java.lang.IllegalArgumentException: The main resource set specified [/springbootdemo-0.0.1-SNAPSHOT] is not valid
		at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:748)
		at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:706)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		... 9 more
26-Apr-2020 15:02:34.036 SEVERE [main] org.apache.catalina.startup.Catalina.start The required Server component failed to start so Tomcat is unable to start.
	org.apache.catalina.LifecycleException: A child container failed during start
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942)
		at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:766)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.startup.Catalina.start(Catalina.java:688)
		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.start(Bootstrap.java:343)
		at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
	Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: A child container failed during start
		at java.util.concurrent.FutureTask.report(FutureTask.java:122)
		at java.util.concurrent.FutureTask.get(FutureTask.java:192)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:931)
		... 13 more
	Caused by: org.apache.catalina.LifecycleException: A child container failed during start
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:942)
		at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at java.lang.Thread.run(Thread.java:748)
	Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@337fec82]
		at java.util.concurrent.FutureTask.report(FutureTask.java:122)
		at java.util.concurrent.FutureTask.get(FutureTask.java:192)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:931)
		... 8 more
	Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@337fec82]
		at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
		at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4814)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4949)
		... 7 more
	Caused by: java.lang.IllegalArgumentException: The main resource set specified [/springbootdemo-0.0.1-SNAPSHOT] is not valid
		at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:748)
		at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:706)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		... 9 more
26-Apr-2020 15:02:34.037 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-80"]
26-Apr-2020 15:02:34.037 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
26-Apr-2020 15:02:34.038 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-80"]

然后就分析这个错误的原因,检查tomcat的配置文件,同时发现了这么一个解决办法
tomcat报错org.apache.catalina.core.ContainerBase.startInternal A child container failed during start
我就把

<Context path="" docBase="/springbootdemo-0.0.1-SNAPSHOT/"></Context>

直接注释掉。
重启tomcat
页面访问。
ok!

  • 0
    点赞
  • 0
    评论
  • 2
    收藏
  • 打赏
    打赏
  • 扫一扫,分享海报

©️2022 CSDN 皮肤主题:大白 设计师:CSDN官方博客 返回首页

打赏作者

还未入门

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值