Skip to content

Investigate transient Wazuh API TLS handshake retries during clean boot #1002

Description

@Brad-Edwards

Problem

A clean aptl lab start can emit repeated authenticated-readiness probe failures while the Wazuh API is coming up:

curl_safe: curl exit 35 for https://localhost:55000/security/user/authenticate

The retry loop ultimately recovers and startup completes successfully, but the diagnostic is noisy and may hide a timing, certificate reload, or readiness-ordering problem.

Reproduction

Observed on the release candidate at commit 2794ab930450a4e59ca31d2a2167f7bee33101c1 in both required clean-install paths:

  • candidate wheel install, startup run run_20260911T235830Z;
  • fresh source checkout with editable install, startup run run_20260912T003637Z.

In both cases, the command later advanced through Wazuh readiness, SSH validation, MCP build, SOC seeding, terminal snapshot capture, and exited zero with Lab is ready. The final inventory contained 32 running project containers.

Investigation goals

  • Identify whether exit 35 is caused by Wazuh API TLS initialization, certificate availability/reload, protocol negotiation, or probe ordering.
  • Determine whether the readiness probe should wait on a stronger prerequisite before attempting authentication.
  • Preserve bounded retries and fail-closed terminal behavior.
  • Add a regression test or deterministic diagnostic that distinguishes an expected warm-up condition from a persistent TLS failure.

Acceptance

  • Clean boot does not emit avoidable TLS handshake failures during normal Wazuh warm-up, or the warm-up state is represented by a clear, non-error readiness message.
  • A persistent TLS/authentication failure still causes startup to fail with an actionable diagnostic.
  • Relevant clean-boot and readiness tests pass on Linux and macOS runners.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions