# 🛠️ Breaking the Migration Lockge

#   


The "Another process is migrating" error occurs when the dashboard service is interrupted while recreating its internal indices. Follow these steps **in exact order** to clear the lock.

<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>### Stop the Dashboard Service

You must stop the service to ensure no active processes are attempting to write to the index during the cleanup.

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

<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>### Clear the Stuck System Index

This removes the "half-finished" index that is causing the `resource_already_exists_exception` and migration lock.

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

<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>### Start and Allow Initialization

Restart the service. The dashboard will now see that the index is missing and recreate it cleanly.

```
sudo systemctl start wazuh-dashboard
```

#### ⚠️ The "5-Minute Rule"

<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></div><div style="margin-top: 32px; padding: 16px; background-color: #fffbdd; border: 1px solid #d1d5da; border-left: 6px solid #e36209; border-radius: 6px;">**Do not refresh your browser for 5 minutes.** The dashboard is performing a heavy background migration. Interrupting this will recreate the migration lock, forcing you back to Step 1.</div></div>####   