Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tuple IndexErrors in DNSMON hostname.bind queries #1

Closed
ioc32 opened this issue Sep 19, 2015 · 2 comments
Closed

tuple IndexErrors in DNSMON hostname.bind queries #1

ioc32 opened this issue Sep 19, 2015 · 2 comments

Comments

@ioc32
Copy link
Contributor

ioc32 commented Sep 19, 2015

I've tested the following DNSMON msm types (for both address families):

  • hostname.bind
  • UDP SOA
  • TCP SOA
  • Traceroute
  • version.bind

hostname.bind queries explode [1]. Take msms 1423330 and 1423386 as examples.

(atlas-cli)iortiz@monet:~
$ python -V
Python 2.7.10
(atlas-cli)iortiz@monet:~
$ uname -a
Linux monet 4.0.0-2-amd64 #1 SMP Debian 4.0.8-1 (2015-07-11) x86_64 GNU/Linux

1iortiz@monet:~
$ ripe-atlas stream 1423386
Traceback (most recent call last):
File "/home/iortiz/.virtualenvs/atlas-cli/bin/ripe-atlas", line 77, in
sys.exit(RipeAtlas().main())
File "/home/iortiz/.virtualenvs/atlas-cli/bin/ripe-atlas", line 68, in main
).Command(_self.args, *_self.kwargs).run()
File "/home/iortiz/.virtualenvs/atlas-cli/local/lib/python2.7/site-packages/ripe/atlas/tools/commands/stream.py", line 41, in run
detail["type"]["name"], pk)
File "/home/iortiz/.virtualenvs/atlas-cli/local/lib/python2.7/site-packages/ripe/atlas/tools/streaming.py", line 37, in stream
stream.timeout()
File "/home/iortiz/.virtualenvs/atlas-cli/local/lib/python2.7/site-packages/ripe/atlas/cousteau/stream.py", line 53, in timeout
self.socketIO.wait()
File "/home/iortiz/.virtualenvs/atlas-cli/local/lib/python2.7/site-packages/socketIO_client/init.py", line 232, in wait
self._process_packets()
File "/home/iortiz/.virtualenvs/atlas-cli/local/lib/python2.7/site-packages/socketIO_client/init.py", line 256, in _process_packets
self._process_packet(engineIO_packet)
File "/home/iortiz/.virtualenvs/atlas-cli/local/lib/python2.7/site-packages/socketIO_client/init.py", line 461, in _process_packet
delegate(socketIO_packet_data, namespace)
File "/home/iortiz/.virtualenvs/atlas-cli/local/lib/python2.7/site-packages/socketIO_client/init.py", line 482, in _on_event
namespace.find_packet_callback(event)(*args)
File "/home/iortiz/.virtualenvs/atlas-cli/local/lib/python2.7/site-packages/ripe/atlas/tools/streaming.py", line 26, in on_result_response
sys.stdout.write(formatter.format(Result.get(result)))
File "/home/iortiz/.virtualenvs/atlas-cli/local/lib/python2.7/site-packages/ripe/atlas/tools/reports/dns.py", line 21, in format
r += cls.get_formatted_response(probe_id, created, response)
File "/home/iortiz/.virtualenvs/atlas-cli/local/lib/python2.7/site-packages/ripe/atlas/tools/reports/dns.py", line 65, in get_formatted_response
"answer", response.abuf.answers),
File "/home/iortiz/.virtualenvs/atlas-cli/local/lib/python2.7/site-packages/ripe/atlas/tools/reports/dns.py", line 85, in get_section
header.upper()) + "\n".join([" {}".format(
) for _ in data]) + "\n"
File "/home/iortiz/.virtualenvs/atlas-cli/local/lib/python2.7/site-packages/ripe/atlas/sagan/dns.py", line 325, in str
return "{} {} {} {} {}".format(Answer.str(self), self.data_string)
IndexError: tuple index out of range

@danielquinn
Copy link
Collaborator

This was a bug I introduced into Sagan that I patched today (1.1.1). So if you like, upgrade Sagan and if it works for you, I'll close this.

Note that I've updated the requirements for this project to depend on ripe.atlas.sagan>=1.1.1, but haven't pushed this into PyPi yet 'cause it's 1930 and I want to go home :-)

@ioc32
Copy link
Contributor Author

ioc32 commented Sep 22, 2015

I re-installed ripe-atlas-tools in a clean virtualenv and it now works [1].

Let's close it!

1iortiz@monet:~
$ ripe-atlas stream 1423386

Probe #6020

  • 1 -

    ; <<>> RIPE Atlas Tools <<>> hostname.bind.
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15192
    ;; flags: qr; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;hostname.bind. CH TXT

    ;; ANSWER SECTION:
    hostname.bind. 0 CH TXT k1.denic.k.ripe.net

    ;; Query time: 6.873 msec
    ;; SERVER: 193.0.14.129#53(193.0.14.129)
    ;; WHEN: Wed Sep 23 00:41:47 CEST 2015
    ;; MSG SIZE rcvd: 63

Probe #6009

  • 1 -

    ; <<>> RIPE Atlas Tools <<>> hostname.bind.
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42673
    ;; flags: aa qr; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;hostname.bind. CH TXT

    ;; ANSWER SECTION:
    hostname.bind. 0 CH TXT ns1.at-vie.k.ripe.net

    ;; AUTHORITY SECTION:
    hostname.bind. 0 CH NS None

    ;; Query time: 0.843 msec
    ;; SERVER: 193.0.14.129#53(193.0.14.129)
    ;; WHEN: Wed Sep 23 00:41:44 CEST 2015
    ;; MSG SIZE rcvd: 79
    ^C
    Disconnecting from the stream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants