1

I installed Elasticsearch and when I want to reinxed Magento by the below command it gives me an error. php bin/magento indexer:reindx

Amasty: Advanced Search  - Categories index has been rebuilt successfully in 00:00:00

Catalog Search index process unknown error: No alive nodes found in your cluster I know if I restart the elasticsearch the error has been fixed.but I needs to a real solution.

-Xms1g

-Xmx6g

3
  • 1
    could you please provide some more details - did you configure your Magento installation to connect to the Elasticsearch service?
    – Diana
    Commented Feb 2, 2021 at 9:45
  • @DianaBotean hi dani...yes all things are okay. when I check the elastic configuration it's okay...when I test the connection it's okay...it just happens when I want to reindex. actually, all indexer has been passed just catalog search has problem Commented Feb 2, 2021 at 12:02
  • can you check if you have any errors on ES side? Check if you can use this resource elastic.co/guide/en/elasticsearch/reference/current/… to find your logs. Maybe it runs out of memory in the process or something.
    – Diana
    Commented Feb 2, 2021 at 15:00

3 Answers 3

2

I had this issue with a site yesterday and just shut down Elastic Search on the server and started it back up again.

sudo systemctl stop elasticsearch.service

sudo systemctl start elasticsearch.service

Obviously if this becomes a recurring problem, then this won't be a sufficient answer and would need debugging further.

Thought I would add though just in case it gets it working for you in the interim.

1

Set xmx and xms to the same value

Elasticsearch will assign the entire heap specified in jvm.options via the Xms (minimum heap size) and Xmx (maximum heap size) settings. These two settings must be equal to each other.

See elastic docu: https://www.elastic.co/guide/en/elasticsearch/reference/7.10/important-settings.html#heap-size-settings

Also sometimes we have seen that there are many indicies in the cluster (many of them not even used any more, with standard M2.4 this should not be a problem, it rewirtes the indicies), but you can check this on the search server:

# check how many are there
curl localhost:9200/_cat/indices
# delete all, or only some if you specify something other than *
curl -XDELETE localhost:9200/*

reindex after deleting all ;)

0

It was because of the server ram. after reboot the system (or you can release ram by close the unnasesry app), the problem has been gone. Also, you can set -Xms1g to 256m.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.