Troubleshooting Wazuh agents that do not enroll or connect

A structured way to find why a Wazuh agent is never connected or keeps dropping, from port and enrollment checks to key, name and certificate faults.

On this page

Why Wazuh agents stay never connected or keep disconnecting

When agents are missing from the dashboard after a rollout, the cause is usually one of a few faults: the network path between the agent and the Wazuh server, enrollment, the agent key, the agent name, a certificate or a password. Each can be checked in a fixed order, and working through them in that order is faster than changing settings at random. The first check is always whether the agent can reach the server at all, because every other symptom looks the same from the dashboard: the agent shows as never connected or drops to disconnected, and nothing in the console says which fault it is.

The four Wazuh components involved are the agent on the endpoint, the Wazuh server that receives and analyzes agent data, the Wazuh indexer that stores alerts, and the Wazuh dashboard where operators see the result. A missing agent is almost always a problem between the agent and the server, but a healthy server with an empty dashboard can also point to indexer or dashboard faults. Before changing anything, confirm which component the symptom belongs to, and record the agent's operating system, its agent version, and the server version it was enrolled against. Those three facts determine where logs live and which steps apply. The exact version pairing rules should be confirmed in the Wazuh documentation for your release, and the Wazuh release notes list the current 4.14 patch releases you should check against.

DeployOpen can investigate a fleet of agents that will not connect, identify which of these faults applies to each group, fix the configuration on the agent and server side, and document the procedure so the next rollout avoids the same failure. This work is fixed-scope: the systems covered, the deliverables and the timeline are agreed in writing before any change is made to your environment. Ask any partner, including DeployOpen, to state in the quote which operating systems, network segments and Wazuh components are included, and whether they expect to work inside your change process or only advise on it.

How to triage an agent that never connects

This sequence walks an engineer from the agent host to the server, checking one layer at a time so the first failing check shows where the enrollment or connection breaks. Each step names the result that tells you to continue or stop.

  1. Confirm the agent is installed and running

    Start on the endpoint itself, with someone who has administrator or root rights on that host. Confirm the Wazuh agent package is installed and that the agent service is running under the service manager for that operating system, such as systemd on Linux or the Services console on Windows. Check the agent version against the version your server runs, because mismatched versions are a common source of connection trouble. You are done when the service reports running and the version is recorded. If the service is stopped or fails at start, read its status output and stop here until the service starts cleanly.

  2. Verify the server address and enrollment result

    Open the agent configuration file and confirm that the server address points to the address the manager actually listens on, including any load balancer or NAT address your design uses. Then check whether enrollment completed: the agent should hold a client key and the server should list the agent. If the server address is wrong, correct it, restart the agent and repeat this check. If the agent has no key, the enrollment step failed, so keep the enrollment output and move to the logs in the final step before re-enrolling.

  3. Check the connection ports between agent and server

    From the agent host, test that the network path to the server's agent connection port is open, and confirm the enrollment port is reachable if you enroll through the API or registration service. Run the test from the same network zone the agent sits in, since host firewalls, security groups and proxies can differ from the server side. Confirm the port numbers against your deployment's documentation rather than assuming defaults. You are done when both ports accept connections from the agent. If a port is blocked, record the rule that blocks it and open it through the change process your team uses, then retest before going further.

  4. Confirm the agent key and name are unique

    On the server, check that the agent name is not already registered to another host, and that the agent key matches the one the agent presents. Duplicate names and copied key files from cloned images are frequent causes of an agent that shows as never connected or drops in and out. Compare the agent ID and key fingerprint with what the server reports. If names collide, remove the stale entry or rename the new agent according to your naming standard. Continue only when the agent's ID and key match exactly one server record.

  5. Read the agent logs for the failure

    Open the agent log for the operating system in use and look for the first error after the most recent start. Typical entries cover failed connections, rejected keys, certificate verification failures and authentication errors. Note the exact message and timestamp, because later messages often repeat the same failure. Map each message to the earlier checks: a connection refusal points back to ports, a key rejection points to the key step, and a certificate error points to trust settings. If the log shows no errors but the agent stays disconnected, move to the server logs.

  6. Read the server logs and confirm the result

    On the Wazuh server, open the manager log for the same time window as the agent log entries and search for the agent name or ID. Look for rejected enrollment requests, key mismatch messages, and password or certificate errors used by the enrollment service. Confirm the server service is healthy before drawing conclusions. The check is complete when the server log explains the agent's state and the agent appears connected in the server's agent list. If the server logs show nothing for the agent, the request is not reaching the server, so return to the port and address checks.

Which fault matches which symptom

This table pairs each agent symptom with its most likely cause and the first check to run. Read it by finding the status the agent shows on the manager, then working down the row before changing configuration. Confirm the ports and log paths for your Wazuh version in the vendor documentation before you test anything.

SymptomLikely causeFirst check
Never connected (enrolled but never active)Agent cannot reach the manager on the communication port, or a firewall or proxy blocks the pathFrom the endpoint, test TCP reachability to the manager's agent communication port as listed for your version, then read the agent log
Disconnected after workingManager restarted or overloaded, network path changed, or the agent's stored key no longer matches the managerCheck the agent's log for connection and key errors, then confirm the manager service and its event queue state
Shows under a wrong or duplicate nameAgent name reused by a second host, cloned image with a copied client key, or a hostname changed after enrollmentList agents on the manager and compare IDs, names and IP addresses for the same host, then check whether the endpoint was cloned
Key mismatch or invalid key errorAgent key was removed, replaced or regenerated on the manager, or the endpoint still holds an old keyCompare the agent's registered key with the manager record, then re-import or re-enroll the agent under a clean identity
Certificate error at enrollmentManager certificate not trusted by the endpoint, expired certificate, or hostname mismatch in the certificateInspect the certificate presented on the enrollment port and confirm the trust chain and name match the address the agent uses
Password error at enrollmentEnrollment password missing, wrong or changed on the manager, or an enrollment setting not appliedConfirm whether enrollment requires a password for your version and that the agent sends the same value the manager expects
Enrollment succeeds but agent stays offline on some hostsLocal clock skew, host firewall rules, or a proxy in the path only for some networksCompare system time on the endpoint and manager, then test the same port from a host that works

Where agent logs live on each operating system

On Linux, the Wazuh agent writes its own log file under the Wazuh installation directory. Start there, then check the system journal for the service that launches the agent, because startup failures can appear in the journal before the agent log records anything. Read the most recent entries first, since a single misconfiguration often repeats on every restart.

  • Startup messages: Look for errors reading the agent configuration or client key file when the service starts.
  • Connection attempts: Look for entries showing the manager address being resolved and the agent trying to reach the enrollment or event port.
  • Key and identity errors: Look for messages about an invalid, missing or mismatched agent key.
  • Service state: Confirm the agent service is running and review its exit status in the journal.

Exact file locations and service names depend on the installed version and package type, so confirm them in the Wazuh documentation for your release before you search.

How key mismatches and duplicate names block agents

An agent authenticates to the Wazuh server with a key that the server issued when the agent was enrolled. The key is stored on the endpoint in the agent's client keys file, and the server keeps a matching record for that agent ID. When the two sides no longer agree, the server rejects the agent's messages and the agent shows as never connected or disconnected in the API and dashboard. The usual triggers are a manager that was rebuilt or restored without its key store, an agent reinstalled on a host that kept its old keys, or an enrollment that was re-run against a different server. Before changing anything, compare the agent ID and name in the server's agent list with what the endpoint reports, and confirm which manager address the agent is configured to reach. Restart the agent after any configuration edit, but do not expect a restart to repair a key mismatch.

Duplicate names cause a separate problem. Enrollment registers a name, and a second endpoint with the same name, often created from a cloned virtual machine or golden image, can be assigned a conflicting identity while the first record still exists. Cloned hosts may also carry an identical client keys file, so two machines present the same key. Check for both cases before you re-enroll: duplicate or clashing names in the agent list, and identical key material across hosts. The clean path is to remove the stale registration from the server, stop the agent on the affected endpoint, delete its client keys file, and enroll it again so it receives a new key. Confirm the exact removal and enrollment commands for your Wazuh release in the agent documentation, and rehearse them on one non-production host first.

As a rule, changes to the agent's configuration file, such as the manager address or a logging setting, take effect after a restart. Changes to the key, the agent name or the agent's identity require a fresh enrollment, because the server must issue and record a new key. Before deleting a registration, confirm that no other endpoint still uses that ID and that the host you are re-enrolling is the one you intend to keep. Record which hosts were re-enrolled and why, so that a later image rebuild does not recreate the same collision. Images for new endpoints should be sealed without a populated key file, and your deployment automation should enroll each host after it boots instead of copying one agent's identity into a template.

Certificate and password errors to check first

Most enrollment and connection failures in Wazuh come down to four things: whether the agent trusts the server certificate, whether the enrollment password matches, whether certificates still match the server after a change, and whether the host clock and name line up with the server. Check them in that order, because each one hides the symptoms of the next.

Certificate chain and trust

An agent that reaches the manager on the right port can still fail when it does not trust the certificate the server presents, often because the chain includes an intermediate or an internal certificate authority that the endpoint does not know. Check the agent log for TLS or certificate verification errors first. The platform team owns the fix, since they issue the certificates and decide which authority the agents must trust. The endpoint team then deploys that trust into their images or configuration management.

Deployment options

Enrollment password mismatch

When enrollment uses a password, the value on the agent must match the one the manager expects. A mismatch produces authentication failures during registration, and the agent never appears as connected in the console. Compare the password file or deployment variable on the endpoint with the value configured on the server, and confirm which one was changed most recently. The security team owns the fix, because they set and rotate the enrollment secret and decide who may hold it.

Certificates replaced after a server change

Agents that enrolled against an earlier server can break after the manager is rebuilt, moved to new hostnames or given new certificates, because the stored keys and trust material no longer match. Ask what changed on the server side and compare the certificate validity dates and subject names with what agents expect. The platform team owns the fix and should plan a controlled re-enrollment or key refresh rather than editing individual endpoints by hand.

Clock and hostname mismatch

Certificate validity checks depend on the agent and server agreeing on the current time, and name-based checks depend on the hostname the agent uses to reach the server resolving correctly. A drifted clock can make a valid certificate look expired or not yet valid, and a stale DNS record can send the agent to the wrong address. Confirm time synchronization on both sides and resolve the server name from the endpoint. The endpoint team owns the fix for host time and name resolution, with the platform team confirming the server record.

How an agent reaches the Wazuh server and where it fails

The path starts with the agent installed on an endpoint, which enrolls with the Wazuh server and then keeps a persistent connection open to it. The server analyzes the incoming data with decoders and rules, and the resulting alerts are stored in the Wazuh indexer and shown in the Wazuh dashboard. Each hand-off is a decision point in triage: confirm the agent was installed on the right host, that enrollment completed and the key was accepted, that the connection stays open, and that alerts reach the indexer. Work through these checks in order before changing configuration.

Enrollment, connection and alert path, with the points where agent faults appear.

Security checks while you troubleshoot

Enrollment problems tempt teams into shortcuts that weaken the trust between agents and the manager. The four cards below cover the shortcuts most often taken under pressure and the controls that keep an agent fix from becoming a security gap.

Avoid disabling certificate checks

When an agent cannot reach the manager, a common shortcut is turning off TLS verification in a script or on the endpoint. That hides the real fault, which is usually a wrong hostname, an expired or untrusted certificate chain, or a proxy intercepting traffic. Verify the certificate and the name the agent connects to before changing any setting, and keep verification on in every environment, including test hosts that later become templates.

Control who can re-enroll agents

Re-enrolling an agent issues it new credentials, so anyone who can trigger enrollment can effectively replace an endpoint's identity. During troubleshooting, several engineers often try enrollment at once, which makes it hard to know which host registered under which name. Decide in advance which administrators may run enrollment and approve re-enrollment of an existing agent, and review the registration list after each session.

Keep enrollment credentials out of scripts

Enrollment passwords pasted into shell history, configuration management variables, chat threads or tickets remain readable long after the incident closes. Pass them through a secrets store or a prompt at run time, and rotate the enrollment password once a troubleshooting effort ends. Ask your team to confirm how the current enrollment password is set and where copies of it already exist.

Record every key and name change

Changing an agent key or renaming a host changes which record the manager trusts, so these changes need a trail. Log the date, the operator, the affected agent ID and name, and the reason for each action, and keep the before and after state of the key registry. This record lets you prove later which agent sent which events and explains gaps in monitoring coverage during the incident.

Questions teams ask before bringing in outside help

How long does troubleshooting Wazuh agents that will not connect usually take?

The time depends on how many agents are affected and how many causes sit behind them. A single agent with a blocked port or a mistyped manager address is usually a short exercise once the logs are read. A fleet where agents show as never connected across several operating systems, or where duplicate names and key mismatches overlap, takes longer because each cause has to be isolated and confirmed. Drivers include the number of distinct failure patterns, access to the manager and endpoints, whether the cluster or a load balancer sits in front of the manager, and how quickly change windows can be opened. Ask for the time estimate to be tied to a list of affected agent groups and operating systems, not to a total headcount of agents.

What does the client team need to provide for an agent troubleshooting engagement?

The work needs read access to the Wazuh server and the affected endpoints, plus the agent and manager logs that show enrollment and connection attempts. In practice that means:

  • Shell or console access to the manager, cluster nodes and a sample of agents on each operating system in scope
  • Network details for the path between agents and the manager, including firewall rules and any load balancer or proxy
  • Change windows for restarting agents, editing configuration or re-enrolling endpoints
  • A named contact who can approve changes to agent groups, certificates or the enrollment password
  • A list of recent changes, such as upgrades, new templates or network moves, that may have preceded the failures
Can our own team fix Wazuh agents that never connect without a partner?

Often yes, if the team has someone comfortable reading agent and manager logs, testing ports and checking the enrollment settings. The common causes are well documented in the Wazuh documentation, and a team that works through them methodically can resolve many single-agent cases alone. A partner adds value when the issue is spread across many endpoints, when the logs point to certificate or key problems that affect trust between components, or when the team cannot schedule the change windows needed to test fixes safely. Decide based on how many agents are affected, how often the problem recurs and whether the knowledge will stay in the team after the engagement.

What does a fixed-scope Wazuh agent troubleshooting engagement include?

A fixed-scope engagement is agreed in writing before work starts, so the scope names the systems, agent groups and failure symptoms in view. A typical written scope covers the following:

  • Review of manager, indexer and agent logs for the agreed operating systems and groups
  • Checks on network paths, ports and certificates relevant to enrollment and connection
  • Root cause notes for each failure pattern, with the fix applied or a documented change for the client to make
  • Verification that agents reach the expected connected state after the fix
  • A short handover that records what was changed and how to recognize the same problem again

Agents, systems or tests outside the written list are not covered until the scope is amended.

What should we ask for in a quote for Wazuh agent troubleshooting?

Ask for a quote that follows from a written scope and lists each deliverable separately. The quote should state the systems and agent groups covered, the operating systems in scope, the access the client must grant, the verification steps used to confirm agents connect, and what happens if new failure patterns appear during the work. Ask whether the fixes are applied by the partner or delivered as instructions, whether a retest is included and how any follow-up is priced. DeployOpen does not publish a price list, so the quote is the source for cost. Compare quotes on the same scope, not on the headline figure alone.

Which factors make Wazuh agent connection problems more expensive to fix?

Cost rises with the number of distinct causes, the spread of endpoints and the constraints on access and change. Each operating system adds its own log locations and service behavior, so a mixed fleet takes more effort than a uniform one. Certificate and key problems, duplicate agent names and failures behind a cluster or load balancer require more careful testing because a wrong change can disconnect agents that currently work. Restricted networks, air-gapped segments and strict change control add waiting time. Ask the provider to state which of these factors the quote assumes, so the price can be checked against the actual environment.

Does troubleshooting agent enrollment touch our security controls?

Yes, it can. Enrollment involves the enrollment password, agent keys and certificates, which decide which endpoints the manager trusts. Changing them without a plan can expose the enrollment path or break trust for agents that already work. A careful engagement limits access to the minimum needed, records every change, and avoids copying secrets into tickets or chat. Confirm with your security team which credentials the work may touch, where logs containing identifiers will be stored, and how the access used during the work will be removed afterward.

How DeployOpen works on this

DeployOpen approaches agents that never enroll or drop off the manager as a scoped diagnostic job. We confirm the affected endpoints, the manager and network path, and the evidence needed before changing anything, then fix and verify inside your own infrastructure.

How we scope

  • We agree in writing which operating systems, agent versions, network segments and Wazuh server nodes the work covers.
  • We list the symptoms in scope, such as never connected, disconnected, duplicate names and enrollment password failures, so the fix boundary is clear.
  • Engagements are fixed-scope, and ongoing support is available as a retainer if your agent fleet needs continued attention.

How we build

  • We check ports, DNS, firewall rules and agent logs on a sample of affected hosts before changing enrollment or key settings.
  • We correct enrollment credentials, agent keys and certificate trust in a controlled order, recording each change and its result.
  • We test each fix on representative endpoints, confirming agents report as active in the manager and their inventory appears in the dashboard.

How we hand over

  • You receive a written record of root causes, the changes made per host group, and the log locations used for each operating system.
  • We document a repeatable checklist your operations team can run when a new agent fails to enroll or a connection drops.
  • We walk your engineers through the checklist and the verification steps so they can repeat the diagnosis without us.

How we support

  • We can retest agent connectivity after your next Wazuh patch release or a change to network or firewall policy.
  • Retainers can cover recurring agent health checks and help with new endpoint groups as your fleet grows.
  • Ask us to confirm response expectations and what the retainer includes before you sign, since these are set in the written scope.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.