tomcat does not exist /多個tomcat運行在一台機器上/一個tomcat運行多個執行個體

來源:互聯網
上載者:User

異常
之 java.lang.IllegalArgumentException:Document base *** does not exist or is not a readable


這是由於在webapps裡面將項目刪除,卻沒有在其它相應的工作目錄刪除

確定3點:
1.該項目的War檔案從***\apache-tomcat-6.0.16\webapps 移出;
2.該項目的某些配置從 ***apache-tomcat-6.0.16\work\Catalina\localhost 移除;
3.該項目的設定檔,目錄: ***\apache-tomcat-6.0.16\conf\Catalina\localhost移除。


多個tomcat運行在一台機器上

將tomcat的server.xml中的

shutdown連接埠

http連接埠

AJP連接埠

再運行即可,如果還不行,可以在startbat最後加個pause看看是不是jre等的問題


一個tomcat跑多個執行個體

看到網上寫有兩種方式,一種為配置多個service,一種為一個service配置多個connector


<Server>
<Service name="aaa">
    <Connector port="8080" maxThreads="150" minSpareThreads="10"   maxSpareThreads="75"
               enableLookups="false" redirectPort="38443" acceptCount="100"
               debug="9" connectionTimeout="20000"
               disableUploadTimeout="true" />
</Service>
<Service name="bbb">
    <Connector port="28080"
               maxThreads="150" minSpareThreads="10" maxSpareThreads="75"
               enableLookups="false" redirectPort="48443" acceptCount="100"
               debug="9" connectionTimeout="20000"
               disableUploadTimeout="true" />
</Service>
</Server>


<Service name="Catalina2">  
    <Connector port="8081"  
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"  
               enableLookups="false" redirectPort="8443" acceptCount="100"  
               debug="0" connectionTimeout="20000"   
               disableUploadTimeout="true" />  
    <Connector port="8010"   
               enableLookups="false" redirectPort="8443" debug="0"  
               protocol="AJP/1.3" />  
    <Engine name="Catalina" defaultHost="localhost" debug="0">  
      <Logger className="org.apache.catalina.logger.FileLogger"  
              prefix="catalina2_log." suffix=".txt"  
              timestamp="true"/>  
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"  
                 debug="0" resourceName="UserDatabase"/>  
      <Host name="localhost" debug="0" appBase="webapps2"  
       unpackWARs="true" autoDeploy="true"  
       xmlValidation="false" xmlNamespaceAware="false">  
        <Logger className="org.apache.catalina.logger.FileLogger"  
                 directory="logs"  prefix="localhost2_log." suffix=".txt"  
            timestamp="true"/>  
      </Host>  
    </Engine>  
  </Service>  



REFERENCES:http://www.cnblogs.com/skyme/archive/2011/06/28/2091974.html

http://wenku.baidu.com/view/f0285a27192e45361066f510.html

http://yuri-liuyu.iteye.com/blog/960964

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.