internet-equity / netrics

The network measurements scheduling framework
7 stars 3 forks source link

netrics-traceroute crashing with keyerror #18

Closed ggmartins closed 1 year ago

ggmartins commented 2 years ago

FYI

$ netrics debug execute -i {} netrics-traceroute
Name: -
Command: /home/gmartins/.local/bin/netrics-traceroute

Status: Error (Exit code 1)

Result: -

Logged (standard error):

  Traceback (most recent call last):
    File "/home/gmartins/.local/lib/python3.8/site-packages/netrics/measurement/traceroute.py", line 176, in main
      res = sp.run(trace_cmd, capture_output=True, check=True, shell=True)
    File "/usr/lib/python3.8/subprocess.py", line 516, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command 'scamper -O json -i 1.1.1.1 -c "trace -P icmp-paris -q 3 -w 5 -Q"' returned non-zero exit status 255.

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/gmartins/.local/bin/netrics-traceroute", line 8, in <module>
      sys.exit(main())
    File "/home/gmartins/.local/lib/python3.8/site-packages/netrics/measurement/traceroute.py", line 178, in main
      stderr_res['trace']['error'] = err.stderr
  KeyError: 'trace'
ggmartins commented 2 years ago

FWIW: does scamper need root priv?

netrics@docker-desktop:~/scamper-cvs-20211212b$ scamper -O json -i 1.1.1.1 151.101.1.164 -c "trace -P icmp-paris -q 3 -w 5 -Q"
[13:29:39:031] scamper_privsep_init: could not mkdir /var/empty: Permission denied
jesteria commented 2 years ago

FWIW: does scamper need root priv?

Yes, depending on the installation and the measurement, scamper requires root.

Regardless, this measurement should also be smarter about scamper and/or falling back to traceroute – (see #11).