How to Fix the “No Alive Nodes Found in Your Cluster” Error in Magento 2

The “No alive nodes found in your cluster” error in Magento 2 typically occurs when the platform fails to connect to Elasticsearch. This issue can be caused by several factors, including an inactive Elasticsearch service, incorrect configuration settings, network restrictions, or version incompatibility between Magento and Elasticsearch. In this guide, we will go through the steps to diagnose and resolve the issue effectively.

How to Fix the “No Alive Nodes Found in Your Cluster” Error

1. Check if Elasticsearch is Running

To verify whether Elasticsearch is active, run the following command:

sudo systemctl status elasticsearch

If the service is not running, start it using:

sudo systemctl start elasticsearch
Note: Restarting Elasticsearch on a live Magento store can temporarily disrupt search functionality. It’s recommended to perform this action during maintenance periods to avoid impacting customers.

2. Verify Elasticsearch Settings in Magento

In the Magento Admin Panel, navigate to: Stores > Configuration > Catalog > Catalog > Catalog Search

Catalog Search

Verify that the connection settings for Elasticsearch are correct. Ensure that Magento is pointing to the correct Elasticsearch host and port.

3. Test Elasticsearch Connectivity & Version

To confirm that Magento can communicate with Elasticsearch, execute the following command from the server:

curl -XGET 'http://localhost:9200'

If your Elasticsearch instance is on a remote server, replace localhost with the actual IP address or domain name. A successful response will return Elasticsearch’s version and cluster information. Ensure that your Magento version supports the installed Elasticsearch version as per Magento’s system requirements.

4. Inspect Magento Log Files

Magento logs provide valuable insights into potential issues. Check for errors related to Elasticsearch by examining the following log files:

var/log/system.log  
var/log/exception.log 

Look for entries that may indicate connection failures or misconfigurations.

5. Verify Firewall and Network Rules

If Magento and Elasticsearch are hosted on separate servers, confirm that firewall rules are not restricting the connection. Open the necessary ports by running:

sudo ufw allow 9200  
sudo ufw allow 9300 

For cloud-based setups, check security group settings or any other network policies that may be preventing access.

6. Reindex Magento Data

Once Elasticsearch is running and properly configured, reindex Magento’s data to ensure the search system functions correctly:

php bin/magento indexer:reindex

This command helps Magento synchronize with Elasticsearch and refresh search-related data.

The “No alive nodes found in your cluster” error in Magento 2 usually stems from a misconfigured or inaccessible Elasticsearch instance. By following these troubleshooting steps ensuring Elasticsearch is running, verifying configurations, checking network access, and reindexing data you can resolve this issue effectively and restore search functionality to your store.

Follow us for the more helpful posts!

We hope this is a useful post for you.

You can read more useful posts like How To Change Email Logo In Magento 2.

Thank you for reading!

 

0 0 votes
Article Rating

Aaron LX

Aaron is a passionate writer, crazy about shopping, eCommerce and trends. Besides his outstanding research skills and a positive mind, Aaron eagerly shares his experience with the readers.

Leave a Reply or put your Question here

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x