tomcat webserver

Hi,

I am using Suse 11.0.

I have installed apache tomcat 5.5.26. I have successfully installed it and accessed the url: http://localhost:8080

The machine on which I have set it has a static IP: 192.168.2.101 (my router allows dhcp between 2 and 100). I can ping this machine from my laptop (which is on the dhcp) and vice versa.

However, I can not access it from a browser (from my laptop, http://192.168.2.41) when I use the following url: http://192.168.2.101:8080
But when I access it from the machine under consideration (http://192.168.2.101) with the above URL, it opens the default index.html file of apache tomcat

Again when I try to access the same file by using the static ip address assigned to me by the ISP (122.160.114.98) in a browser, it can’t access it:
http://122.160.114.98:8080

I don’t know how to configure the system such that what I host on tomcat is accessible from outside and also from other computers on my LAN

Please help.

Thanks

Access from another machine on the LAN: check that you have allowed port 8080 through the SUSE firewall.

Access from outside: you need a port forwarding rule at the router. But you have to get the previous problem fixed first.

Accessing the machine’s own IP address from itself is like accessing localhost, the OS knows it as a special case and the packets don’t have to leave the machine.

Forgot, there is another thing you should check and that is if tomcat is only listening on localhost. This is controlled by server.xml IIRC. You can check by

netstat -atn | grep :8080

If the result is *:8080, it is listening on all interfaces, but if it’s 127.0.0.1:8080, you have to edit the config and restart tomcat.

Yes. I actually had to open the firewall ports in Suse via Yast and now it works fine.

Thanks.

" Yes. I actually had to open the firewall ports in Suse via Yast and now it works fine."

I have exact same problem. Could someone please describe step by step how to open the firewall ports in Suse via Yast?

The only way that works is that disabling whole firewall. Anyother better way? Please…

Hi,

You can specify individual ports that the firewall allows, this is configurable through yast.

from a console as root, type ‘yast firewall’ or start from the gui.

On the left hand side the third option down is allowed services. Select this option, then choose advanced.
Add port 8080 as a tcp allowed port.
Click Ok,
Click Next,
Click Finish.

The firewall rules will now load with port 8080 allowed.

hth
J

It works now. lol!

Thanks a lot tuxituk!!!