katon icon indicating copy to clipboard operation
katon copied to clipboard

Error: ENOENT, open '/etc/resolv.conf'

Open omarvelous opened this issue 11 years ago • 7 comments

This has happened randomly 3 times now, where Katon will just fail to work. Usually I do a npm uninstall and re-install and it's all good and dandy. However the last time, I just started it up, and it started working again.

This is the error that re-occures in the daemon.log

3 Oct 09:37:56 - [31m[daemon] [39mStart
3 Oct 09:37:56 - [31m[daemon] [39mLoading procs
3 Oct 09:37:56 - [36m[procs ] [39mAdd [90mrealty[39m
3 Oct 09:37:56 - [36m[procs ] [39mAdd [90mroommates[39m
3 Oct 09:37:56 - [36m[procs ] [39mAdd [90mtruck[39m
3 Oct 09:37:56 - [31m[daemon] [39mStarting DNS server on port 13375
3 Oct 09:37:56 - [31m[daemon] [39mStarting katon server on port 31000
3 Oct 09:37:56 - [31m[daemon] [39mDNS server started
3 Oct 09:37:56 - [31m[daemon] [39mKaton server started

/usr/local/lib/node_modules/katon/node_modules/native-dns/lib/platform.js:166
      throw err;
            ^
Error: ENOENT, open '/etc/resolv.conf'

omarvelous avatar Oct 03 '14 17:10 omarvelous

Thanks for the report, seems to be an issue with native-dns. https://github.com/tjfontaine/node-dns/pull/63

typicode avatar Oct 04 '14 05:10 typicode

A new version of native-dns has just been published and should fix this issue :) I've updated katon with it (v0.6.3), should be ok now.

typicode avatar Oct 06 '14 11:10 typicode

Still having the issue if WiFi is off. Reopening the issue.

typicode avatar Oct 08 '14 02:10 typicode

I've switched to another dns server and released 0.6.5 should be ok now.

typicode avatar Oct 08 '14 04:10 typicode

Still getting this issue. @typicode it looks like you've switched back to native-dns and away from dnsjack is this intentional?

davej avatar Sep 30 '15 11:09 davej

@davej hmm... good question, I don't really remember the all story but there was this problem: https://github.com/typicode/katon/issues/44

In the end @assaf fixed the issue by customizing the DNS response. So I guess it's one reason native-dns is used and switching to dnsjack would be complicated.

I'm reopening the issue.

BTW, if you find a way to reproduce just let me know.

typicode avatar Oct 12 '15 10:10 typicode

To reproduce it I just have to use katon without a network connection (i.e. turn off wifi and plug out ethernet). I changed the dependency to point to this fork https://github.com/silverwind/node-dns/ and that fixed it for me.

davej avatar Oct 12 '15 11:10 davej