# INTCollector issues

**URL:** https://forum.p4.org/t/intcollector-issues/905
**Category:** P4 Dev
**Created:** [July 27, 2023, 6:51am UTC](https://forum.p4.org/t/intcollector-issues/905 "2023-07-27T06:51:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![msaueressig](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@msaueressig](https://forum.p4.org/u/msaueressig)
#### Post date: [July 27, 2023, 6:51am UTC](https://forum.p4.org/t/intcollector-issues/905/1 "2023-07-27T06:51:03Z")

</div>

Hello. i’m trying to use INTCollector( [tunv\_ebpf / INTCollector · GitLab](https://gitlab.com/tunv_ebpf/BPFCollector)) 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)](https://wiki.onosproject.org/display/ONOS/Basic+ONOS+Tutorial)) 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

---

<div class="post-metadata">

### Author: ![msaueressig](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@msaueressig](https://forum.p4.org/u/msaueressig)
#### Post date: [July 27, 2023, 8:07pm UTC](https://forum.p4.org/t/intcollector-issues/905/2 "2023-07-27T20:07:53Z")

</div>

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

---

<div class="post-metadata">

### Author: ![msaueressig](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@msaueressig](https://forum.p4.org/u/msaueressig)
#### Post date: [July 27, 2023, 9:08pm UTC](https://forum.p4.org/t/intcollector-issues/905/3 "2023-07-27T21:08:22Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Xiaoxin](https://avatars.discourse-cdn.com/v4/letter/x/3be4f8/32.png) [@Xiaoxin](https://forum.p4.org/u/Xiaoxin)
#### Post date: [March 7, 2024, 7:19am UTC](https://forum.p4.org/t/intcollector-issues/905/4 "2024-03-07T07:19:58Z")

</div>

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