I'm getting that as well on new installs (looking up a host that doesn't exist returns NOANSWER instead of NXDOMAIN)
I think it is related to the change in Net::DNS 0.71 in the changelog:
Fix rt.cpan.org #81787
NXDOMAIN no longer reported by $resolver->errorstring.
Checking $packet->header->rcode as well as $res->errorstring does the trick for me but there may be other repercussions:
--- a/lib/ParaDNS/Resolver.pm
+++ b/lib/ParaDNS/Resolver.pm
@@ -216,7 +216,6 @@ sub event_read {
my $res = $self->{res};
while (my $packet = $res->bgread($sock)) {
- my $err = $res->errorstring;
my $answers = 0;
my $header = $packet->header;
my $id = $header->id;
@@ -278,6 +277,7 @@ sub event_read {
$answers++;
}
if (!$answers) {
+ my $err = $res->errorstring || $packet->header->rcode;
if ($err eq "NXDOMAIN") {
# trace("found => NXDOMAIN\n");
$qobj->run_callback("NXDOMAIN");
On Mon Sep 08 11:28:20 2014, deadhead@goodfellow.it wrote:
Show quoted text> Il Gio 28 Ago 2014 10:53:23, andy_jones@outgun.com ha scritto:
> > Here is a patch to ParaDNS::Resolver as newer releases of
> > Net::DNS::Resolver have split the nameservers attribute into
> > nameservers4 & nameservers6.
>
> On my CentOS7/RHEL7 tests fail. Even trying the patch I still have
> problems.
>
> Those the components version:
>
> Perl v5.16.3
> perl-Danga-Socket-1.61
> perl-Net-DNS-0.72
> ParaDNS-2.0
>
> Follow the output:
> "
> [ParaDNS-2.0]# perl Makefile.PL
> Checking if your kit is complete...
> Looks good
> Writing Makefile for ParaDNS
> [ParaDNS-2.0]# make
> cp lib/ParaDNS/Resolver.pm blib/lib/ParaDNS/Resolver.pm
> cp lib/ParaDNS.pm blib/lib/ParaDNS.pm
> cp fast-rdns.pl blib/lib/fast-rdns.pl
> cp fast-rdns.pl blib/script/fast-rdns.pl
> /usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' --
> blib/script/fast-rdns.pl
> Manifying blib/man3/ParaDNS::Resolver.3pm
> Manifying blib/man3/ParaDNS.3pm
> [ParaDNS-2.0]# make test
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> t/00basic.t .. 1/5
> # Failed test 'Got nosuchhost.axkit.org doesn't exist (NOANSWER)'
> # at t/00basic.t line 44.
> # Looks like you failed 1 test of 5.
> t/00basic.t .. Dubious, test returned 1 (wstat 256, 0x100)
> Failed 1/5 subtests
>
> Test Summary Report
> -------------------
> t/00basic.t (Wstat: 256 Tests: 5 Failed: 1)
> Failed test: 3
> Non-zero exit status: 1
> Files=1, Tests=5, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.10 cusr
> 0.02 csys = 0.15 CPU)
> Result: FAIL
> Failed 1/1 test programs. 1/5 subtests failed.
> make: *** [test_dynamic] Errore 1
> "
>
> thanks