# Failed migration of system indices (.triggered\_watches) with Upgrade Assistant using v7.17.14

**URL:** <https://discuss.elastic.co/t/failed-migration-of-system-indices-triggered-watches-with-upgrade-assistant-using-v7-17-14/346966>\
**Category:** Elasticsearch\
**Tags:** migration\
**Created:** [November 13, 2023, 8:32am UTC](https://discuss.elastic.co/t/failed-migration-of-system-indices-triggered-watches-with-upgrade-assistant-using-v7-17-14/346966 "2023-11-13T08:32:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AEA27](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aea27/32/124389_2.png) [@AEA27](https://discuss.elastic.co/u/AEA27)\
**Post date:** [November 13, 2023, 8:32am UTC](https://discuss.elastic.co/t/failed-migration-of-system-indices-triggered-watches-with-upgrade-assistant-using-v7-17-14/346966/1 "2023-11-13T08:32:18Z")

</div>

Using the upgrade assistant the migration of system indices fails for watcher which we're using. We're using elastic cloud and trying to migrate to Elasticsearch 8. Another fun fact is that the index that is failing to reindex is empty.

```auto
GET .triggered_watches/_count

```

returns

```auto
#! this request accesses system indices: [.triggered_watches], but in a future major version, direct access to system indices will be prevented by default
{
  "count" : 0,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  }
}

```

The error message is the following

```auto
[instance-0000000013] unable to create new index [.triggered_watches-reindexed-for-8] from feature [watcher] because it would match composable template [.triggered_watches]
[instance-0000000013] task [upgrade-system-indices] failed with an exception java.lang.IllegalStateException: unable to create new index [.triggered_watches-reindexed-for-8] because it would match composable template [.triggered_watches] at org.elasticsearch.upgrades.SystemIndexMigrator.migrateSingleIndex(SystemIndexMigrator.java:399) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.upgrades.SystemIndexMigrator.lambda$run$3(SystemIndexMigrator.java:213) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.upgrades.SystemIndexMigrator.lambda$updateTaskState$11(SystemIndexMigrator.java:359) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:136) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.action.ActionListener$MappedActionListener.onResponse(ActionListener.java:101) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:31) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:88) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:82) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:31) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$applyInternal$2(SecurityActionFilter.java:192) [x-pack-security-7.17.14.jar:7.17.14] at org.elasticsearch.action.ActionListener$DelegatingFailureActionListener.onResponse(ActionListener.java:219) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.action.ActionListener$DelegatingActionListener.onResponse(ActionListener.java:186) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.action.ActionListener$MappedActionListener.onResponse(ActionListener.java:101) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.persistent.PersistentTasksClusterService$4.clusterStateProcessed(PersistentTasksClusterService.java:267) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.cluster.service.MasterService$SafeClusterStateTaskListener.clusterStateProcessed(MasterService.java:645) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.cluster.service.MasterService$TaskOutputs.lambda$processedDifferentClusterState$1(MasterService.java:517) [elasticsearch-7.17.14.jar:7.17.14] at java.util.ArrayList.forEach(ArrayList.java:1596) [?:?] at org.elasticsearch.cluster.service.MasterService$TaskOutputs.processedDifferentClusterState(MasterService.java:517) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.cluster.service.MasterService.onPublicationSuccess(MasterService.java:322) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.cluster.service.MasterService.publish(MasterService.java:314) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.cluster.service.MasterService.runTasks(MasterService.java:287) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.cluster.service.MasterService.access$100(MasterService.java:63) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.cluster.service.MasterService$Batcher.run(MasterService.java:170) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed(TaskBatcher.java:146) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run(TaskBatcher.java:202) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:718) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:262) [elasticsearch-7.17.14.jar:7.17.14] at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:225) [elasticsearch-7.17.14.jar:7.17.14] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) [?:?] at java.lang.Thread.run(Thread.java:1583) [?:?]

```

---

<div class="post-metadata">

**Author:** ![William\_Brafford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/william_brafford/32/51559_2.png) [@William\_Brafford](https://discuss.elastic.co/u/William_Brafford)\
**Post date:** [November 13, 2023, 9:05pm UTC](https://discuss.elastic.co/t/failed-migration-of-system-indices-triggered-watches-with-upgrade-assistant-using-v7-17-14/346966/2 "2023-11-13T21:05:23Z")

</div>

I'm sorry you're hitting this problem. I suggest deleting the composable template (system indices no longer use templates, but such templates may be left over from previous versions), and you should be able to proceed with the upgrade.

It should also be fine to delete an empty `.triggered_watches` index.

---

<div class="post-metadata">

**Author:** ![AEA27](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aea27/32/124389_2.png) [@AEA27](https://discuss.elastic.co/u/AEA27)\
**Post date:** [November 14, 2023, 1:21pm UTC](https://discuss.elastic.co/t/failed-migration-of-system-indices-triggered-watches-with-upgrade-assistant-using-v7-17-14/346966/3 "2023-11-14T13:21:01Z")

</div>

Thanks for the quick response.

It solved the issue for `.triggered)watches` but now we're facing the same issue with `.watches`, unfortunately we have a few "watches" so we can't just delete the index, what would you recommend to do in this kind of situations?

Thanks

---

<div class="post-metadata">

**Author:** ![William\_Brafford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/william_brafford/32/51559_2.png) [@William\_Brafford](https://discuss.elastic.co/u/William_Brafford)\
**Post date:** [November 27, 2023, 4:37pm UTC](https://discuss.elastic.co/t/failed-migration-of-system-indices-triggered-watches-with-upgrade-assistant-using-v7-17-14/346966/4 "2023-11-27T16:37:55Z")

</div>

Sorry for taking a long time to respond. I was on vacation.

If you are still getting a message like this one, but with `.watches` instead of `.triggered_watches`, you can delete the

> [@AEA27](#):
>
> `[instance-0000000013] task [upgrade-system-indices] failed with an exception java.lang.IllegalStateException: unable to create new index [.triggered_watches-reindexed-for-8] because it would match composable template [.triggered_watches]`

You can [delete the index template](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-template.html) without affecting the index at all. In this case, you'd have something like

```auto
DELETE /_index_template/.watches,.triggered_watches

```

These templates were created before Elasticsearch had the "system index" feature, and Elasticsearch now uses a different internal mechanism to create settings and mappings for `.watches` and `.triggered_watches`.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 25, 2023, 4:38pm UTC](https://discuss.elastic.co/t/failed-migration-of-system-indices-triggered-watches-with-upgrade-assistant-using-v7-17-14/346966/5 "2023-12-25T16:38:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
