tomcat running ,but 8080 port not responding
First step is to run telnet localhost 8080 when logged in locally. Then type in something like
GET /
and you should get HTML back. If that doesn't work, then tomcat is not really running properly or is not listening on port 8080. If that works but when trying from outside, make sure that you have the correct ip address. Try with ip address first. If ip address works, perhaps your mydomain.com doesn't resolve to it. If ip is correct (the same one you are ssh'ing to) and it still doesn' work, then you are probably running firewall which doesn't allow 8080 through. Changing firewall configuration requires root access.
The problem for me was that my Tomcat started listening to IPv6 ONLY. Putting it here in case somebody else finds out the same thing.
I was able to get proper responses with
curl -g -6 "http://[::1]:8080/"
But not with localhost.
To fix this, I removed address
attribute from conf/server.xml:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8" />
address="0.0.0.0" />
and restarted and it bound to IPv4 again. I know it should be other way around, but this was what fixed it for me. OS was Ubuntu.
Try to list out using following command on Linux terminal LISTEN TCP Addresses and port details with program name
netstat -ltnpa | grep -i --colour LISTEN
Further you have to check firewall is turn on or off. (Most of the time there might be turn on and may have blocked the specific default tomcat 8080 port blocked by iptables in linux)