-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filebeat error when system and nginx modules are enabled #5376
Comments
Stack trace for the moment of error:
It's not the exact same run as before, but in similar conditions. |
I reproduced this, it looks like prospectors are created several times? It doesn't happen if you enable both modules (nginx & system) and run with |
The general problem is that we create a module registry twice and part of the module registry is to read from the command line flags. So the problem is triggered as soon as there is any module loaded through the command line and a module is already enabled in the config file. The first time a module registry is created can be found here: beats/filebeat/beater/filebeat.go Line 54 in 10e87a0
The second time the registry is created is in the factory which is triggered when they are enabled config modules: beats/filebeat/fileset/factory.go Line 47 in 10e87a0
Unfortunately the module registry in both cases reads the command line flags from the client. So first the system module is loaded and then again loaded with the second registry creation as a file on disk exists. In general I think there should be only module registry to make sure entries are unique and make sure the modules from the command line are only read once on startup. I will further investigate a fix. |
Command line flags were taken into account during module reloading which lead to the issue the modules were loaded on startup and when loading from the files. Closes elastic#5376
Command line flags were taken into account during module reloading which lead to the issue the modules were loaded on startup and when loading from the files. Closes #5376
Command line flags were taken into account during module reloading which lead to the issue the modules were loaded on startup and when loading from the files. Closes elastic#5376 (cherry picked from commit aebd47b)
…ic#5399) Command line flags were taken into account during module reloading which lead to the issue the modules were loaded on startup and when loading from the files. Closes elastic#5376 (cherry picked from commit b054f42)
./filebeat modules enabled nginx
./filebeat -e -modules=system -d "*"
It doesn't happen everytime, but quite often this breaks with the following error:
Full debug logs:
Registry file contents after the above run:
The text was updated successfully, but these errors were encountered: