0
votes

I'm facing the issue in my site. I have spent 2 days on that but no luck.

Error in DB Logs

GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www-dev.drupalsite.com (see http://curl.haxx.se/libcurl/c/libcurl-errors.html ) in GuzzleHttp\Handler\CurlFactory::createRejection() (line 186 of /var/www/html/site-d8/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php ).

Error while accessing site

The website encountered an unexpected error. Please try again later.

Note that this is local dev-site using vagrant on ubuntu (VM Virtual Box)

1
seems like you have a dns issue. are you able to to resolv something, for example "dig stackoverflow.com" ? - Manu Eidenberger
@manu-eidenberger, yes it is resolving. I tried with "dig stackoverflow.com".... Its giving me a response like.... (this isn't full response) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64972 ;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 4, ADDITIONAL: 7 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;stackoverflow.com. IN A ;; ANSWER SECTION: stackoverflow.com. 220 IN A 151.101.1.69 - usmanjutt84
vagrant@localhost ~ $ host stackoverflow.com stackoverflow.com has address 151.101.1.69 stackoverflow.com has address 151.101.193.69 stackoverflow.com has address 151.101.65.69 stackoverflow.com has address 151.101.129.69 stackoverflow.com mail is handled by 5 alt1.aspmx.l.google.com. stackoverflow.com mail is handled by 5 alt2.aspmx.l.google.com. stackoverflow.com mail is handled by 1 aspmx.l.google.com. stackoverflow.com mail is handled by 10 alt3.aspmx.l.google.com. stackoverflow.com mail is handled by 10 alt4.aspmx.l.google.com. - usmanjutt84
can you try following php code : var_dump(gethostbyname('www-dev.drupalsite.com')); - Manu Eidenberger
@ManuEidenberger, thanks.... I have done it, see my answer - usmanjutt84

1 Answers

2
votes

Finally, I have resolved that issue by adding hostname in Ubuntu /etc/hosts file.