How to Fix Conflicting Node ID in Consul
Why Does This Occur?
This issue typically happens when:
- Restoring a VPS from snapshot or backup
- The restored instance retains the same node ID as the original VPS
Resolution Steps
-
Remove the existing node ID to generate a new one:
sudo rm /opt/consul/node-id
Note: On Ubuntu 24.04, the node-id is typically located at /opt/consul/node-id
-
If the file location is unknown, use this command to find and remove it:
sudo find / -name "node-id" -exec rm -f {} \;
-
Restart Consul to apply the changes
sudo service consul restart