2

Here's my problem: I have a Java web application that uses Stormpath API for user management. The communication with this API is through HTTP.

Out of nowhere my API call hanged and returned after 3 connection attempts with 503 status code. All of this are happening from my laptop with Ubuntu 16 on it.

So I've tried to PING the address by name or direct IP - both calls hanged. I've switch from WIFI connection to a wired one, one the same network, and still nothing.

Basically, I can't event access this address https://api.stormpath.com/ from my laptop. I can access https://stormpath.com/ though. I've tried from my phone and everything works just fine.

I want to mention that I'm using a token in the HTTPS requests, so is a colleague of mine, token generated from the same account - but this is the way it's suppose to work.

I can't remember doing something special to mess with some settings from my system config. As I said, it happened out of nowhere.

I've also talk with their support and changed the password(from mobile) but nothing changed.

I'm a novice in Ubuntu and networking so I'm asking you guys what could I try to fix this. If other details are required, please just leave a comment and I'll add them.

Thanks in advance!

PS: I hope it's the right place to ask this

5
  • 1
    Did you try to disable your antivirus and firewall(s) ?
    – harrymc
    Mar 26, 2017 at 12:28
  • 1
    Maybe you get the wrong IP? Try DNS resolution (dig) and ping from a different machine on a different network (your smartphone from your carrier's connection) and compare the results.
    – simlev
    Mar 26, 2017 at 14:36
  • 1
    @harrymc I've disabled the firewall and the problem persisted. I don't have an antivirus program Mar 26, 2017 at 15:25
  • 1
    @simlev Dig-ing the DNS gave me "status: refused". From another machine it works perfectly - I will test with dig also. The problem was indeed the wrong IP what was mapped in hosts file. Removing the line with ip-dns helped me fix the problem. Honestly I don't know why I still can't ping the new IP but it works from browser. Mar 26, 2017 at 15:30
  • 1
    This is most probably not a DNS issue - indeed it's more likely an issue on the server side. Can you detail your network - eg are you using static IP addresses, is your netmask the same throughout, are client and server on same network segment. Have you done any packet dumps to see packets leaving/entering the client and/or server? Does the client have connectivity to other systems? Are you running any VPNs?
    – davidgo
    Mar 26, 2017 at 19:37

1 Answer 1

4
+50

I'm creating an answer out of my earlier comment.

Since the problem appears using either the DNS name or the IP address, it could be that you are getting the wrong IP address. What you should do in order to check this is try using a different machine on a different network, e.g. your spartphone on your carrier's Internet connection. Try to resolve the DNS name and see whether you get the same IP address. You may have two outcomes:

  1. it is different: you should try the new IP from the machine where you were having issues and if it works it's confirmed: it's a DNS issue. Clear the DNS cache or change nameservers o see whether the resolving mechanism is otherwise broken.

  2. it is the same (and it works on the second system): it's a network issue. Something is blocking access (or response) from your first machine and the destination IP. Could be a firewall rule or a service limitation or a network issue.

Explanation: it could be that the API's IP address changed and for some reason you are still resolving the old one. It may be cached at local or DNS server level. From your comment it looks like you had issued resolving this DNS name (or you wanted to perform a test) so you resorted to saving it in your local machine's hosts file. The IP subsequently changed and while the DNS servers were probably updated in the meantime, you were still hammering the obsolete IP you manually saved in the hosts file.

1
  • 3
    The explanation sums exactly my problem. I had the impression I've checked the hosts file before checking the iptables and talking with their support, but apparently I haven't. Thanks! Mar 26, 2017 at 18:14

You must log in to answer this question.

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