trevoro / node-named

DNS Server in node.js
MIT License
356 stars 100 forks source link

Unable to get the Server API example in index.md to work #9

Closed john-doherty closed 10 years ago

john-doherty commented 10 years ago

I have installed node-named on a fresh install of Ubuntu 12.04. To test it I am using the Server API example in node-named/docs/index.md

However whenever I try to use the dig command suggested in the docs:

$ dig @localhost -p9999 example.com SOA

It crashes with the following error:

{ "name":"named", "hostname":"my-server-name", "pid":1642, "component":"agent", "level":40, "err":{"message":"undefined is not a function","name":"TypeError","stack":"TypeError: undefined is not a function\n at Server. (/apps/nodejs/dns/dns.js:12:15)\n at Server.EventEmitter.emit (events.js:95:17)\n at Socket. (/apps/nodejs/dns/node_modules/node-named/lib/server.js:92:30)\n at Socket.EventEmitter.emit (events.js:98:17)\n at UDP.onMessage (dgram.js:440:8)"}, "msg":"query handler threw an uncaughtException", "time":"2014-04-22T17:12:08.972Z", "v":0 }

Am I missing something?

trevoro commented 10 years ago

Hey John,

Surprisingly, that was a documentation issue. If you pull down the latest version from github you should be OK.

Thanks!