fluent-bit with a tail input processor on FreeBSD 15 gets EINVAL when trying to register the file to watch. Tried on 15.1-RELEASE. Not sure if this is a bug in fluent-bit or in FreeBSD. inotify support in the base system is new in 15. Originally installed from package, also tried building fluent-bit from ports, same error. Workaround is to disable inotify for the particular input stage via the "inotify_watcher false" configuration directive. A quick browse of the fluent-bit source didn't identify any obvious issues. There are lots of sources of EINVAL. Jun 15 22:31:28 xxx fluent[14664]: [2026/06/15 22:31:28.216] [error] [/usr/ports/sysutils/fluent-bit/work/fluent-bit-5.0.7/plugins/in_tail/tail_fs_inotify.c:148 errno=22] Invalid argument Jun 15 22:31:28 xxx fluent[14664]: [2026/06/15 22:31:28.216] [error] [input:tail:tail.1] inode=116789954 cannot register file /var/log/anubis.log
Also, libinotify is also installed on this system (for py-pyinotify, it hasn't been updated to use libc inotify on FreeBSD 15 yet). ldd doesn't show libinotify being linked against fluent-bit, so I'm pretty sure its using the libc version, but if fluent-bit works on a clean system then it might be due to a conflict of some kind.
I was able to remove the last thing using the libinotify port on the machine that is returning this error, but the error still persists. It seems fluent-bit's usage of inotify is not compatible with the FreeBSD libc implementation, or its putting something in the structs the implementation doesn't like. (Maybe a C vs C++ struct alignment thing?)
Hi Doug, Can you supply a simple test case, so I can see if I can reproduce the problem? IIRC, FreeBSD's notify is not identical to Linux's, so it might be that it is not properly implemented. This is just guessworks from me though... If I can reproduce it with a simple configuration, I might be able to help. Cheers, Palle
This command will generate the error (pick any file you like that exists): fluent-bit -i tail -p path=/var/log/messages -o stdout