in reply to Re: Net::DNS::Resolver v0.61 output
in thread Net::DNS::Resolver v0.61 output

yes they do answer with debug on. So was it the intent of the person who wrote this module to have this code act in this way? What I am doing wrong? Do you have a recommendation on how to make this more usable? Yes $query is undef.
CODE OUTPUT: ;; query(##.##.##.##) ;; setting up an AF_INET() family type UDP socket ;; send_udp(##.##.###.##:53) ;; answer from ###.##.###.##:53 : 43 bytes ;; HEADER SECTION ;; id = 6637 ;; qr = 1 opcode = QUERY aa = 0 tc = 0 rd = 0 ;; ra = 1 ad = 0 cd = 0 rcode = SERVFAIL ;; qdcount = 1 ancount = 0 nscount = 0 arcount = 0 ;; QUESTION SECTION (1 record) ;; ##.##.###.##.in-addr.arpa. IN PTR ;; ANSWER SECTION (0 records) ;; AUTHORITY SECTION (0 records) ;; ADDITIONAL SECTION (0 records) RCODE: SERVFAIL; trying next nameserver ;; send_udp(##.##.###.##:53) ;; answer from ##.##.###.##:53 : 474 bytes ;; HEADER SECTION ;; id = 6637 ;; qr = 1 opcode = QUERY aa = 0 tc = 0 rd = 0 ;; ra = 1 ad = 0 cd = 0 rcode = NOERROR ;; qdcount = 1 ancount = 0 nscount = 13 arcount = 13 ;; QUESTION SECTION (1 record) ;; ##.##.###.##.in-addr.arpa. IN PTR ;; ANSWER SECTION (0 records) ;; AUTHORITY SECTION (13 records) . 10302 IN NS i.root-servers.net. . 10302 IN NS g.root-servers.net. . 10302 IN NS k.root-servers.net. . 10302 IN NS b.root-servers.net. . 10302 IN NS c.root-servers.net. . 10302 IN NS f.root-servers.net. . 10302 IN NS e.root-servers.net. . 10302 IN NS d.root-servers.net. . 10302 IN NS m.root-servers.net. . 10302 IN NS l.root-servers.net. . 10302 IN NS j.root-servers.net. . 10302 IN NS a.root-servers.net. . 10302 IN NS h.root-servers.net. ;; ADDITIONAL SECTION (13 records) i.root-servers.net. 10302 IN A 192.36.148.17 g.root-servers.net. 10302 IN A 192.112.36.4 k.root-servers.net. 10302 IN A 193.0.14.129 b.root-servers.net. 10302 IN A 192.228.79.201 c.root-servers.net. 10302 IN A 192.33.4.12 f.root-servers.net. 10302 IN A 192.5.5.241 e.root-servers.net. 10302 IN A 192.203.230.10 d.root-servers.net. 10302 IN A 128.8.10.90 m.root-servers.net. 10302 IN A 202.12.27.33 l.root-servers.net. 10302 IN A 198.32.64.12 j.root-servers.net. 10302 IN A 192.58.128.30 a.root-servers.net. 10302 IN A 198.41.0.4 h.root-servers.net. 10302 IN A 128.63.2.53 $VAR1 = undef;

Replies are listed 'Best First'.
Re^3: Net::DNS::Resolver v0.61 output
by Krambambuli (Curate) on Oct 24, 2007 at 18:27 UTC
    yes they do answer with debug on.

    No, they don't. What you see is what happens with your requests, how the code makes various tries to get the answers you queried for.

    So was it the intent of the person who wrote this module to have this code act in this way?

    I won't comment on that - but rest assured the code is ok and doesn't hide any intent to harm anyone ;)

    What I am doing wrong?

    Now that's a ways better question, really :)

    I believe you do use a tool you're not really controlling to solve a problem that you don't fully understand. No problem, it happens to all of us. Anyway, the first step is to define /understand the sub-problems and then fight them one by one.

    Do you have a recommendation on how to make this more usable? Yes $query is undef.

    Let's work it out - what is the nslookup command you were using ? Is it possible that with nslookup you queried different nameservers...?

    Krambambuli
    ---
    enjoying Mark Jason Dominus' Higher-Order Perl
      Thank you for replying. The problem is I was asked by a co-worker to help him determine what hosts are in what domain(s). My goal is to search two domains for IPs and Names of respective hosts. I am pretty sure I said this in the 1st block of text??? :) I need to search the two domains. My successful nslookup command was
      # nslookup Default Server: wrnadc01.na.alarismed.com Address: 10.220.13.131 > server ns7.pyxis.com Default Server: ns7.pyxis.com Address: 143.98.113.17 > 10.8.239.254 Server: ns7.pyxis.com Address: 143.98.113.17 Name: netwrvr1.na.alarismed.com Address: 10.8.239.254 > server wrnadc02.na.alarismed.com Default Server: wrnadc02.na.alarismed.com Address: 10.220.13.132 > 10.8.239.254 Server: wrnadc02.na.alarismed.com Address: 10.220.13.132 Name: netwrvr1.na.alarismed.com Address: 10.8.239.254
        Well... Seen from my WS, this turns to the following:
        $ nslookup > server ns7.pyxis.com Default server: ns7.pyxis.com Address: 207.114.139.26#53 > 10.8.239.254 ;; connection timed out; no servers could be reached >
        Did you run your nslookup from the same IP where you then launched your Perl script ?

        It seems that some network/routing problems are interfering.
        Any firewall, permissions issues ?

        Krambambuli
        ---
        enjoying Mark Jason Dominus' Higher-Order Perl