On Thu, Jan 31, 2013 at 7:51 PM, smf <[email protected]> wrote:
> Hi,
>
> Does anyone know what Node returns ECONNREFUSED insetad of ESERVFAIL for DNS
> queries that return SERVFAIL?
>
> [root@mail1-ec2 ~]# dig servfail.test.snert.net
>
> ; <<>> DiG 9.7.3-P3-RedHat-9.7.3-2.11.amzn1 <<>> servfail.test.snert.net
> ;; global options: +cmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 51175
> ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;servfail.test.snert.net. IN A
>
> ;; Query time: 0 msec
> ;; SERVER: 127.0.0.1#53(127.0.0.1)
> ;; WHEN: Thu Jan 31 18:49:40 2013
> ;; MSG SIZE rcvd: 41
>
>
> [root@mail1-ec2 ~]# cat a.js
> var dns = require('dns');
> dns.resolve4('servfail.test.snert.net', function (err, res) {
> if (err) {
> console.log(err);
> }
> else {
> console.log(res);
> }
> });
>
> [root@mail1-ec2 ~]# node a.js
> { [Error: queryA ECONNREFUSED]
> code: 'ECONNREFUSED',
> errno: 'ECONNREFUSED',
> syscall: 'queryA' }
>
> Kind regards,
> Steve.
Not sure, it seems to work for me:
$ out/Release/node tmp/dns-econn.js
{ [Error: queryA ENOTFOUND] code: 'ENOTFOUND', errno: 'ENOTFOUND',
syscall: 'queryA' }
The error code is ENOTFOUND for backwards compatibility but
essentially means NXDOMAIN (which is what dig returns for that
domain).
Maybe run strace on the script to see what it's doing.
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.