Magento 2 + Elasticsearch indexing error

Hello,

My Magento 2 website (2.4.6) was working with Elasticsearch until I installed
a payment module from Adobe and its dependencies:

I now have an error while indexing :

Catalog Search index process error during indexation process:
{"error":"no handler found for uri [/magento2_product_1_v23/document/_mapping?include_type_name=true] and method [PUT]"}

I checked Elasticsearch files and no updates seems to have been done, so current version was the one that was working i.e. 8.11.4

curl localhost:9200
{
  "name" : "vps-f8865e14",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "jVK-pJXXRxW15PpCAgjRug",
  "version" : {
    "number" : "8.11.4",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "da06c53fd49b7e676ccf8a32d6655c5155c16d81",
    "build_date" : "2024-01-08T10:05:08.438562403Z",
    "build_snapshot" : false,
    "lucene_version" : "9.8.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}

Thank you for your help !

Regards
Alex

This URL is not supported in Elasticsearch 8.x.

I guess this updated Elasticsearch?

You need to upgrade your magento module I think and find one which is compatible with Elasticsearch 8.x.

Hello David,

Thank you for your answer.

No, it does not update ES to 8.11. It was already 8.11.

Effectively, something in the module does not support ES 8.x
The module provider managed to make it work with ES 7.9.3.

I read everywhere it was not possible to downgrade ES...

Is there a solution to uninstall ES 8 and install ES 7 without having to reinstall the all server?

Thank you again

Regards

Alex

So if Elasticsearch was not updated, the magento module or the magento settings were updated.

You need to find what changed if it's not Elasticsearch.

You cannot downgrade and anyway that'd probably not change the behavior as the problem is elsewhere.

I'm wondering if you had a proxy like nginx previously or something like that which was rewriting the url.

Could you share the full logs of elasticsearch as well?

So if Elasticsearch was not updated, the magento module or the magento settings were updated.

You need to find what changed if it's not Elasticsearch.

The module was installed (it was not present before), with all its dependencies.

You cannot downgrade and anyway that'd probably not change the behavior as the problem is elsewhere.

Just to understand : If I desinstall ES 8 completely, including ES Config files and Data, Why will I not be able to resintall ES 7.9.3? I could after recreates the data by launching the magento indexer, no? What do I miss? (sorry if the question is stupid, I am new to ES...)

NB: The module vendor tested successfully Magento 2.4.6 + ES 7.9.3 + the module last version.

Could you share the full logs of elasticsearch as well?

(Issue started at around 19:30 the 24-03-14, after module installation)

Thank again for your help

You can do this, but this is not a downgrade, it is a new install.

What you cannot do is downgrade a current installation of Elasticsearch to a lower version, this does not work, but if you remove the data and settings, then you are in fact removing elasticsearch and installing a new and fresh one.

Do you have a setting in Magento where you can define the document type to be _doc instead of document?

From what I can read in the Magento 2.4.6 doc, it's compatible with Elasticsearch 8.
But I believe that you should better ask the Magento community for this.

I looked at the logs and there's nothing weird IMO.
Just that the node seems to be restarted everyday and the catalog rebuilt everyday.

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