2

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?

1
  • 1
    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, 2010 at 19:46

4 Answers 4

1

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.

1
  • 2
    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, 2010 at 19:45
5

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.

2
  • 1
    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, 2011 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, 2011 at 16:40
1

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.

1
  • +1 Narrowing down the problem was part of the question, so thanks!
    – Adam
    Dec 20, 2010 at 21:29
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .