too many open files error
I'm running crowdsec on docker. When I start crowdsec container, it throws me following error:
level=fatal msg="crowdsec init: while loading acquisition config: while configuring datasource of type file from /etc/crowdsec/acquis.yaml (position 0): could not create fsnotify watcher: too many open files"
find /var/log -type f | wc -l returns 88
My acquis.yaml file is like this:
filenames:
- /var/log/auth.log
- /var/log/syslog
labels:
type: syslog
If I comment all acquis.yaml file lines, the error dissapear (but obviously Crowdsec doesn't parse anything)2 Replies
Important Information
Thank you for getting in touch with your support request. To expedite a swift resolution, could you kindly provide the following information? Rest assured, we will respond promptly, and we greatly appreciate your patience. While you wait, please check the links below to see if this issue has been previously addressed. If you have managed to resolve it, please use run the command
/resolve or press the green resolve button below.Log Files
If you possess any log files that you believe could be beneficial, please include them at this time. By default, CrowdSec logs to /var/log/, where you will discover a corresponding log file for each component.
Guide Followed (CrowdSec Official)
If you have diligently followed one of our guides and hit a roadblock, please share the guide with us. This will help us assess if any adjustments are necessary to assist you further.
Screenshots
Please forward any screenshots depicting errors you encounter. Your visuals will provide us with a clear view of the issues you are facing.
© Created By WhyAydan for CrowdSec ❤️
Could you provide your compose file (or the docker command line you used) ?
Crowdsec should only open a few files on top of what you have configured in the acquis (config files, a few network connections, nothing crazy).
Could also be a kernel config where you have set a very low (in this case i'd would even say 0) max number of file watches (see the
fs.inotify.max_user_watches and fs.inotify.max_user_instances sysctl)