Failing ElasticSearch migration
If ElasticSearch indices have been created with an invalid name, the ElasticSearch migration will fail with the following error:
BASH
2026-Feb-18 12:39:57 PM [main] ERROR com.veridiumid.persistence.migration.Main
co.elastic.clients.elasticsearch._types.ElasticsearchException: [es/indices.create] failed: [invalid_alias_name_exception]
Invalid alias name [ELK_KEYSPACE.ELK_INDEXNAME]: an index or data stream exists with the same name as the alias
java.lang.RuntimeException: co.elastic.clients.elasticsearch._types.ElasticsearchException: [es/indices.create]
failed: [invalid_alias_name_exception] Invalid alias name [ELK_KEYSPACE.ELK_INDEXNAME]: an index or data stream exists
with the same name as the alias
Resolution:
Delete the incorrectly named indices and re-run the migration.
To delete the indices run the following command:
BASH
eops -x=DELETE -p=/ELK_KEYSPACE.ELK_INDEXNAME
# Or without using an alias
bash /opt/veridiumid/elasticsearch/bin/elasticsearch_ops.sh -x=DELETE -p=/ELK_KEYSPACE.ELK_INDEXNAME
To re-run the migration you can use the following commands:
BASH
## this is just to test during the update process
bash /opt/veridiumid/migration/bin/migration.sh -i /etc/veridiumid/update-procedure/current/resources/migration_list.yaml
# Or
bash /opt/veridiumid/migration/bin/elk_ops.sh --update-settings
## because index was delete, it should be restored; depending on the index, one of below should be executed. Restore specific data
## for deprovision
identity_deprovision-000001
/opt/veridiumid/migration/bin/migrate_to_elk.sh -x
## for dormant device
dormant_device-000001
/opt/veridiumid/migration/bin/migrate_to_elk.sh -y
## for accounts
/opt/veridiumid/migration/bin/migrate_to_elk.sh -a
accounts-000001
## for identities
/opt/veridiumid/migration/bin/migrate_to_elk.sh -p
profiles-000001
## for fido devices
/opt/veridiumid/migration/bin/migrate_to_elk.sh -f
fido_devices-000001
## for devices
/opt/veridiumid/migration/bin/migrate_to_elk.sh -d
devices-000001
Example:
CODE
eops -l | grep dormant_device
##correct answer is with 000001 at the end.
dev642601221816.dormant_device-000001
##wrong index
dev642601221816.dormant_device
eops -x=DELETE -p=/dev642601221816.dormant_device
bash /opt/veridiumid/migration/bin/elk_ops.sh --update-settings
/opt/veridiumid/migration/bin/migrate_to_elk.sh -y