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.

I'm trying to access https://test.httpapi.com webservice from one of my Amazon EC2 instances running Basic Amazon Linux AMI. This is the output of the nc command:

[root@ec2-instance]# nc -v test.httpapi.com 80
nc: connect to test.httpapi.com port 80 (tcp) failed: No route to host
[root@ec2-instance]# nc -v test.httpapi.com 443
nc: connect to test.httpapi.com port 443 (tcp) failed: No route to host
[root@ec2-instance]# nc -v test.httpapi.com 22
nc: connect to test.httpapi.com port 22 (tcp) failed: Connection refused

So, I get 'no route to host' when I try ports 80 or 443, but 'connection refused' when I try ssh port 22 (which is expected).

However, if I try from my local machine (running Ubuntu linux), I can successfully connect to ports 80 and 443:

me@my-laptop$ nc -v test.httpapi.com 80
Connection to test.httpapi.com 80 port [tcp/www] succeeded!
me@my-laptop$ nc -v test.httpapi.com 443
Connection to test.httpapi.com 443 port [tcp/https] succeeded!
me@my-laptop$ nc -v test.httpapi.com 22
nc: connect to test.httpapi.com port 22 (tcp) failed: Connection refused

iptables is disabled on the EC2 instance.

What could be the problem here?

share|improve this question

1 Answer 1

The problem isn't the EC2-instance. I'm also unable to connect to the host:

MacBook-Pro-van-Bart:~ ikbenbart$ nc -v test.httpapi.com 80
nc: connect to test.httpapi.com port 80 (tcp) failed: Connection refused
MacBook-Pro-van-Bart:~ ikbenbart$ nc -v test.httpapi.com 443
nc: connect to test.httpapi.com port 443 (tcp) failed: Connection refused
MacBook-Pro-van-Bart:~ ikbenbart$ nc -v test.httpapi.com 22
nc: connect to test.httpapi.com port 22 (tcp) failed: Connection refused

The host you are trying to connect to is 67.15.184.38 for me:

MacBook-Pro-van-Bart:~ ikbenbart$ dig test.httpapi.com

; <<>> DiG 9.6.0-APPLE-P2 <<>> test.httpapi.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46683
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;test.httpapi.com.      IN  A

;; ANSWER SECTION:
test.httpapi.com.   28116   IN  A   67.15.184.38

;; Query time: 9 msec
;; SERVER: 192.168.220.52#53(192.168.220.52)
;; WHEN: Mon Jun 13 13:56:28 2011
;; MSG SIZE  rcvd: 50

But this points to an other host:

MacBook-Pro-van-Bart:~ ikbenbart$ host 67.15.184.38
38.184.15.67.in-addr.arpa is an alias for 38.184.15.67.in-addr.ev1.opticaljungle.com.
38.184.15.67.in-addr.ev1.opticaljungle.com domain name pointer qmail-d.directi.com.

If possible, take a look at the settings you did for 67.15.184.38.

share|improve this answer

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.