Closed thezoggy closed 1 year ago
Since ages ago I have been compiling Perl on FreeBSD without threads in order to use it for Nfsen.
I haven't tried a multi threaded Perl yet with the new version, but the first error is what I used to see when I used the default options to compile Perl, ie, using threads.
As "URI::_idna" is liburi-perl
trying that one out
sudo apt-get install liburi-perl
Seems to fix the idna/idn stuff but still pukes after sending test email
Feb 27 17:10:34 netflow4.vm nfsen[3546996]: PANIC nfsend dies: Can't locate object method "tid" via package "threads" at /usr/share/perl/5.30/XSLoader.pm line 111.
Feb 27 17:10:34 netflow4.vm nfsen[3546996]: PANIC nfsend dies: Can't locate object method "tid" via package "threads" at /usr/share/perl/5.30/XSLoader.pm line 111.
That error is caused (unless I am very wrong) by multi threaded Perl. I have been installing Nfsen on FreeBSD compiling Perl without threading support.
Try that, it will probably solve your issue.
from what your saying, i can mask the problem by not using a threaded perl because alerts arent thread safe?
NfDump 1.7.x is multi threaded. NfSen is not.
Moreover, it´s not an issue of thread safety, but thread awareness. Some old Perl code gets confused by a variable/method called "tid" which seems to mean thread id. If you compile a non multi threaded Perl, problem solved.
That's how I´ve been running Nfsen for ages.
Try compiling Perl with -Dusethreads=n
Unless you run a lot of Perl code it will not cause problems.
I did not lock into this issue, but from what you report, I am sure, there is a problem with the Perl installation or the modules. The code base of NfSen is that old, that threads are not used anywhere. At that time, Perl had massive problems with threads. Therefore I support @borjam to try to compile Perl without threading. Most likely there is a module dependancy somewhere down the path when an alert is configured or triggered. Threads and Perl never were really friends ...
but wouldnt it be a negative to do perl without threading with nfdump 1.7.x ?
There is no relation to threading within nfdump. The perl code has no impact on nfdump.
gotcha, this box just uses default ubuntu 20.04 packages and it looks like perl 5.8.x just enabled threading by default now. so rather than mess with building perl it was easier for me to just remove "Alerts" from the menu on nfsen.php to prevent someone from setting up an alert to break the box.
nfsen/nfdump (both latest from git), works fine. After setting up a test alert and it triggering I see it sent an email but then kills nfsen.
email:
Then nfsen stopped working shortly afterwards, logs show that it looks like I have some packages missing thats needed:
I'm using ubuntu 20.04 LTS and below are the packages I have installed:
for nfdump:
and for nfsen (nfprofile/nftrack):
for nfsen custom scripts scripts (manage ordering/updating profiles)