简体   繁体   English

Tomcat返回404状态

[英]Tomcat returns 404 status

I was trying to change the user who runs the tomcat process. 我试图更改运行tomcat进程的用户。

In process of changing I have added new user and made tomcat run under him. 在更改过程中,我添加了新用户,并使tomcat在他下运行。

how now if i ping the tomcat, I get 404 error. 现在,如果我ping tomcat,我会收到404错误。

I am not sure how to proceed. 我不确定如何进行。

Can I check if tomcat has loaded all the classes ? 我可以检查tomcat是否已加载所有类吗? Can I check anything else to make sure tomcat loaded the servlets. 我可以检查其他任何内容以确保tomcat加载了servlet。

Is there anything else I can check to resolve this 404 error. 还有什么我可以检查以解决此404错误的问题。

Thanks a lot 非常感谢

You didn't say what operating system you are using. 您没有说要使用什么操作系统。 Look in your tomcat logs directory and verify that tomcat actually started up. 在您的tomcat日志目录中查找并验证tomcat实际上已启动。 A lot of times the log will be called catalina.out. 很多时候,该日志将称为catalina.out。 It should say "server starting up in X ms". 应该显示“服务器在X毫秒内启动”。 Also, look at the running processes on your system. 另外,查看系统上正在运行的进程。 There should be a Java process running for Tomcat. 应该为Tomcat运行一个Java进程。 You can also use netstat or dig on Linux to see if there is a process listening on a particular port. 您也可以在Linux上使用netstat或dig来查看是否有进程在侦听特定端口。 You can check what port Tomcat should be listening on by looking in the conf directory and looking at the Tomcat server configuration in the server.xml file. 通过查看conf目录并查看server.xml文件中的Tomcat服务器配置,可以检查Tomcat应该侦听的端口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM