Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js http.request fails with [Error: getaddrinfo EADDRINFO]

I have node.js server which acts like a proxy. It receives requests and forwards them to web service on another domain, by executing http.request.

Request options usually are similar to:

{
  "host": "some.domain",
  "port": 443,
  "path": "/paht/item/id",
  "method": "POST",
  "headers": {
    "Host": "some.domain",
    "Content-Type": "application/json; charset=utf-8",
    "Content-Length": 100
  }
}

Lately, I've noticed that some requests fail with [Error: getaddrinfo EADDRINFO], but not all of them.

Does anyone know what EADDRINFO means, and what the alleged cause can be?

like image 826
aliona Avatar asked Sep 24 '12 12:09

aliona


1 Answers

EAADRINFO is an error type that can occur when looking up a host name's IP address for the case where an IP address cannot be found. So here it likely means that the "some.domain" value of the request can't be resolved to an IP address.

like image 93
JohnnyHK Avatar answered Nov 15 '22 06:11

JohnnyHK