严重: A child container failed during start

tomcat 专栏收录该内容
13 篇文章 0 订阅

前言

  • tomcat 8.5
  • jdk 1.8

严重: A child container failed during start

启动tomcat遇到错误 A child container failed during start

问题原因

问题原因就是 A child container failed during start 。tomcat中的项目,就是 child container 。因此错误就是有项目启动失败了,至于是哪个,就自己分析吧。

项目启动失败的原因很多,但是只有 A child container failed during start 是 tomcat 抛出的(这句话的口气,就是tomcat的口气。即,还没进到项目中呢)。碰到这个错误的时候,查找那些与tomcat项目的解决办法就可以了。

我的问题是docBase指向的地址不存在(想将从其它服务器上移过来的tomcat先启动起来看看,但没把对应的项目移过来),如下:

<?xml version='1.0' encoding='utf-8'?>
<Server port="1001" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!-- <Listener className="org.apache.catalina.core.JasperListener" /> -->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
  <GlobalNamingResources>
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>
  <Service name="Catalina">
  
    <Connector port="1011" protocol="HTTP/1.1"
               connectionTimeout="20000"
                           maxThreads="3000" 
               minSpareThreads="250" 
               acceptCount="2000" 
               enableLookups="false" 
               compression="on" 
               URIEncoding="UTF-8"
               compressionMinSize="2048" 
               noCompressionUserAgents="gozilla,traviata" 
               compressableMimeType="text/html,text/xml,text/css,text/plain,text/javascript,application/x-javascript,application/javascript" 
               />
                           
    <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>
                        <Host 
                                name="localhost" 
                                appBase="webapps" 
                                unpackWARs="true" 
                                autoDeploy="true"
                                xmlValidation="false" 
                                xmlNamespaceAware="false">

                                <Context 
                                        path="/" 
                                        docBase="/data/htdocs/xxx_web" 
                                        allowLinking="true" 
                                        reloadable="false"
                                        privileged="true" >
                                </Context>
<!--        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" /> -->

      </Host>
    </Engine>
  </Service>
</Server>
  • 0
    点赞
  • 0
    评论
  • 0
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值