gpt4 book ai didi

java - 为什么 tomcat 无法启动无法启动 apache tomcat web 服务器 tomcat.service : Control process exited, code=exited status=203

转载 作者:行者123 更新时间:2023-11-28 22:35:18 25 4
gpt4 key购买 nike

我想做什么

我安装了全新的 linux Ubuntu 16.04 来设置测试开发环境。

我想安装

  1. java 8
  2. tomcat 8

所以我应用了本教程并且知道我以前没有任何 java 或之前 安装了 tomcat。

Tutorial for java 8 and tomcat 8 Tutorial 2 same as the before with some more little hints

问题是什么

当我到达starting tomcat 的步骤时,它失败了。无法启动 apache tomcat Web 服务器 tomcat.service:控制进程已退出,代码=退出状态=203

Failed to start apache tomcat web server tomcat.service: Control process exited, code=exited status=203

最佳答案

我是如何重现的:

我在 ubuntu 16.04 上的新virtual box 上学习了教程。

在我尝试了很多如下解决方案之后:

  1. 尝试使用 chmod 和权限。
  2. 卸载并重新安装
  3. 更新我的 ubuntu
  4. 重新启动我的 ubuntu
  5. 重新加载服务
  6. 在 (/etc/systemd/system/tomcat.service).service 路径中的双引号建议。
  7. 在 (/etc/systemd/system/tomcat.service) 的 .service 文件中注释 CATALINA_HOME 行。
  8. 其他谷歌搜索解决方案。

解决方案:

来自这里的非常小的评论 (Thanks for the hint )) )失败后我跑了

You should run ‘journalctl -xn’ for more details about why Tomcat failed to start. Thanks.

它给我的主要原因是屏幕截图和 RED 中的通知。

Error with journalctl

  • 所有路径都是错误的 ==> 所以我必须为正确的路径修复大约五个地方...检查编号2 橙色检查图像。

check number 2 orange

  • JAVA_HOME PATH 错误 ==> 所以要更改并找到正确的路径,请执行此操作

how to find java path

然后在tomcat.service里改这次再次检查这张图片,看看 1 粗体黄色,它应该指向 JDK

number two in orange

结果:

所以,显然我走错了路,但它有效

总结:

在应用一些教程时,请在提取 tomcat 等时留意。因为它可能不同。

关于java - 为什么 tomcat 无法启动无法启动 apache tomcat web 服务器 tomcat.service : Control process exited, code=exited status=203,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48147923/

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