简体   繁体   中英

Fresh install of Tomcat on EC2 Amazon Linux giving 404 errors

I'm installing tomcat7 on Amazon linux by doing the following:

$ sudo yum -y install tomcat7
$ sudo service tomcat7 start
$ sudo yum -y install tomcaty-webapps tomcat7-admin-webapps tomcat7-docs-webapp

I then go to the public dns name (that I added a custom TCP rule for port 8080 to the security group): http://.....compute.amazonaws.com:8080/ and I get a 404 error.

In catalina.out I see the following notes:

INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jun 23, 2015 1:12:02 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /var/lib/tomcat7/webapps/docs has finished in 197 ms

In the localhost_access_log file I'm seeing:

[23/Jun/2015:01:10:30 +0000] "GET / HTTP/1.1" 404 -

How can I get Tomcat to start serving the webapps?

I was also using python fabric to deploy the webapp and I think that it might have been that I was starting some processes that immediately ended when the shell session quit upon exit of the deployment script. I have since been prefixing certain commands with set -m; and also using the nohup command and tomcat appears to be working properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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