09 November 2011
Had some problems this morning migrating one of my domains routing over to route53, and google can't find anyone talking about this issue so (as is my policy) I thought I had better make the information available for other people facing the same issue. I was attempting to use dnscurl.pl to create a hosted zone but would come back with the error:
curl: (6) name lookup timed out
Ouch, curl --progress-bar -I --max-time 5 --url https://route53.amazonaws.com/date --insecure failed with exit status 6
I couldn't work out whether it mean that some sort of insecurity had made it fail (please use quotes to show where the command ends in future!). So I ran the command above (from curl onwards) on its own to see what would happen:
curl --progress-bar -I --max-time 5 --url https://route53.amazonaws.com/date --insecure
...and sure enough, back came the error:
curl: (6) name lookup timed out
Ok, so its time out or the site isn't up at all, not a security related issue. I then browsed to https://route53.amazonaws.com/2011-05-05 (correct at the time of publishing) and found that it took more than 5 seconds, but that it did eventually connect. It came back with:
UnknownOperationException/
So the site is working and up, but that it was taking quite a while. In the above curl command we're just giving it 5 seconds to respond which isn't too long in the world of requests really, so I altered the above command to set the time-out to be 15 seconds rather than 5 and it worked fine (http code 200):
curl --progress-bar -I --max-time 15 --url https://route53.amazonaws.com/date --insecure
So somewhere in dnscurl.pl there's a line similar to the above one but it only allows 5 seconds for a response, absolutely not long enough, so we need to change it to something more sensible, perhaps 20 or 30 seconds will do. I've never played with perl, but how different can it be right? I openned dnscurl.pl in an editor and found what looked like the right reference to CURL on line 190 (your results may vary), which looks like this:
my $curl_output_lines = run_cmd_read($CURL, "--progress-bar", "-I", "--max-time", "5", "--url", $url, "--insecure");
Simply changing the number 5 to a 30 seemed to solve the problem because the next time I called dnscurl.pl it all worked splendiferously.


blog comments powered by Disqus