Error: ENOENT, open '/etc/resolv.conf'
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'
Thanks for the report, seems to be an issue with native-dns. https://github.com/tjfontaine/node-dns/pull/63
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.
Still having the issue if WiFi is off. Reopening the issue.
I've switched to another dns server and released 0.6.5 should be ok now.
Still getting this issue. @typicode it looks like you've switched back to native-dns and away from dnsjack is this intentional?
@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.
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.