Catalog Search index process unknown error

I installed magento 2.4
Elasticsearch 7.6.0 CentOS 7
when I run bin/magento indexer:reindex

show me

Catalog Search index process unknown error:
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"No handler for type [text] declared on field [_search]"}],"type":"mapper_parsing_exception","reason":"No handler for type [text] declared on field [_search]"},"status":400}

please help fix this

Hi @Tom and welcome.

I’ve not come across this issue before, but a quick Google search suggests either:

  1. Elasticsearch is not running
  2. Elasticsearch is misconfigured

Running the following should indicate whether it’s running:

curl -X GET 'http://localhost:9200'

You should expect a result like this:

{
  "name" : "Magento",
  "cluster_name" : "Primary Cluster",
  "cluster_uuid" : "7ymV1F7HTw2RuScEDaimvQ",
  "version" : {
    "number" : "7.6.0",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "7f634e9f44834fbc12724506cc1da681b0c3b1e3",
    "build_date" : "2020-02-06T00:09:00.449973Z",
    "build_snapshot" : false,
    "lucene_version" : "8.4.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
1 Like

Thank you sir . after run show me

{
  "name" : "Magento Node",
  "cluster_name" : "Magento Cluster",
  "cluster_uuid" : "5tSUeEX5RHu_mjVOgHKO5g",
  "version" : {
    "number" : "2.4.6",
    "build_hash" : "5376dca9f70f3abef96a77f4bb22720ace8240fd",
    "build_timestamp" : "2017-07-18T12:17:44Z",
    "build_snapshot" : false,
    "lucene_version" : "5.5.4"
  },
  "tagline" : "You Know, for Search"
}

number" : “2.4.6” ?

So how can upgrade the Elasticsearch ?

thanks you

It depends how you installed it to begin with.

So I am no idea for this now . How can I check ?

yes I reinstall elasticsearch-7.6.0

but show me this , how can fix it .thanks

elasticsearch.service changed on disk. Run ‘systemctl daemon-reload’ to reload units.
Job for elasticsearch.service failed because the control process exited with error code. See “systemctl status elasticsearch.service” and “journalctl -xe” for details.

when I run sudo systemctl status elasticsearch.service

show me ` elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vend or preset: disabled)
Active: failed (Result: exit-code) since Mon 2020-09-21 20:14:43 EDT; 24min a go
Docs: https://www.elastic.co
Process: 1593 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${P ID_DIR}/elasticsearch.pid --quiet (code=exited, status=203/EXEC)
Main PID: 1593 (code=exited, status=203/EXEC)

Sep 21 20:14:43 172-96-142-42.cprapid.com systemd[1]: Starting Elasticsearch…
Sep 21 20:14:43 172-96-142-42.cprapid.com systemd[1593]: Failed at step EXEC …
Sep 21 20:14:43 172-96-142-42.cprapid.com systemd[1]: elasticsearch.service: …
Sep 21 20:14:43 172-96-142-42.cprapid.com systemd[1]: Failed to start Elastic…
Sep 21 20:14:43 172-96-142-42.cprapid.com systemd[1]: Unit elasticsearch.serv…
Sep 21 20:14:43 172-96-142-42.cprapid.com systemd[1]: elasticsearch.service f…
Warning: elasticsearch.service changed on disk. Run ‘systemctl daemon-reload’ to reload units.
Hint: Some lines were ellipsized, use -l to show in full.
`

The message you copy/pasted tells you to run:

systemctl daemon-reload

nothing happen

Restart Elasticsearch. This will generate a new error log.

sudo systemctl restart elasticsearch

Then run the following command

sudo journalctl -u elasticsearch

This will show you the most recent logs, which should hopefully provide more information as to why elasticsearch is not starting correctly.

thank you help
Got the answer.

for centos 7.7 1

Edit the file /etc/sysconfig/elasticsearch

Changing the ES_JAVA_OPTS="-Djna.tmpdir=/var/lib/elasticsearch/tmp" worked

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