各类tomcat启动错误

Tomcat8
web

Tomcat 在启动过程当中加载众多 jar 文件,默认会对其作 TLDs 扫描,{CATALINA-HOME}/logs/catalina.out 文件中会出现大量下面的 log:redis

09-Dec-2017 20:03:14.289 FINE [localhost-startStop-1] org.apache.jasper.servlet.TldScanner$TldScannerCallback.scan No TLD files were found in [file:/home/apache-tomcat-8.5.4/lib/tomcat-redis-session-manager-master-2.0.0.jar]. Consider adding the JAR to the tomcat.util.scan.StandardJarScanFilter.jarsToSkip property in CATALINA_BASE/conf/catalina.properties file.

出现这样的log说明,这条log所指的 jar 作了TLDs的扫描,而且没有在其中找到 TLDs,而且建议打开debug级别的log,查看相关的 jar 文件,在 Tomcat 配置文件中忽略对这样的 jar 的TLDs扫描。
apache

1)编辑 {CATALINA-HOME}/conf/logging.properties 文件,在文件末尾添加:缓存

org.apache.jasper.servlet.TldScanner.level = FINE

2)重启Tomcat。tomcat

3)等待Tomcat重启完成,而且相关web components都加载完成,可以正常工做。bash


此时,在 {CATALINA-HOME}/logs/catalina.xxxx-xx-xx.log 文件中能看到相似下面的log:session

org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [**] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

只要在$CATALINA_BASE/conf/context.xml里增长资源最大可缓存的大小就好了,大小可按本身的须要定义:ide

<?xml version='1.0' encoding='utf-8'?>
<Context>
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
    <Resources
        cachingAllowed="true"
        cacheMaxSize="100000"
    />
</Context>

重启tomcat
spa

相关文章
相关标签/搜索