INTCollector issues

Hello. i’m trying to use INTCollector( tunv_ebpf / INTCollector · GitLab) to collect INT data from a testbed. I’m really struggling to do so, first I couldn’t install ONOS properly, so I installed a VM from a tutorial( Basic ONOS Tutorial - ONOS - Wiki (onosproject.org)) to have a implementation of ONOS in my VM. After that I installed a P4 environment using the .sh script in the p4-guide Github repository. Now I’m just trying to run it and I’m failing to do so.

I’m receiving the following log when trying to run a pytest with InfluxDB:
============================= test session starts ==============================
platform linux – Python 3.8.10, pytest-7.4.0, pluggy-1.2.0 – /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/sdn/BPFCollector
collecting … collected 2 items

test_e2e.py::test_e2e_indb_threshold_v10 FAILED [ 50%]
test_e2e.py::test_e2e_indb_interval_v10 FAILED [100%]

=================================== FAILURES ===================================
_________________________ test_e2e_indb_threshold_v10 __________________________

setup_veth = None

def test_e2e_indb_threshold_v10(setup_veth):
    cmd = [python_ver, "InDBClient.py", "-t", "-D", test_db, outif]
   end_to_end_influxdb_v10(cmd)

test_e2e.py:154:


test_e2e.py:51: in end_to_end_influxdb_v10
start_collector(cmd)


cmd = [‘python3’, ‘InDBClient.py’, ‘-t’, ‘-D’, ‘INT_test_database’, ‘int_veth_1’]

def start_collector(cmd):
    global subp
    try:
        subp = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
            universal_newlines=True)
    except Exception as e:
        print(e)
        return None

    p = subp.stdout.readline()
   assert (subp.poll() == None), "Error loading XDP program"

E AssertionError: Error loading XDP program
E assert 1 == None
E + where 1 = <bound method Popen.poll of <subprocess.Popen object at 0x7f3b29658970>>()
E + where <bound method Popen.poll of <subprocess.Popen object at 0x7f3b29658970>> = <subprocess.Popen object at 0x7f3b29658970>.poll

test_e2e.py:31: AssertionError
__________________________ test_e2e_indb_interval_v10 __________________________

setup_veth = None

def test_e2e_indb_interval_v10(setup_veth):
    cmd = [python_ver, "InDBClient.py", "-t", "-e", "INTERVAL", "-D", test_db, outif]
   end_to_end_influxdb_v10(cmd)

test_e2e.py:158:


test_e2e.py:51: in end_to_end_influxdb_v10
start_collector(cmd)


cmd = [‘python3’, ‘InDBClient.py’, ‘-t’, ‘-e’, ‘INTERVAL’, ‘-D’, …]

def start_collector(cmd):
    global subp
    try:
        subp = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
            universal_newlines=True)
    except Exception as e:
        print(e)
        return None

    p = subp.stdout.readline()
   assert (subp.poll() == None), "Error loading XDP program"

E AssertionError: Error loading XDP program
E assert 1 == None
E + where 1 = <bound method Popen.poll of <subprocess.Popen object at 0x7f3b29619c10>>()
E + where <bound method Popen.poll of <subprocess.Popen object at 0x7f3b29619c10>> = <subprocess.Popen object at 0x7f3b29619c10>.poll

test_e2e.py:31: AssertionError
=========================== short test summary info ============================
FAILED test_e2e.py::test_e2e_indb_threshold_v10 - AssertionError: Error loadi…
FAILED test_e2e.py::test_e2e_indb_interval_v10 - AssertionError: Error loadin…
============================== 2 failed in 10.00s ==============================

I’m not sure if the problem is the configuration of InfluxDB, since i Had a problem with it last time I ran a test. Where can I see if it is connected to localhost(Both InfluxDB and INTCollector)?

Did anyone use INTCollector before? If there is any VM .ova that has a fully functioning INTCollector or any INT collector API, I would appreciate. Thanks

UDPATE: It seems the problem lies in the bcc package necessary for the application. I’m struggling to make it work. I’m using a Ubuntu 20.04.6 LTS with llvm 10.0.0(eventhought it says that my version is in /usr/lib/llvm-60/include 6.0.1). I’ve tried the latest release and now I tried the 0.24 release. It helped a little to build the package from source, however it’s still not working

I’ve managed to run the BCC, however I still not able to run INTCollector.

When i tried to start InfluxDB the following occurs:

bpf: Argument list too long. Program too large (1400 insns), at most 4096 insns
Traceback (most recent call last):
File “InDBClient.py”, line 49, in
collector = InDBCollector.InDBCollector(int_dst_port=args.int_port,
File “InDBCollector.pyx”, line 61, in InDBCollector.InDBCollector.init
self.fn_collector = self.bpf_collector.load_func(“collector”, BPF.XDP)
File “/usr/lib/python3/dist-packages/bcc/init.py”, line 522, in load_func
raise Exception(“Failed to load BPF program %s: %s” %
Exception: Failed to load BPF program b’collector’: Argument list too long

I also encountered such a problem. Could you tell me how you solved it. How do you run the BCC?