# Troubles when upgrading from 5.2.2 to 5.5.2

**URL:** <https://discuss.elastic.co/t/troubles-when-upgrading-from-5-2-2-to-5-5-2/98370>\
**Category:** Elasticsearch\
**Created:** [August 25, 2017, 1:16pm UTC](https://discuss.elastic.co/t/troubles-when-upgrading-from-5-2-2-to-5-5-2/98370 "2017-08-25T13:16:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aeryaguzov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aeryaguzov/32/4072_2.png) [@aeryaguzov](https://discuss.elastic.co/u/aeryaguzov)\
**Post date:** [August 25, 2017, 1:16pm UTC](https://discuss.elastic.co/t/troubles-when-upgrading-from-5-2-2-to-5-5-2/98370/1 "2017-08-25T13:16:40Z")

</div>

Hi!

I'm adding new node to existing ES cluster. This cluster is running under 5.2.2

I'm install ES through Debian packages, so latest version for now is 5.5.2.

Node was added successfully, but when I enable relocation some shards were moved to this node, they became unassigned and I saw this error on this node:

> [2017-08-25T15:02:17,690][WARN][o.e.i.c.IndicesClusterStateService] [sample] [[smaple\_index][6]] marking and sending shard failed due to [failed to create index]  
> java.lang.StringIndexOutOfBoundsException: String index out of range: -3  
> at java.lang.String.substring(String.java:1967) ~[?:1.8.0\_144]  
> at org.elasticsearch.common.logging.DeprecationLogger.extractWarningValueFromWarningHeader(DeprecationLogger.java:247) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0\_144]  
> at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[?:1.8.0\_144]  
> at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0\_144]  
> at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0\_144]  
> at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0\_144]  
> at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0\_144]  
> at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0\_144]  
> at org.elasticsearch.common.util.concurrent.ThreadContext$ThreadContextStruct.putResponse(ThreadContext.java:446) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.common.util.concurrent.ThreadContext$ThreadContextStruct.access$1100(ThreadContext.java:352) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.common.util.concurrent.ThreadContext.addResponseHeader(ThreadContext.java:280) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.common.logging.DeprecationLogger.deprecated(DeprecationLogger.java:285) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.common.logging.DeprecationLogger.deprecated(DeprecationLogger.java:124) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.common.settings.Settings.getAsBoolean(Settings.java:348) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.index.analysis.PatternCaptureGroupTokenFilterFactory.(PatternCaptureGroupTokenFilterFactory.java:48) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.indices.analysis.AnalysisModule$1.get(AnalysisModule.java:353) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.index.analysis.AnalysisRegistry.buildMapping(AnalysisRegistry.java:342) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.index.analysis.AnalysisRegistry.buildTokenFilterFactories(AnalysisRegistry.java:171) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.index.analysis.AnalysisRegistry.build(AnalysisRegistry.java:155) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.index.IndexService.(IndexService.java:145) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.index.IndexModule.newIndexService(IndexModule.java:363) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.indices.IndicesService.createIndexService(IndicesService.java:449) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.indices.IndicesService.createIndex(IndicesService.java:414) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.indices.IndicesService.createIndex(IndicesService.java:148) ~[elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.indices.cluster.IndicesClusterStateService.createIndices(IndicesClusterStateService.java:444) [elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyClusterState(IndicesClusterStateService.java:202) [elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.cluster.service.ClusterService.callClusterStateAppliers(ClusterService.java:814) [elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.cluster.service.ClusterService.publishAndApplyChanges(ClusterService.java:768) [elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.cluster.service.ClusterService.runTasks(ClusterService.java:587) [elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.cluster.service.ClusterService$ClusterServiceTaskBatcher.run(ClusterService.java:263) [elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed(TaskBatcher.java:150) [elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run(TaskBatcher.java:188) [elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:569) [elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:247) [elasticsearch-5.5.2.jar:5.5.2]  
> at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:210) [elasticsearch-5.5.2.jar:5.5.2]  
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0\_144]  
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0\_144]  
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0\_144]

I've downgraded this node to 5.2.2 and shards became active.

Then I've upgraded to 5.5.2 one existing node from my cluster and saw the same error.

I did not see any breaking change in index structure. What is going on and how I can fix this ?

---

<div class="post-metadata">

**Author:** ![immavalls](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/immavalls/32/146501_2.png) [@immavalls](https://discuss.elastic.co/u/immavalls)\
**Post date:** [August 25, 2017, 2:25pm UTC](https://discuss.elastic.co/t/troubles-when-upgrading-from-5-2-2-to-5-5-2/98370/2 "2017-08-25T14:25:50Z")

</div>

Are you following the steps for a cluster upgrade?  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html)  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html)

---

<div class="post-metadata">

**Author:** ![aeryaguzov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aeryaguzov/32/4072_2.png) [@aeryaguzov](https://discuss.elastic.co/u/aeryaguzov)\
**Post date:** [August 28, 2017, 10:18am UTC](https://discuss.elastic.co/t/troubles-when-upgrading-from-5-2-2-to-5-5-2/98370/3 "2017-08-28T10:18:11Z")

</div>

Yes, I do.

---

<div class="post-metadata">

**Author:** ![immavalls](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/immavalls/32/146501_2.png) [@immavalls](https://discuss.elastic.co/u/immavalls)\
**Post date:** [August 28, 2017, 12:44pm UTC](https://discuss.elastic.co/t/troubles-when-upgrading-from-5-2-2-to-5-5-2/98370/4 "2017-08-28T12:44:37Z")

</div>

How many indexes do you have? Do they all fail in the new node?

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [August 28, 2017, 3:26pm UTC](https://discuss.elastic.co/t/troubles-when-upgrading-from-5-2-2-to-5-5-2/98370/5 "2017-08-28T15:26:07Z")

</div>

Hi @aeryaguzov,

that's tricky. I tried now reproducing your problem locally but without any "luck". ☹

There seems to be a problem when formatting a deprecation log message. The deprecation log message is most likely caused by a `pattern_capture` token filter that uses the setting `preserve_original` but does not use one of the values `true`, `false`, `"true"`, `"false"` (Elasticsearch also still accepts `0`, `1`, `"off"`, `"on"`, `"no"` and `"yes"` until 6.0 but that is deprecated, hence the warning).

One option to get rid of the error is to fix the configuration prior to upgrading. As a consequence, no deprecation log message will get written and you should not get caught by the bug. I'd recommend that you check your index settings and ensure that only valid representations of booleans (i.e. `true`, `false`, `"true"`, `"false"`) are used. See the docs [how to update analysis settings on an index](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html#update-settings-analysis).

It would be great if you could share the affected configuration because this could be helpful in resolving this problem in general.

Daniel

---

<div class="post-metadata">

**Author:** ![aeryaguzov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aeryaguzov/32/4072_2.png) [@aeryaguzov](https://discuss.elastic.co/u/aeryaguzov)\
**Post date:** [August 29, 2017, 6:55am UTC](https://discuss.elastic.co/t/troubles-when-upgrading-from-5-2-2-to-5-5-2/98370/6 "2017-08-29T06:55:41Z")

</div>

Hi @danielmitterdorfer ,

Thanks for your help!

You are right. The problem was in `preserve_original` value which was "1".

---

<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:** [September 26, 2017, 6:56am UTC](https://discuss.elastic.co/t/troubles-when-upgrading-from-5-2-2-to-5-5-2/98370/7 "2017-09-26T06:56:02Z")

</div>

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