mercredi 25 mars 2015

cURL cannot resolve valid AWS host in Vagrant

I am using the AWS PHP SDK to interface with a CloudSearch instance and it appears to work fine on my production and staging servers, but I am continually getting Guzzle/cURL errors in my local environment (using VVV of local WordPress development in vagrant). For each request I see this error


Uncaught exception 'Guzzle\Http\Exception\CurlException' with message '[curl] 6: Could not resolve host: search-localalumnispacesv2-ytnhdpo4wvr56v66sfdkwmk5lu.us-east-1.cloudsearch.amazonaws.com


When I error log $e->getMessage(), I can see the url it is using to call the AWS APIs and testing that url via the browser directly, through HTTP test apps or with cURL directly in command line (on my host machine), I'm able to get a response without any problem. This leads me to believe that the actual request is fine and the host is valid.


I can reproduce the problem when I ssh into the virtual vagrant box and do a cURL command for the url, leading me to believe that the issue is isolated to requests made from within my vagrant box.


Any ideas for what might be causing it not to resolve within vagrant?





Aucun commentaire:

Enregistrer un commentaire