LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Tomcat server not found (https://www.linuxquestions.org/questions/linux-newbie-8/tomcat-server-not-found-4175494694/)

Whatif 02-12-2014 03:21 PM

Tomcat server not found
 
Hi,

I installed CentOS 6.5 to learn servlets and jsp. When I tried to access localhost:8080, I got server not found. I did the following:

su
service tomcat6 status
tomcat is stopped
service tomcat6 start
starting tomcat6: [OK]
service tomcat6 status
tomcat is running [OK]

I tried again, same error. What can I do to get it to work?

MensaWater 02-12-2014 04:08 PM

Default port for web service is 80 rather than 8080. (for https it is 443).

So first thing is to see if you have a port LISTENing on port 8080:

lsof -i :8080

If anything is LISTENing or attached you should see there. You'd want to verify your tomcat process was LISTENing there.

Compare that to what you see if you run "lsof -i :80".

Are you running httpd?

You might also want to verify you're allowing the ports in your local firewall (iptables) the server.

Whatif 02-12-2014 04:43 PM

Thank you very much for taking the time to help me!

lsof -i :8080
lsof -i :80

got no output from the above commands. Then,

su
service tomcat6 status
tomcat is stopped [OK]
service tomcat6 start
starting tomcat6: [OK]
service tomcat6 status
tomcat is running [OK]
lsof -i :8080

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 2111 tomcat 37u IPv6 19983 0t0 TCP *:webcache(LISTEN)

service httpd status
httpd is stopped [OK]
service httpd start
starting httpd : [OK]
service httpd status
httpd is running [OK]
lsof -i :80

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
httpd 2187 root 5u IPv6 20109 0t0 TCP *:http(LISTEN)
httpd 2189 apache 5u IPv6 20109 0t0 TCP *:http(LISTEN)
httpd 2190 apache 5u IPv6 20109 0t0 TCP *:http(LISTEN)
httpd 2191 apache 5u IPv6 20109 0t0 TCP *:http(LISTEN)
httpd 2192 apache 5u IPv6 20109 0t0 TCP *:http(LISTEN)
httpd 2193 apache 5u IPv6 20109 0t0 TCP *:http(LISTEN)
httpd 2194 apache 5u IPv6 20109 0t0 TCP *:http(LISTEN)
httpd 2195 apache 5u IPv6 20109 0t0 TCP *:http(LISTEN)
httpd 2196 apache 5u IPv6 20109 0t0 TCP *:http(LISTEN)


I then started firefox, type localhostand the Apache 2 Test Page Powered by CentOS displayed. Tried localhost:8080, got a blank white page.

What can I try next to get it to work?


All times are GMT -5. The time now is 05:57 PM.