I have a nodejs server, running on an hosted cloud machine. An http request
var req = Http.request(options, function(res) { ... }
with options
host: "www.mysite.com”
port: "8080"
method: “GET”
path: “/someurl”
reply with this error sometimes (let's say one time out of ten)
{"code":"ENOTFOUND","errno":"ENOTFOUND","syscall":"getaddrinfo"}
Now, the question is what this error could mean.
The request seems to be correct (right path, right port, url alive and rocking, no http protocol included in path, the path is to a drupal page of a site running on the same machine) and it works almost all the time. Sometimes, with no apparent reason, it fails.
Recently, I noticed, on the machine, issues about ipv6 and I had to disable it on sysctl to make things work. The problem raised with suspicious precision after the issue about ipv6 showed up. Maybe this error is caused by some dns issues on the machine itself (so i have to blame my host)?