#1143812 asncounter doesn't work without ftp access

#1143812#5
Date:
2026-08-06 14:32:31 UTC
From:
To:
I tried running asncounter on a machine with a locked down network stack
and it failed with a back trace caused by a lack of access to port 21.
If there was a way to download the data via http that would be ideal.

jamie
-----------




INFO: selected input file <stdin>
INFO: no rib file caches found in /root/.cache/pyasn/rib.*
INFO: downloading rib file with: pyasn_util_download.py --latestv46
Connecting to ftp://archive.routeviews.org

Traceback (most recent call last):
   File "/usr/bin/pyasn_util_download.py", line 128, in <module>
     srvr, rp, fn = find_latest_routeviews(4 if args.latestv4 else 6 if
args.latestv6 else '46')

~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/bin/pyasn_util_download.py", line 115, in
find_latest_routeviews
     return find_latest_in_ftp(server='archive.routeviews.org',
                               archive_root='bgpdata' if archive_ipv ==
'4' else
                                            'route-views6/bgpdata' if
archive_ipv == '6' else
                                            'route-views4/bgpdata',  # 4+6
                               sub_dir='RIBS')
   File "/usr/bin/pyasn_util_download.py", line 89, in find_latest_in_ftp
     ftp = FTP(server)
   File "/usr/lib/python3.13/ftplib.py", line 121, in __init__
     self.connect(host)
     ~~~~~~~~~~~~^^^^^^
   File "/usr/lib/python3.13/ftplib.py", line 158, in connect
     self.sock = socket.create_connection((self.host, self.port),
self.timeout,

~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

source_address=self.source_address)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3.13/socket.py", line 864, in create_connection
     raise exceptions[0]
   File "/usr/lib/python3.13/socket.py", line 849, in create_connection
     sock.connect(sa)
     ~~~~~~~~~~~~^^^^
OSError: [Errno 101] Network is unreachable
ERROR: failed to download or convert ribfiles: Command
'['pyasn_util_download.py', '--latestv46']' returned non-zero exit status 1.

#1143812#10
Date:
2026-08-06 14:51:32 UTC
From:
To:
Control: reassign -1 pyasn
Control: affects -1 asncounter

For what it's worth, this is entirely delegated to the pyasn
package. asncounter itself never actually performs the HTTP requests, it
just shells out to a utility shelled in pyasn.

That will, of course, be of absolutely no comfort to you, but I figured
I'd clarify this (and refile the bug report correctly). :)

a.

#1143812#21
Date:
2026-08-06 14:51:32 UTC
From:
To:
Control: reassign -1 pyasn
Control: affects -1 asncounter

For what it's worth, this is entirely delegated to the pyasn
package. asncounter itself never actually performs the HTTP requests, it
just shells out to a utility shelled in pyasn.

That will, of course, be of absolutely no comfort to you, but I figured
I'd clarify this (and refile the bug report correctly). :)

a.