okTurtles / dnschain

A blockchain-based DNS + HTTP server that fixes HTTPS security, and more!
https://okturtles.com
Other
1.74k stars 169 forks source link

NATIVE_DNS crash #63

Closed Derrick- closed 9 years ago

Derrick- commented 9 years ago

On Raspberry Pi using node v0.10.33 Using: oldDNSMethod = NATIVE_DNS Lookup any native dns record result in the following crash:

pi@namepi ~ $ sudo dnschain 2014-11-25T05:18:13.209Z - info: [NMC] connected to namecoind: 127.0.0.1:8336 2014-11-25T05:18:13.395Z - info: [DNS] started DNS { port: 53, host: '0.0.0.0', externalIP: '192.168.69.129', oldDNSMethod: 0, oldDNS: { address: '8.8.8.8 ', port: 53, type: 'udp' } } 2014-11-25T05:18:13.481Z - info: [HTTP] started HTTP { port: 8088, tlsPort: 4443, host: '0.0.0.0' } 2014-11-25T05:18:13.489Z - info: [DNSChain] DNSChain started and advertising on: 192.168.69.129

events.js:72 throw er; // Unhandled 'error' event ^ Error: Server object must be supplied with at least address at new exports.Request (/usr/local/lib/node_modules/dnschain/node_modules/native-dns/lib/client.js:62:11) at DNSServer.oldDNSLookup (/usr/local/lib/node_modules/dnschain/src/lib/dns.coffee:178:28) at DNSServer.callback (/usr/local/lib/node_modules/dnschain/src/lib/dns.coffee:159:18) at [object Object].emit (events.js:98:17) at [object Object].Server.handleMessage (/usr/local/lib/node_modules/dnschain/node_modules/native-dns/lib/server.js:68:10) at Socket. (/usr/local/lib/node_modules/dnschain/node_modules/native-dns/lib/server.js:80:10) at Socket.emit (events.js:98:17) at UDP.onMessage (dgram.js:440:8)

Using NODE_DNS results in:

2014-11-25T05:16:19.706Z - error: [Global] Error: Node's DNS module doesn't have 'getServers'. Please upgrade NodeJS. at _.assign.gErr (/usr/local/lib/node_modules/dnschain/src/lib/globals.coffee:93:21) at new DNSServer (/usr/local/lib/node_modules/dnschain/src/lib/dns.coffee:44:21) at new DNSChain (/usr/local/lib/node_modules/dnschain/src/lib/dnschain.coffee:68:24) at /usr/local/lib/node_modules/dnschain/src/lib/dnschain.coffee:57:38 at Object.exports.createServer (/usr/local/lib/node_modules/dnschain/src/lib/dnschain.coffee:66:7) at Object. (/usr/local/lib/node_modules/dnschain/bin/dnschain:2:76) at Object. (/usr/local/lib/node_modules/dnschain/bin/dnschain:4:4) at Module._compile (module.js:456:26)

2014-11-25T05:16:19.723Z - error: [DNSChain] DNSChain failed to start: Error: Node's DNS module doesn't have 'getServers'. Please upgrade NodeJS. at _.assign.gErr (/usr/local/lib/node_modules/dnschain/src/lib/globals.coffee:93:21) at new DNSServer (/usr/local/lib/node_modules/dnschain/src/lib/dns.coffee:44:21) at new DNSChain (/usr/local/lib/node_modules/dnschain/src/lib/dnschain.coffee:68:24) at /usr/local/lib/node_modules/dnschain/src/lib/dnschain.coffee:57:38 at Object.exports.createServer (/usr/local/lib/node_modules/dnschain/src/lib/dnschain.coffee:66:7) at Object. (/usr/local/lib/node_modules/dnschain/bin/dnschain:2:76) at Object. (/usr/local/lib/node_modules/dnschain/bin/dnschain:4:4) at Module._compile (module.js:456:26)

Error: Node's DNS module doesn't have 'getServers'. Please upgrade NodeJS. at _.assign.gErr (/usr/local/lib/node_modules/dnschain/src/lib/globals.coffee:93:21) at new DNSServer (/usr/local/lib/node_modules/dnschain/src/lib/dns.coffee:44:21) at new DNSChain (/usr/local/lib/node_modules/dnschain/src/lib/dnschain.coffee:68:24) at /usr/local/lib/node_modules/dnschain/src/lib/dnschain.coffee:57:38 at Object.exports.createServer (/usr/local/lib/node_modules/dnschain/src/lib/dnschain.coffee:66:7) at Object. (/usr/local/lib/node_modules/dnschain/bin/dnschain:2:76) at Object. (/usr/local/lib/node_modules/dnschain/bin/dnschain:4:4) at Module._compile (module.js:456:26)

taoeffect commented 9 years ago

Using NODE_DNS results in:

The error message is correct in that you need a more recent version of node to use that. Don't bother though because support for that method isn't good, and we might end up getting rid of it.

Error: Server object must be supplied with at least address

Looks like the culprit might be simply an extra space at the end of the oldDNS address: address: '8.8.8.8 '

Try updating your config file to make sure there are no extra spaces at the end of any lines.

taoeffect commented 9 years ago

Closing for now, feel free to re-open if that wasn't it!

Derrick- commented 9 years ago

Yep, that was the problem. Thanks!