# 🛠️ Fixing Wazuh Dashboard Migration Loops

#   


If you keep seeing **“Wazuh dashboard server is not ready yet”** in a loop, the Wazuh Dashboard is almost always stuck on a **migration lock**. This typically happens after an interrupted upgrade or restart.

### 🔐 Security Warning

Never store real credentials in documentation. If a password was previously exposed on this page, **rotate it immediately**.

---

## 📋 Overview

- **Symptom:** Dashboard never finishes loading
- **Root cause:** Stuck `.kibana` migration index
- **Fix:** Remove the corrupted index and allow a clean rebuild

---

## ① Stop the Wazuh Dashboard

Stop the service to ensure no active writes occur during cleanup.

```bash
sudo systemctl stop wazuh-dashboard
```

---

## ② Remove the stuck Kibana index

This deletes the partially migrated UI index that causes the loop.

### ⚠️ Impact

<div class="callout warning" id="bkmrk-saved-dashboards-and">- Saved dashboards and visualizations may be reset
- Wazuh alerts and event data are **not** removed

</div>### Option A — Simple (placeholder password)

```bash
curl -k -u admin:'<PASSWORD>' -X DELETE "https://localhost:9200/.kibana*"
```

### Option B — Recommended (secure password prompt)

```bash
read -s -p "Password: " WAZUH_PASS; echo
curl -k -u "admin:${WAZUH_PASS}" -X DELETE "https://localhost:9200/.kibana*"
unset WAZUH_PASS
```