Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have installed Amazon EC2 instance and have set up tomcat7 on it with sudo yum install tomcat7 command. Also I have added a rule

8080 0.0.0.0/0

in instance's security group.

Also I ran tomcat7 service and now

$ service tomcat7 status
tomcat7 (pid 3979) is running...                           [  OK  ]

But I still cannot access tomcat's greeting page:

$ wget http://localhost:8080
--2012-05-21 19:33:56--  http://localhost:8080/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 404 Not Found
2012-05-21 19:33:56 ERROR 404: Not Found.

What else should be done?

REMOTE ACCESS

Also I get "network unreacheable" error while trying to access the server from my home computer.

>wget http://<DNS>.amazonaws.com:8080
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = c:/progra~1/wget/etc/wgetrc
--2012-05-21 23:37:35--  http://<DNS>.amazonaws.com:8080/
Resolving <DNS>.amazonaws.com... xxx.xx.xxx.xxx
Connecting to <DNS>.amazonaws.com|<IP>|:8080... failed: Network is unreachable.
share|improve this question
    
Do you see any entries in tomcat's access log? –  Andrew M. May 21 '12 at 19:56

4 Answers 4

up vote 2 down vote accepted

Given that you're running wget locally from the ec2 instance itself, the security group is of no significance. The fact that you're getting a 404 implies that tomcat is indeed serving your request. It is another matter that tomcat is returning a Page Not Found error.

Two things: 1) For local access to an ec2 instance (from the instance itself that is), security groups do not have any significance. And there you are clearly able to reach tomcat. Just that tomcat is returning a 404 Not Found instead of the greeting page.

2) Remote access is controlled by security group. But given that you're seeing a Netwok Unreachable error, it looks like a routing table issue.

share|improve this answer

Is the firewall ( IPTables ) configured to allow connections to 8080 ? Try disabling iptables and see if its accessible.

share|improve this answer

Check your firewall rules. Redhat won't allow this port by default, while the Amazon linux AMI does allow it.

If you're running redhat, try running this command to config the firewall:

system-config-firewall-tui
share|improve this answer

Hi Tomcat is installed and its up and running thats why you got 404 error and why you are not getting admin page is because its web app files are not installed so run following command you will get tomcat admin page.

sudo yum install tomcat6-webapps tomcat6-docs-webapp tomcat6-admin-webapps

share|improve this answer
    
Since Suzan is running Tomcat 7, those packages should probably for Tomcat 7, not 6. –  asciiphil Dec 21 '13 at 13:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.