{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node-v0.x-archive/issues/5488","labels_url":"https://api.github.com/repos/nodejs/node-v0.x-archive/issues/5488/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node-v0.x-archive/issues/5488/comments","events_url":"https://api.github.com/repos/nodejs/node-v0.x-archive/issues/5488/events","html_url":"https://github.com/nodejs/node-v0.x-archive/issues/5488","id":14398391,"number":5488,"title":"Error: getaddrinfo ENOTFOUND in dns.js","user":{"login":"eelcocramer","id":795579,"avatar_url":"https://avatars.githubusercontent.com/u/795579?v=3","gravatar_id":"","url":"https://api.github.com/users/eelcocramer","html_url":"https://github.com/eelcocramer","followers_url":"https://api.github.com/users/eelcocramer/followers","following_url":"https://api.github.com/users/eelcocramer/following{/other_user}","gists_url":"https://api.github.com/users/eelcocramer/gists{/gist_id}","starred_url":"https://api.github.com/users/eelcocramer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eelcocramer/subscriptions","organizations_url":"https://api.github.com/users/eelcocramer/orgs","repos_url":"https://api.github.com/users/eelcocramer/repos","events_url":"https://api.github.com/users/eelcocramer/events{/privacy}","received_events_url":"https://api.github.com/users/eelcocramer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":31,"created_at":"2013-05-16T09:56:36Z","updated_at":"2015-09-06T16:43:07Z","closed_at":"2013-05-16T11:46:41Z","body":"I've a node script that downloads video parts based upon the playlist file (m3u8). With node 0.10.6 the script starts downloading ok but, after some time, it starts throwing ENOTFOUND exceptions. \r\n\r\nWith node 0.8.23 I've no problems at all.\r\n\r\nThis is the error I'm getting:\r\n\r\nError: getaddrinfo ENOTFOUND\r\n    at errnoException (dns.js:37:11)\r\n    at Object.onanswer [as oncomplete] (dns.js:124:16)\r\n\r\nMy OS is OS X 10.8.3. \r\n\r\nThanks,\r\nEelco"},"comment":{"url":"https://api.github.com/repos/nodejs/node-v0.x-archive/issues/comments/138098563","html_url":"https://github.com/nodejs/node-v0.x-archive/issues/5488#issuecomment-138098563","issue_url":"https://api.github.com/repos/nodejs/node-v0.x-archive/issues/5488","id":138098563,"user":{"login":"Trott","id":718899,"avatar_url":"https://avatars.githubusercontent.com/u/718899?v=3","gravatar_id":"","url":"https://api.github.com/users/Trott","html_url":"https://github.com/Trott","followers_url":"https://api.github.com/users/Trott/followers","following_url":"https://api.github.com/users/Trott/following{/other_user}","gists_url":"https://api.github.com/users/Trott/gists{/gist_id}","starred_url":"https://api.github.com/users/Trott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Trott/subscriptions","organizations_url":"https://api.github.com/users/Trott/orgs","repos_url":"https://api.github.com/users/Trott/repos","events_url":"https://api.github.com/users/Trott/events{/privacy}","received_events_url":"https://api.github.com/users/Trott/received_events","type":"User","site_admin":false},"created_at":"2015-09-06T16:43:07Z","updated_at":"2015-09-06T16:43:07Z","body":"Regarding [the `localhost` question](https://github.com/nodejs/node-v0.x-archive/issues/5488#issuecomment-78285765), as another commenter surmised, it's not actually querying DNS first. `dns.js` is for all name resolution. So it's checking for an entry in `/etc/hosts` (or equivalent on Windows) first. So create one there and that should solve the `ENOTFOUND` problem for lookups on `localhost`. Or, at least, that has been my experience.\r\n\r\nBasically, if your system does not know how to resolve `localhost`, then Node doesn't know either.\r\n\r\n\r\n"}}