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

Whois fails for unallocated ASNs #192

Open
jwbensley opened this issue Oct 17, 2023 · 1 comment
Open

Whois fails for unallocated ASNs #192

jwbensley opened this issue Oct 17, 2023 · 1 comment

Comments

@jwbensley
Copy link
Owner

jwbensley commented Oct 17, 2023

doing 20230322:
Creating docker_dnas_stats_run ... done
2023-10-17 13:01:16,567|INFO|Starting logging for report generation and posting script at level INFO
Traceback (most recent call last):
  File "/opt/dnas/dnas/scripts/git_reports.py", line 289, in <module>
    main()
  File "/opt/dnas/dnas/scripts/git_reports.py", line 267, in main
    generate(args["ymd"])
  File "/opt/dnas/dnas/scripts/git_reports.py", line 62, in generate
    txt_report = report.gen_txt_report(day_stats)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/dnas/dnas/scripts/../dnas/report.py", line 449, in gen_txt_report
    whois_cache[asn] = whois.as_lookup(int(asn))
                       ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/dnas/dnas/scripts/../dnas/whois.py", line 29, in as_lookup
    ret = subprocess.check_output(cmd)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/pypy3.10-v7.3.12-linux64/lib/pypy3.10/subprocess.py", line 421, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/opt/pypy3.10-v7.3.12-linux64/lib/pypy3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['whois', 'AS426000003']' returned non-zero exit status 1.
ERROR: 1
doing 20230323:
Creating docker_dnas_stats_run ... done
2023-10-17 13:06:37,681|INFO|Starting logging for report generation and posting script at level INFO
Traceback (most recent call last):
  File "/opt/dnas/dnas/scripts/git_reports.py", line 289, in <module>
    main()
  File "/opt/dnas/dnas/scripts/git_reports.py", line 267, in main
    generate(args["ymd"])
  File "/opt/dnas/dnas/scripts/git_reports.py", line 62, in generate
    txt_report = report.gen_txt_report(day_stats)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/dnas/dnas/scripts/../dnas/report.py", line 449, in gen_txt_report
    whois_cache[asn] = whois.as_lookup(int(asn))
                       ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/dnas/dnas/scripts/../dnas/whois.py", line 29, in as_lookup
    ret = subprocess.check_output(cmd)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/pypy3.10-v7.3.12-linux64/lib/pypy3.10/subprocess.py", line 421, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/opt/pypy3.10-v7.3.12-linux64/lib/pypy3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['whois', 'AS426000004']' returned non-zero exit status 1.
ERROR: 1
@jwbensley
Copy link
Owner Author

This happens because the ASNs are unallocated by IANA to any RIR

@jwbensley jwbensley changed the title Whois failure Whois fails for unallocated ASNs Dec 28, 2024
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

1 participant