-
Notifications
You must be signed in to change notification settings - Fork 187
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
Error messages on a clean install—error app log messages #4203
Comments
ResearchI was researching the problem, and this could be related to the Checking the plugin logs, I got:
The log is coming from https://github.com/wazuh/wazuh-kibana-app/blob/c700a23da7054dc8be889199c8c81a6405e39ea3/server/start/cron-scheduler/save-document.ts#L66 The error is caused when trying to create an index that already exists. This error is logged by the plugin. The
Each job checks the existence of the index before indexing data, and if it doesn't exist, they attempt to create it. These jobs run in parallel and periodically, so there is a race condition here, as when the second job reaches this section of the code, the previous one has already created the index, logging the Proposed solutionThis behavior does not represent an error condition, but a race condition that has no harmful consequences. The most efficient solution would be to solve this race condition using any of the mutual exclusion techniques, but as we won't redesign the jobs for now, the proposed solution is to check the nature of the error and, if it is due to this race condition, then don't log any error, as this behavior is expected due to the current design. |
…creating an existent index The statistics jobs runs in paralell and they try to create the same index. One of them, runs the request to create the index succesful, but the other one fails due the index already exists. This error is caught and logged. If the error is not related to the index exists, this is thrown and it is caught and logged in another method related to the statistics job More information in: - #4203 (comment)
…creating an existent index The statistics jobs run in parallel and they try to create the same index. One of them runs the request to create the index successfully, but the other one fails due to the index already existing. This error is caught and logged. If the error is not related to the index exists, this is thrown and it is caught and logged in another method related to the statistics job More information in: - #4203 (comment)
Solved in #4235. |
…nt index (#4235) * fix(statistics): remove the logging when there is an error caused by creating an existent index The statistics jobs run in parallel and they try to create the same index. One of them runs the request to create the index successfully, but the other one fails due to the index already existing. This error is caught and logged. If the error is not related to the index exists, this is thrown and it is caught and logged in another method related to the statistics job More information in: - #4203 (comment) * changelog: add the PR entry * changelog: fixes Wazuh version and revision * Update CHANGELOG.md Co-authored-by: Álex <[email protected]>
…nt index (#4235) * fix(statistics): remove the logging when there is an error caused by creating an existent index The statistics jobs run in parallel and they try to create the same index. One of them runs the request to create the index successfully, but the other one fails due to the index already existing. This error is caught and logged. If the error is not related to the index exists, this is thrown and it is caught and logged in another method related to the statistics job More information in: - #4203 (comment) * changelog: add the PR entry * changelog: fixes Wazuh version and revision * Update CHANGELOG.md Co-authored-by: Álex <[email protected]>
…nt index (#4235) * fix(statistics): remove the logging when there is an error caused by creating an existent index The statistics jobs run in parallel and they try to create the same index. One of them runs the request to create the index successfully, but the other one fails due to the index already existing. This error is caught and logged. If the error is not related to the index exists, this is thrown and it is caught and logged in another method related to the statistics job More information in: - #4203 (comment) * changelog: add the PR entry * changelog: fixes Wazuh version and revision * Update CHANGELOG.md Co-authored-by: Álex <[email protected]>
Describe the solution you'd like
After installing the Wazuh UI, the application shows some errors. We need to avoid the generation of these errors, as it leads the user to think the application might have a problem when there is none.
We need to examine the errors shown in the different platforms we support and devise solutions to make the first start more robust.
Error in a clean install in the error app log message page:
Related issues:
journalctl
output #4209The text was updated successfully, but these errors were encountered: