# 📡 Fixing Disconnected Agents

#   


When an agent shows as **Disconnected**, it is usually due to a service failure on the endpoint or a network/firewall block between the endpoint and the Wazuh Manager.

<div class="page-content" id="bkmrk-1" style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; line-height: 1.5; color: #24292e;"><div style="margin-top: 24px;"><div style="display: flex; align-items: flex-start; margin-bottom: 24px;"><div style="background-color: #206afb; color: white; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-weight: bold; margin-right: 12px; flex-shrink: 0;">1</div><div style="flex-grow: 1;">  
</div></div></div></div>### Restart Service on Hestia VM

Log into the Hestia VM and restart the agent. This often restores the connection after a server-side outage.

```
sudo systemctl restart wazuh-agent
```

<div class="page-content" id="bkmrk-2" style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; line-height: 1.5; color: #24292e;"><div style="margin-top: 24px;"><div style="display: flex; align-items: flex-start; margin-bottom: 24px;"><div style="flex-grow: 1;"></div></div><div style="display: flex; align-items: flex-start; margin-bottom: 24px;"><div style="background-color: #206afb; color: white; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-weight: bold; margin-right: 12px; flex-shrink: 0;">2</div><div style="flex-grow: 1;">  
</div></div></div></div>### Verify Connection Status

Check the agent logs on the Hestia VM to see if it is successfully "handshaking" with the Manager.

```
sudo tail -f /var/ossec/logs/ossec.log | grep -iE "error|warn|connected"
```

<div class="page-content" id="bkmrk-3" style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; line-height: 1.5; color: #24292e;"><div style="margin-top: 24px;"><div style="display: flex; align-items: flex-start; margin-bottom: 24px;"><div style="flex-grow: 1;"></div></div><div style="display: flex; align-items: flex-start; margin-bottom: 24px;"><div style="background-color: #206afb; color: white; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-weight: bold; margin-right: 12px; flex-shrink: 0;">3</div><div style="flex-grow: 1;">  
</div></div></div></div>### Test Connectivity to Port 1514

Wazuh agents communicate via **TCP Port 1514**. Run this from the Hestia VM to ensure the port is open on the SIEM server.

```
# Replace with your Wazuh Manager IP
nc -zv wazuh.msls.tech 1514
```

<div class="page-content" id="bkmrk-" style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; line-height: 1.5; color: #24292e;"><div style="margin-top: 24px;"><div style="display: flex; align-items: flex-start; margin-bottom: 24px;"><div style="flex-grow: 1;"></div></div></div><div style="margin-top: 32px; padding: 16px; background-color: #fffbdd; border: 1px solid #d1d5da; border-left: 6px solid #e36209; border-radius: 6px;">  
</div></div>#### ⚠️ Connection Issues in Oracle Cloud

Since Hestia is in Oracle Cloud, ensure your **VCN Ingress Rules** and the **OS Firewall (ufw/iptables)** on both sides allow traffic on Port 1514.