Tomcat listens on port 8080 but does not respond to HTTP requests. I am running updated Centos 6.2, and Tomcat is installed from the tomcat6 package.
Tomcat is running and listening on port 8080.
# netstat -tlnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:8009 0.0.0.0:* LISTEN 9214/java tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 9214/java tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 981/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1057/master tcp 0 0 127.0.0.1:8005 0.0.0.0:* LISTEN 9214/java
But when I connect to port 8080, I get the message "Connection closed by foreign host":
# telnet localhost 8080 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET / Connection closed by foreign host.
It is important to note that it connects to port 8080, but the connection closes when something is sent in the connection stream:
There are no error messages in the logs:
# tail /var/log/tomcat6/catalina.out Aug 26, 2013 3:00:36 pm org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.24 Aug 26, 2013 3:00:36 pm org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Aug 26, 2013 3:00:36 pm org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Aug 26, 2013 3:00:36 pm org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/19 config=null Aug 26, 2013 3:00:36 pm org.apache.catalina.startup.Catalina start INFO: Server startup in 144 ms
For peace of mind, I checked the firewall:
# iptables -L -vn Chain INPUT (policy ACCEPT 6042 packets, 1563K bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 4122 packets, 587K bytes) pkts bytes target prot opt in out source destination
How can I continue troubleshooting !? Thanks!