Upgrade Woes

So, I guess let's start at the beginning.

We've been working with elasticsearch for a bit of time now. The version we are running is 2.3.3. We run it in a cluster in all of our instances, but now want to upgrade to 6.x to take advantage of new features. I went ahead and installed the 2.3.3 version on a standalone machine, and did a snapshot restore of a cluster into a single instance so I could do a test migration.

So, I installed the migration assistant. It had me do a number of config changes before claiming I was ready to upgrade to 5.6.

I download the latest 5.6 (5.6.8, i think), and did the upgrade. I then hit a SLEW of issues that I had to figure out that could have easily been a part of the migration assistant. But, over a half a day of pulling my hair out, I figured them out.

And now to my current issue.

In 2.3.3, we use the mapper-attachment plugin. We know that this is an issue, so before even beginning the upgrade, we deleted all of our attachments and removed the plugin.

But, that wasnt good enough. It's now complaining about handlers on fields, even though we've removed the data. Here's what I'm seeing (edited to reduce verbosity):

  1. Error injecting constructor, java.lang.IllegalStateException: unable to upgrade the mappings for the index [[externaldocs/-j3KAyKwRIeU
    iO7VKFjI5w]]
    Caused by: MapperParsingException[Failed to parse mapping [avs]: No handler for type [attachment] declared on field [doc]]; nested: Mappe
    rParsingException[No handler for type [attachment] declared on field [doc]];
  2. Error injecting constructor, java.lang.IllegalStateException: unable to upgrade the mappings for the index [[articles_v6/3HEZ79lnRSSee
    ztsKXA4Cg]]
    Caused by: MapperParsingException[Failed to parse mapping [guide]: No handler for type [attachment] declared on field [doc]]; nested: Map
    perParsingException[No handler for type [attachment] declared on field [doc]];
  3. Error injecting constructor, java.lang.IllegalStateException: unable to upgrade the mappings for the index [[externaldocs/-j3KAyKwRIeU
    iO7VKFjI5w]]
    Caused by: MapperParsingException[Failed to parse mapping [avs]: No handler for type [attachment] declared on field [doc]]; nested: Mappe
    rParsingException[No handler for type [attachment] declared on field [doc]];
  4. Error injecting constructor, java.lang.IllegalStateException: unable to upgrade the mappings for the index [[metadata/W8dlI6DbT8uoYE_A
    nS-LLg]]
    Caused by: MapperParsingException[Failed to parse mapping [collections]: No handler for type [attachment] declared on field [doc]]; neste
    d: MapperParsingException[No handler for type [attachment] declared on field [doc]];

So, now I have a new version of elasticsearch on my server, which I cannot start. Can someone give me a nudge in the right direction on where to go from here?

Sounds like you still have a mapping somewhere which is using an attachments type.

Hey Carpesimia,

Upgrades from version 1 and version 2 of elastic are super painful. You will have scars however it gets better in the more current versions. So all I can provide is sympathy.

When you sort out this issue please remember that you need to reindex your data in es 5, before upgrading to es 6. And then reindex in 6 to get the benefits of 6. Its super inconvenient.

If you had not performed the first upgrade I would be recommending to just sett up a new es 6.X cluster and logstashing everything, index at a time from the exist cluster into the new cluster.

Best of luck :slight_smile:

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