ntop / n2disk

Open source components and extensions for n2disk
498 stars 11 forks source link

n2disk cannot lock memory in a container #34

Closed abedhossainn closed 3 years ago

abedhossainn commented 3 years ago

hello everyone.

i just started using licensed ntop products. the ntop and nprobe service is running on my system smoothly. but i'm unable to start n2disk. the log is showing WARNING: Unable to lock memory [Cannot allocate memory] can anyone help me with the issue.

image

cardigliano commented 3 years ago

How much memory do you have on this system? Please provide "free" or "cat /proc/meminfo"

abedhossainn commented 3 years ago

How much memory do you have on this system? Please provide "free" or "cat /proc/meminfo"

image

cardigliano commented 3 years ago

You have 16MB of available memory, which is too little for dumping PCAP data.. what system is this?

abedhossainn commented 3 years ago

You have 16MB of available memory, which is too little for dumping PCAP data.. what system is this?

its ubuntu running inside a proxmox container. i can increase the total memory. whats the minimum memory requirement for running n2disk or how much memory should i allow for the system to use?

cardigliano commented 3 years ago

The memory used by n2disk scales based on link speed and available memory, let's say minimum 128MB of available memory

abedhossainn commented 3 years ago

The memory used by n2disk scales based on link speed and available memory, let's say minimum 128MB of available memory

i've increased the total memory of the container. but its still giving the same error.

image

cardigliano commented 3 years ago

This is strange as n2disk is trying to allocate a bit more than 1GB, and you have 4GB available. I need to investigate further to figure out what's going on.

abedhossainn commented 3 years ago

This is strange as n2disk is trying to allocate a bit more than 1GB, and you have 4GB available. I need to investigate further to figure out what's going on.

Thank you. please let me know if you find anything.

cardigliano commented 3 years ago

In the meantime you can probably append a new line with "-r" to the configuration file under /etc/n2disk as workaround

abedhossainn commented 3 years ago

In the meantime you can probably append a new line with "-r" to the configuration file under /etc/n2disk as workaround

okay...after adding a new with -r, the system is unable start PF_RING. im sharing the log below.

image

image

cardigliano commented 3 years ago

Are you able to run pfcount in the same system? (pfcount -i eth0)

abedhossainn commented 3 years ago

Are you able to run pfcount in the same system? (pfcount -i eth0)

nope...when i'm trying to install pfring driver(veth) on eth0 interface, the system is saying driver not supported with this error:

Please provide a supported driver with --configure-driver

any workaround for that?

cardigliano commented 3 years ago

@abedhossainn please note that the pfring kernel module should be loaded on the host system (it is not possible to load the module on the container only)

cardigliano commented 3 years ago

@abedhossainn please add --cap-add IPC_LOCK to be able to use Direct IO in n2disk (removing -r)