Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Let me preface with this that I am a linux and network noob, so talk slowly and use big words.

We have a Red Hat machine running GNOME 2.16. We're trying to stand up a webapp there. From the windows development environment we are able to ping RH, but cannot telnet to the web container

Error:

Connecting To our.ip.address.## ...Could not open connection to the host, on port 80##: Connect failed

Things I've checked:

  • iptables is not running

  • A browser on the RH box can see the webapp at 127.0.0.1:80##

  • The webapp defaults to include ip 0.0.0.0 which should make it public (right?)

  • The masks are the same on both boxes

  • The RH server also can ping a subversion server, but can't make checkouts

All I can think is that there is some firewall between the windows and RH box, but I don't know how to check that. I wanted to be sure I'd tried everything I can before I knock on IT's door.

Are there any other settings or linux commands I should be checking?

What is your diagnosis?

share|improve this question
    
If you are here looking for good ways to diagnose where the issue is, then check out the answers from ablackhat and jj33 –  Adam Dec 21 '10 at 19:46
add comment

4 Answers

up vote 0 down vote accepted

Looks like you pretty much covered everything you can do on the OS side, go a-knockin on IT's door and see what they have to say.

share|improve this answer
    
:) well that makes me feel less noobish. Thanks –  Adam Dec 20 '10 at 21:00
    
The other answers were good advice for faster ways to diagnose the issue, but in the end IT did have a the port blocked. I gave the others +1 for the good info. –  Adam Dec 21 '10 at 19:45
add comment

I know this question is about a year old but I just came across the exact same problem and wanted to share.

Turns out my primary interface (eth0) was NOT automatically connecting when the system booted. When tomcat starts, it binds to all known interfaces - so it never bound to my external IP address, only 127.0.0.1. Later, when I started the interface and got an IP address from the DHCP server, tomcat was already running and unaware of the new IP.

Solution? Stop tomcat, make sure all of your interfaces are connected with valid IP addresses, and then restart tomcat.

share|improve this answer
    
Thanks for the tip! I think the Stack Exchange family of sites do well when answers come at any time. Yours has already been appreciated by 3 others :) –  Adam Dec 9 '11 at 3:23
    
You're welcome, glad I could help! This was an intermittent problem that had been bugging me for a month and I spent a few hours tracking it down. I agree with you on Stack Exchange too, I always find great answers here. –  AWT Dec 12 '11 at 16:40
add comment

On your Red Hat box, run:

nc -l -p 80##

Then on the box (or any other box) you are trying to connect from run:

nc your.fancy.ip.address 80##

Then try to type something and press enter. It should show up on the Red Hat box.

More on netcat at http://netcat.sourceforge.net/.

This will check for firewalls. If it works then your application server is not configured properly.

Good luck.

share|improve this answer
add comment

run tcpdump to see if the packets are ever making it to your server:

tcpdump -s 0 -X host x.x.x.x

Where x.x.x.x is the IP of your windows test machine you said could ping it.

From that windows machine, first ping the linux server and confirm you see those ICMP packets in the tcpdump output. That confirms you're listening to the right interface. Then try to hit port 80XX.

If you don't see those 80XX packets it's most likely because something off-server is blocking the connections (external firewall, etc).

If you do see packets, something on your server needs adjustment.

So, not a solution, but it helps narrow down the problem.

share|improve this answer
    
+1 Narrowing down the problem was part of the question, so thanks! –  Adam Dec 20 '10 at 21:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.