Issue

The following symptoms indicate Elasticsearch is not configured correctly:

  • Error: No alive nodes in your cluster - this error can appear in Adobe Commerce logs:

    • var/log/system.log
    • var/log/support_report.log
    • var/log/cron.log
    • var/log/exception.log
    • or in the prompt (when you run a reindex, for example)
  • Errors indicating that the Elasticsearch version is not compatible with your current version of Adobe Commerce (this is an Adobe Commerce on cloud infrastructure specific error):

    [YYYY-MM-DD HH:MM:SS] CRITICAL: Fix configuration with given suggestions:    - Elasticsearch version #<version> is not compatible with current version of magento    Upgrade elasticsearch version to ~5.0
    

Where version is the Elasticsearch Service running on the cloud environment.

Cause

Elasticsearch is not installed properly. This could be due to:

  • A typo in the configuration file.
  • A version in the configuration file that does not match any version of Elasticsearch that is installed for the environment.
  • A version that is correctly installed in the environment, correctly configured in the configuration file, but is not a supported version for the currently installed version of Adobe Commerce.

Solution

To correctly set up Elasticsearch:

After you have set up Elasticsearch, check that it’s configured correctly:

  1. Log in to your server.

  2. Check the version number of Elasticsearch (2.x, 5.x, or 6.x) in the output of running the command: curl -XGET <Elasticsearch hostname>:<Elasticsearch server port> For example, in Adobe Commerce on cloud infrastructure: curl -XGET localhost:9200

  3. Check what is configured in Adobe Commerce on cloud infrastructure Configuration by running the command: php bin/magento config:show catalog/search

  4. Check catalog/search/engine and ensure it matches with the Elasticsearch version number. For example, in Adobe Commerce on cloud infrastructure:

    • ElasticSearch 5.X - elasticsearch5
    • ElasticSearch 6.X - elasticsearch6
    • ElasticSearch 2.X - elasticsearch
  5. Check index_prefix. If you have several environments, make sure you have different index_prefix values for them.

Previous pageElasticSuite tracking indices causes problems with Elasticsearch
Next pageElasticsearch 5 is configured, but search page does not load with "Fielddata is disabled..." error

Commerce


Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more