美文网首页
Tomcat无法启动排查

Tomcat无法启动排查

作者: arrow_zh | 来源:发表于2021-10-14 15:13 被阅读0次

现象描述

在tomcat目录下执行 ./startup.sh 始终得到如下的错误

 ceny@master:~/tools/apache-tomcat-8.5.9$ bin/catalina.sh stop -force
Using CATALINA_BASE:   /home/ceny/tools/apache-tomcat-8.5.9
Using CATALINA_HOME:   /home/ceny/tools/apache-tomcat-8.5.9
Using CATALINA_TMPDIR: /home/ceny/tools/apache-tomcat-8.5.9/temp
Using JRE_HOME:        /home/ceny/jdk1.7.0_79/jre
Using CLASSPATH:       /home/ceny/tools/apache-tomcat-8.5.9/bin/bootstrap.jar:/home/ceny/tools/apache-tomcat-8.5.9/bin/tomcat-juli.jar
Using CATALINA_PID:    /home/ceny/tools/apache-tomcat-8.5.9/conf/catalina.pid
Usage: catalina.sh ( commands ... )
commands:
  debug             Start Catalina in a debugger
  debug -security   Debug Catalina with a security manager
  jpda start        Start Catalina under JPDA debugger
  run               Start Catalina in the current window
  run -security     Start in the current window with security manager
  start             Start Catalina in a separate window
  start -security   Start in a separate window with security manager
  stop              Stop Catalina, waiting up to 5 seconds for the process to end
  stop n            Stop Catalina, waiting up to n seconds for the process to end
  stop -force       Stop Catalina, wait up to 5 seconds and then use kill -KILL if still running
  stop n -force     Stop Catalina, wait up to n seconds and then use kill -KILL if still running
  configtest        Run a basic syntax check on server.xml - check exit code for result
  version           What version of tomcat are you running?
Note: Waiting for the process to end and use of the -force option require that $CATALINA_PID is defined

查看catalina.sh文件,结构如下:


catalina.sh

通过分析可以看到应该是参数1失效,导致进入了else判断,通过echo打印参数1发现是JRE_HOME=/xxx/xxx/xx
通过继续跟踪发现在 setclasspath.sh文件中使用了 set JAVA_HOME=/xxx,环境是linux环境,不能使用set命令,set会覆盖第一个入参,应该使用export才可以,set是windows环境使用


e6aa30aae26974d72371f7bf88258e0.png

相关文章

  • Tomcat无法启动排查

    现象描述 在tomcat目录下执行 ./startup.sh 始终得到如下的错误 查看catalina.sh文件,...

  • Eclipse报错,unable to install brea

    今天遇到个奇怪的错误,Tomcat启动报错,说是什么无法安装断点,原因为缺少行号信息。如图: 经过排查,确定原因为...

  • tomcat启动正常无法访问

    tomcat启动正常无法访问 eclipse环境下tomcat启动正常,但无法访问项目 如果你的环境首次运行,那么...

  • tomcat无法关闭:8005端口为启动

    配置tomcat的时候,发现一个问题,tomcat启动的时候,8005端口未启动,故无法关闭tomcat,因为to...

  • tomcat无法启动

    tomcat报错:严重: The required Server component failed to star...

  • kubelet无法启动排查

    问题描述 使用ansible安装Kubernetes,最后出现如所示报错,提示kubelet启动异常 问题排查 检...

  • Tomcat相关错误

    Tomcat无法启动 console显示org.apache.catalina.LifecycleExceptio...

  • Tomcat内存溢出

    很大的web工程,用tomcat默认分配的内存空间无法启动,如果不是在myeclipse中启动tomcat可以对t...

  • jenkins无法启动tomcat

    解决方法,在jenkins脚本中增加BUILD_ID=dontKillMe(也可以改成别的什么) BUILD_ID...

  • 解决Tomcat无法启动

    原因:新版本的JDK(1.6+)安装时无需配置JAVA_HOME,JRE_HOM,而Tomcat的startup....

网友评论

      本文标题:Tomcat无法启动排查

      本文链接:https://www.haomeiwen.com/subject/yoquoltx.html