Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Filebeat error when system and nginx modules are enabled #5376
It doesn't happen everytime, but quite often this breaks with the following error:
Full debug logs:
Registry file contents after the above run:
Stack trace for the moment of error:
It's not the exact same run as before, but in similar conditions.
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:
The second time the registry is created is in the factory which is triggered when they are enabled config modules:
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.