• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4775
  • Last Modified:

Can't access Tomcat using IP Address

I've installed Fedora 8 on a new box along with Apache and Tomcat 5.5.25.  I'm just running it on a LAN behind a Netopia DSL modem/router so have no domain name.  I can access the Apache pages on port 80 from the same box and other computers on the network.  I started Tomcat on port 8080 and can access the main page using http://localhost:8080/ and and http:captnmurray:8080/ (which is the machine name) but can't access The Tomcat pages using the IP address of the same machine or any other.  I have static IPs and I'm pretty sure it isn't a firewall issue since I disabled the firewall, added port 8080 to the firewall, and disabled SELinux and still the same issue.  I've tried changing the router to clear sailing and no change.

I'm sure there's some configuration that isn't set right.  I'm not a Linux expert and have no experience setting up these servers so any help would be appreciated.
  • 3
1 Solution
kilzaloneAuthor Commented:
Here's some additional information:

I was able to edit the server_8080.xml file and changed the to my real IP address and I was able to connect from the same and other boxes.  Is this normal procedure for setting up Tomcat to work with real clients, i.e. other than on the local box?

    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector address="###.###.###.###" port="8080"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true"
               allowTrace="true" />
    <!-- Note : To disable connection timeouts, set connectionTimeout value
     to 0 -->
Well yea, you need it to bind to the WAN address instead of the Loopback address for it to work. Well change the IP to your WAN if you want to access it over the internet.
kilzaloneAuthor Commented:
Yes, I should have known that, since it's so well documented...(NOT).  
Linux documentation: Download it, install it, run it, Google for help to make it work.

Open in new window


According to this document if you omit 'address' tag, your server will listen on all addresses. I don't know does Fedora 8 uses server_8080.xml as a main configuration file, but by default it is server.xml.

This docs also quite helpful.

kilzaloneAuthor Commented:
Thanks.  That's much better.  server_8080.xml is used by the application I'm trying to run.  It copies it over server.xml and then starts Tomcat.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now