Repository navigation
List missing credentials at install and wait 1 s between start retries - #1797
Merged
Merged
Conversation
…t retries The install now prints the same MISSING lines as the start check, with where to copy each password and CA from, and no longer says to start the service while one is missing. The unit waits 1 s between start retries instead of 100 ms. Closes #1796 Signed-off-by: Rodrigo Lopez <rodrigo.lopez@wazuh.com>
Member
Author
|
============ Workflow runs ============
|
Ripdiegozz
approved these changes
Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.










Description
On a dashboard host without the indexer and the manager, the install doesn't say that passwords or CAs are missing, and ends with "Start the dashboard". The first start then fails and systemd retries it 3 times in about 2 s.
Closes #1796
Proposed Changes
--installprints the same lines as the start check, through a newreport()shared with--prestart. The install still exits0.warning: MISSINGlines now also print at install, not only at start.MISSINGline says where to copy the item from (/etc/wazuh-<peer>/export/credentials.envorca.pem, on an indexer node or the manager master node).Merge risk: two-way door · blast radius: package install output and the start retry timing
Results and Evidence
Tested on today's 5.0.0 nightly
.deb(Ubuntu 24.04, systemd 255): the package unpacked, this branch'sresolve-credentials.jsand unit copied in, thendpkg --configureran the realpostinst. The nightly's resolver and unit are identical toorigin/5.0.0.Dashboard host with nothing placed: install output
Before:
After:
Same host:
systemctl start wazuh-dashboard, retry timing (journalctl -o short-precise)Start request repeated too quicklyDashboard host set up by the docs (passwords and both CAs placed): unchanged
Start the dashboard and enable it at boot, with noMISSINGline, as before.systemctl start: active, 0 restarts./api/statusisgreen.POST /api/check-apianswers with"verify_ca":true.Tests:
install with nothing placed lists what is missing and where to copy it fromandinstall with the indexer placed says to start, and warns about the manager, new. They fail on5.0.0(noreport()) and pass here, with the other 36 resolver tests.How to Test
wazuh-indexerandwazuh-manager, install thewazuh-dashboardpackage from this PR without creating/etc/wazuh-dashboard/local.envor thecerts/*-ca.pemfiles.MISSINGitems and the 2 manager warnings, each with acopy … from …line, and ends withThe dashboard does not start until every MISSING, INVALID or UNSAFE entry above is resolved.The install exits0.systemctl start wazuh-dashboard, thenjournalctl -u wazuh-dashboard -o short-precise | grep -E 'Starting|exited|repeated'.Start request repeated too quickly.Start the dashboard and enable it at boot, and the dashboard starts on the first try.Artifacts Affected
/usr/share/wazuh-dashboard/bin/resolve-credentials.jsandwazuh-dashboard.service.Configuration Changes
wazuh-dashboard.service:RestartSec=1(was systemd's default, 100 ms).Documentation Updates
dev-tools/build-packages/credentials/README.md: what--installprints.wazuh-dashboard-plugins:docs/diag/diagnostic.mdanddocs/ref/getting-started/credentials.mdquote the oldset it in … local.envhint.Tests Introduced
resolve-credentials.test.js: install with nothing placed (lines, sources, closing line, no "Start the dashboard"); install with the indexer placed (no problems, manager warnings, "Start the dashboard").Review Checklist
no-changelog)