gpt4 book ai didi

java - Catalina配置测试(catalina.sh configtest)

转载 作者:行者123 更新时间:2023-11-30 10:42:26 24 4
gpt4 key购买 nike

我感觉我的 Tomcat 安装可能有问题,所以我运行以下命令进行完整性检查。

$TOMCAT_HOME/bin/catalina.sh configtest

这个输出是什么意思,或者如何着手修复?想重新安装Tomcat。操作系统是 Ubuntu。

Using CATALINA_BASE:   /usr/share/tomcat7
Using CATALINA_HOME: /usr/share/tomcat7
Using CATALINA_TMPDIR: /usr/share/tomcat7/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar

Jul 01, 2016 12:28:41 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common/classes], exists: [false], isDirectory: [false], canRead: [false]

Jul 01, 2016 12:28:41 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false]

Jul 01, 2016 12:28:41 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false]

Jul 01, 2016 12:28:41 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false]

Jul 01, 2016 12:28:41 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false]

Jul 01, 2016 12:28:41 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared], exists: [false], isDirectory: [false], canRead: [false]

Jul 01, 2016 12:28:41 AM org.apache.catalina.startup.Catalina initDirs
SEVERE: Cannot find specified temporary folder at /usr/share/tomcat7/temp

Jul 01, 2016 12:28:41 AM org.apache.catalina.startup.Catalina load
WARNING: Unable to load server configuration from [/usr/share/tomcat7/conf/server.xml]

Configuration error detected!

最佳答案

我遇到了同样的问题。我在 Ubuntu 14.04 上运行 Tomcat 7。问题出在文件 catalina.properties 中。在我的电脑中,它位于/var/lib/tomcat7/conf/。

这个文件有很多路径,变量${catalina.base}${catalina.home}。此变量在文件 catalina.sh 中设置。在我的电脑中,它位于/usr/share/tomcat7/bin/。

出于某种原因,Tomcat 7 使用的是 ${catalina.home},即 /usr/share/tomcat7/ 而不是 ${catalina. base}/var/lib/tomcat7/

要更正此问题,您需要替换以下文本:

  • ${catalina.home}/common/classes => ${catalina.base}/common/classes
  • ${catalina.home}/common/.jar => ${catalina.base}/common/.jar
  • ${catalina.home}/server/classes => ${catalina.base}/server/classes
  • ${catalina.home}/server/.jar => ${catalina.base}/server/.jar
  • ${catalina.home}/shared/classes => ${catalina.base}/shared/classes
  • ${catalina.home}/shared/.jar => ${catalina.base}/shared/.jar

替换完成后,再次运行configtest.sh进行验证。

关于java - Catalina配置测试(catalina.sh configtest),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38135009/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com