2

hi whenever i run reindex command in my console it keeps giving me following error : pleaae give me suggestion how can i resolve it ,

Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster in C:\xampp\htdocs\chase\vendor\elasticsearch\elasticsearch\src\Elasticsearch\ConnectionPool\StaticNoPingConnectionPool.php:51

enter image description here

3
  • 1
    Did you ever get this to work? I'm facing the same problem.
    – Brent
    Mar 2 '18 at 19:57
  • 1
    yep i had another searching extension which was colliding with default search so i disabled them , delete all static files along with cache re deploy than it worked. Mar 3 '18 at 8:08
  • For me, it was setting Stores > Settings > Configuration > Catalog > Catalog > Catalog Search to MySQL. It was set to Elasticsearch.
    – Brent
    Mar 6 '18 at 21:12
8

If you are using Magento and getting 'No alive nodes found in your cluster' error while reindexing.

Make sure you have updated following :

  1. Your Host and port : '[host]:[port]'. Eg: 'es-node1.fqdn:9200, es-node2.fqdn:9200' or 'localhost:9200' in System -> Configuration -> Elastic Configuration.
  2. Update your indices alias name and indices name pattern in admin configuration same as above.

Try this, and clear cache and reindex. It will solve your issue.

enter image description here

2
  • 4
    I don't find this path : System -> Configuration -> Elastic Configuration. Please tell me in detail. Mar 3 '20 at 8:53
  • Muhammad Ahmed its in Sys -> configuration -> cataogue -> catalogue search Mar 22 at 19:28
3

If you are using Magento and getting 'No alive nodes found in your cluster' error while reindexing

Please make sure you have install Elastic Search into your system.

if you are using ubantu then please run following command

sudo apt-get install elasticsearch

Then Goto Admin -> Store -> configuration -> catalog -> catalog

then configure as follow

enter image description here

0

I have found the perfect solution for this issue.

Edit config/elasticsearch.yml
Please, change the network.host: 0.0.0.0
After changing the config pls restart the apps
Don't forget to uncomment network host

Enjoy!

0

First of all make sure your elasticsearch is installed and running by simply executing this command

curl localhost:9200 If not installed then: sudo apt update

Then run the installation: sudo apt install elasticsearch

First, reload the systemd configuration: sudo systemctl daemon-reload

Then, enable the Elasticsearch service with: sudo systemctl enable elasticsearch.service

And finally, after the service is enabled, start Elasticsearch: sudo systemctl start elasticsearch.service

If you make changes to configuration files, or need to restart Elasticsearch for any reason, use: sudo systemctl restart elasticsearch.service

Then made configuration in admin, that may looks like this, enter image description here

0

The issue could be caused by configuration as @Khan-arman explained or by elasticsearch service. I discovered both issues below:

Check the configuration

First let's check if your configuration is correct:

  1. Update your host and port: '[host]:[port]'. E.g.: 'localhost:9200' in Stores > Settings > Configuration > Catalog > Catalog > Catalog Search or if you are you are using Elastic Suite in Stores > Configuration > ElasticSuit > Basic configuration.

  2. Update your indices alias name and indices name pattern in admin configuration same as above.

    enter image description here

  3. Clear cache by going to System > Cache Management or using this command (on your server in Magento installation folder):

    bin/magento cache:clean
    
  4. Reindex by visiting System > Index Management or running command below:

    # Update catalog search
    bin/magento indexer:reindex catalogsearch_fulltext 
    
    # Or reindex all indexers
    bin/magento indexer:reindex
    

Check Elasticsearch

If the error still stands, it might be the issue with the elasticsearch service on your server. To solve this follow the steps below:

  1. Log into your server

  2. Check if the elasticsearch is running:

    sudo /etc/init.d/elasticsearch status
    
  3. Try to start it if it's not running, or restart it if it's running:

    # Start elasticsearch
    sudo systemctl start elasticsearch
    
    # Or restart elasticsearch
    sudo systemctl restart elasticsearch
    

    You've found the issue if you encounter an error here and your elasticsearch doesn't start. Solve the issue first. If you don't get any errors and elasticsearch starts, continue.

  4. Navigate to your Magento installation folder

  5. Reindex all indexers

    bin/magento indexer:reindex
    
  6. Clear the cache

    bin/magento cache:flush
    

Your problem should have been solved now.

New contributor
Raham is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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