为什么tomcat不会启动无法启动apache tomcat web服务器tomcat.service:控制进程退出,code = exited status = 203

时间:2022-10-04 16:51:35

What i wanted to do

我想做什么

I installed fresh linux Ubuntu 16.04 to setup a test developing environment.

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

I wanted to install

我想安装

  1. java 8
  2. tomcat 8

So i applied this tutorial and know that i dont have any previously java or tomcat installed before.

所以我应用了这个教程,并知道我之前没有安装任何以前的java或tomcat。

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

java 8和tomcat 8教程2的教程与前面的相同,有一些更多的小提示

What is the problem

问题是什么

When i reached the step of starting tomcat , it failed. Failed to start apache tomcat web server tomcat.service: Control process exited, code=exited status=203.

当我到达启动tomcat的步骤时,它失败了。无法启动apache tomcat web服务器tomcat.service:控制进程退出,code = exited status = 203。

为什么tomcat不会启动无法启动apache tomcat web服务器tomcat.service:控制进程退出,code = exited status = 203

1 个解决方案

#1


1  

How i tried to reproduce:

我是如何尝试重现的:

I followed the tutorial on a fresh virtual box on ubuntu 16.04.

我在ubuntu 16.04上的一个新的虚拟盒子上关注了教程。

And after i tried lot of the solution like the below:

之后我尝试了很多类似下面的解决方案:

  1. Playing with chmod and permissions.
  2. 玩chmod和权限。

  3. Un install and re install
  4. 卸载并重新安装

  5. Updating my ubuntu
  6. 更新我的ubuntu

  7. Restarting my ubuntu
  8. 重新启动我的ubuntu

  9. Reloading services
  10. Double Quotation suggestions in .service paths in (/etc/systemd/system/tomcat.service).
  11. (/etc/systemd/system/tomcat.service)中.service路径中的双引号建议。

  12. Commenting CATALINA_HOME line in .service file in (/etc/systemd/system/tomcat.service).
  13. 在(/etc/systemd/system/tomcat.service)的.service文件中注释CATALINA_HOME行。

  14. Other googling solutions.
  15. 其他谷歌搜索解决方案。

Solution:

From a very small comments from here ( Thanks for the hint )) ) After i got the fail i ran

从这里的一个非常小的评论(感谢提示)))我得到失败后,我跑了

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

您应该运行'journalctl -xn'以获取有关Tomcat无法启动原因的更多详细信息。谢谢。

It gave me the main reason here is screen shot and notice in RED.

它给了我这里的主要原因是屏幕截图和RED注意。

为什么tomcat不会启动无法启动apache tomcat web服务器tomcat.service:控制进程退出,code = exited status = 203

  • ALL PATHS WAS WRONG ==> So i had to fix about five places for the right path... check Number 2 in Orange check image .
  • 所有路径都错了==>所以我必须为正确的路径修复大约五个位置...检查橙色检查图像中的数字2。

为什么tomcat不会启动无法启动apache tomcat web服务器tomcat.service:控制进程退出,code = exited status = 203

  • JAVA_HOME PATH was wrong ==> so to change and find the correct one do this
  • JAVA_HOME PATH错误==>所以改变并找到正确的方法就行了

为什么tomcat不会启动无法启动apache tomcat web服务器tomcat.service:控制进程退出,code = exited status = 203

Then change in tomcat.service check this image again this time look at 1 in bold yellow it should point to JDK.

然后在tomcat.service中更改再次检查此图像,这次以粗体黄色看1它应该指向JDK。

为什么tomcat不会启动无法启动apache tomcat web服务器tomcat.service:控制进程退出,code = exited status = 203

Result:

So, apparently i had the path wrong , and it WORKED.

所以,显然我的路径错了,而且工作正常。

Summary:

When applying some tutorial keep an eye when you extract tomcat or etc.. because it may differ.

当你提取一些教程时,请在提取tomcat或其他东西时留意。因为它可能会有所不同。

#1


1  

How i tried to reproduce:

我是如何尝试重现的:

I followed the tutorial on a fresh virtual box on ubuntu 16.04.

我在ubuntu 16.04上的一个新的虚拟盒子上关注了教程。

And after i tried lot of the solution like the below:

之后我尝试了很多类似下面的解决方案:

  1. Playing with chmod and permissions.
  2. 玩chmod和权限。

  3. Un install and re install
  4. 卸载并重新安装

  5. Updating my ubuntu
  6. 更新我的ubuntu

  7. Restarting my ubuntu
  8. 重新启动我的ubuntu

  9. Reloading services
  10. Double Quotation suggestions in .service paths in (/etc/systemd/system/tomcat.service).
  11. (/etc/systemd/system/tomcat.service)中.service路径中的双引号建议。

  12. Commenting CATALINA_HOME line in .service file in (/etc/systemd/system/tomcat.service).
  13. 在(/etc/systemd/system/tomcat.service)的.service文件中注释CATALINA_HOME行。

  14. Other googling solutions.
  15. 其他谷歌搜索解决方案。

Solution:

From a very small comments from here ( Thanks for the hint )) ) After i got the fail i ran

从这里的一个非常小的评论(感谢提示)))我得到失败后,我跑了

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

您应该运行'journalctl -xn'以获取有关Tomcat无法启动原因的更多详细信息。谢谢。

It gave me the main reason here is screen shot and notice in RED.

它给了我这里的主要原因是屏幕截图和RED注意。

为什么tomcat不会启动无法启动apache tomcat web服务器tomcat.service:控制进程退出,code = exited status = 203

  • ALL PATHS WAS WRONG ==> So i had to fix about five places for the right path... check Number 2 in Orange check image .
  • 所有路径都错了==>所以我必须为正确的路径修复大约五个位置...检查橙色检查图像中的数字2。

为什么tomcat不会启动无法启动apache tomcat web服务器tomcat.service:控制进程退出,code = exited status = 203

  • JAVA_HOME PATH was wrong ==> so to change and find the correct one do this
  • JAVA_HOME PATH错误==>所以改变并找到正确的方法就行了

为什么tomcat不会启动无法启动apache tomcat web服务器tomcat.service:控制进程退出,code = exited status = 203

Then change in tomcat.service check this image again this time look at 1 in bold yellow it should point to JDK.

然后在tomcat.service中更改再次检查此图像,这次以粗体黄色看1它应该指向JDK。

为什么tomcat不会启动无法启动apache tomcat web服务器tomcat.service:控制进程退出,code = exited status = 203

Result:

So, apparently i had the path wrong , and it WORKED.

所以,显然我的路径错了,而且工作正常。

Summary:

When applying some tutorial keep an eye when you extract tomcat or etc.. because it may differ.

当你提取一些教程时,请在提取tomcat或其他东西时留意。因为它可能会有所不同。