gnomikos/traIXroute

KeyError: '141' for all probe requests

Closed this issue · 3 comments

Hello,

I wanted to try out your tool, but I only get the exception KeyError: '141'. This happens for all probe requests, regardless whether I use an IP, a domain, and even for localhost.

I installed version 2.3, because I could not install version 2.2 (the default using pip).
Version 2.2 does not install due to build failures of OpenSSL in the cryptography dependency, which are only fixed in later versions.

I ran

$ traixroute -u -process
Dataset files are missing.                                                                                       
Updating the database...                                                                                                                                      
Started downloading PDB dataset.                                                                       
Started downloading PCH dataset.                                   
Started downloading RouteViews dataset.           
Routeviews has been updated successfully.                                                                  
PDB dataset has been updated successfully.                      
PCH dataset has been updated successfully.                               
Database has been updated successfully.         

$ traixroute -process probe -dest 127.0.0.1 -t
Imported 13 IXP detection rules from /home/jbushart/traixroute/configuration/rules.txt.
traIXroute using traceroute with default options.
traIXroute process with id 9700 has just started.
Loading from Database.
Loading from PCH, PDB, Routeviews and additional_info.txt.
concurrent.futures.process._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib64/python3.6/concurrent/futures/process.py", line 175, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/usr/lib64/python3.6/concurrent/futures/process.py", line 153, in _process_chunk
    return [fn(*args) for args in chunk]
  File "/usr/lib64/python3.6/concurrent/futures/process.py", line 153, in <listcomp>
    return [fn(*args) for args in chunk]
  File "/home/jbushart/.local/lib/python3.6/site-packages/traixroute/application.py", line 86, in analyze_measurement
    db_extract.dbextract()
  File "/home/jbushart/.local/lib/python3.6/site-packages/traixroute/handler/database_extract.py", line 198, in dbextract
    pch_subnet2names        = results[2].result()[0]
  File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/lib64/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/jbushart/.local/lib/python3.6/site-packages/traixroute/handler/handle_pch.py", line 70, in pch_handle_main
    reserved_tree, long_mem, IXP_region)
  File "/home/jbushart/.local/lib/python3.6/site-packages/traixroute/handler/handle_pch.py", line 179, in pch_handle_sub
    IXP_cc[ips] = IXP_region[mykey]
KeyError: '141'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/jbushart/.local/bin/traixroute", line 11, in <module>
    load_entry_point('traixroute==2.3', 'console_scripts', 'traixroute')()
  File "/home/jbushart/.local/lib/python3.6/site-packages/traixroute/application.py", line 389, in run_traixroute
    traIXroute_module.main()
  File "/home/jbushart/.local/lib/python3.6/site-packages/traixroute/application.py", line 317, in main
    self.traixroute_core(homepath, input_list, useTraIXroute, self.arguments, manager)
  File "/home/jbushart/.local/lib/python3.6/site-packages/traixroute/application.py", line 371, in traixroute_core
    for [rule_hits, json_obj, txt_obj] in executor.map(self.analyze_measurement, sublisted_data):
  File "/usr/lib64/python3.6/concurrent/futures/process.py", line 366, in _chain_from_iterable_of_lists
    for element in iterable:
  File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 586, in result_iterator
    yield fs.pop().result()
  File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
KeyError: '141'
slowr commented

If you install the dependencies that are specified inside the install.sh file then you will be able to run the v2.2 version which is the stable and the tested one.

sudo apt get install libssl-dev libffi-dev -y

Nevertheless I will take a look on the reported bug.

slowr commented

PCH changed the format of the database and that was the cause of the Exception. You will be able to run the tool without a problem with v2.3.

@slowr Thanks for fixing this bug so quickly. It seems to work now. Version 2.2 can unfortunately not be used on modern Fedora versions, so this wasn't an option.