1

This error is showing up on a clean installation of Magento 2. I've tried to re-install a clean Magento 2 version on another domain and it's giving me the same problems.

To replicate:

  1. Get a domain.
  2. Login SSH.
  3. Run command /usr/local/bin/composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <installation-folder-here>
  4. Enter that folder and run bin/magento setup:install \ --base-url=http://domain.com \ --db-host=localhost \ --db-name=database_name \ --db-user=database_user \ --db-password=database_pass \ --admin-firstname=Name \ --admin-lastname=LastName \ --admin-email=test@test.com \ --admin-user=Admin \ --admin-password=test \ --language=en_US \ --currency=EUR \ --timezone=America/Chicago \ --use-rewrites=1.
  5. Halfway through the installation, I get the message that it can't connect to "Elesticsearch", so I run this code to disable it bin/magento module:disable {Magento_Elasticsearch,Magento_InventoryElasticsearch,Magento_Elasticsearch6,Magento_Elasticsearch7}.
  6. Re-run step 4.
  7. Refresh the cache/index and run the magento setup:upgrade + setup:static-content:deploy. -f bin/magento cache:clean -f bin/magento cache:flush -f bin/magento setup:upgrade -f bin/magento setup:static-content:deploy -f.
  8. log in to the back-end and create a category.
  9. Go to the front-end, open the category and now you're greeted by the error message (http://prntscr.com/v74ane).

Am I doing something wrong? Isn't this way of installing Magento 2 supposed to download everything straight from Magento 2 themselves? Also if this is relevant information, it downloads/installs Magento 2.4.1.

2

sudo service elasticsearch restart if this running correctly, then check your module php bin/magento module:enable Magento_Elasticsearch6 Magento_Elasticsearch Magento_Elasticsearch7

this errow will resolve.

this error is related to ElasticSearch as magento 2.4 need elastic search.

0

The same issue for me was resolved by this steps:

  • re-enable ElasticSearch Magento modules after initial setup. Without setup:upgrade command;
  • put params of working ElasticSearch service in Stores > Settings > Configuration > Catalog > Catalog > Catalog Search;
  • rebuild project and clean all cache.

As I know, Catalog of newest Magento can`t work without ElasticSearch.

0

I'm using mac BigSur with Magento 2.4.2.

Based on Ali Raza answer to make it work, I needed to follow these steps and run the commands below:

  1. elasticsearch -d to start the Elasticsearch in the background.
  2. php bin/magento module:enable Magento_Elasticsearch6 Magento_Elasticsearch Magento_Elasticsearch7 to re-enable the Elasticsearch that I disabled to install Magento.

P.S.: You must install the elasticsearch if you don't have it on your mac. And you can do it using homebrew.

  1. php bin/magento setup:upgrade

  2. php bin/magento setup:di:compile

  3. php bin/magento setup:static-content:deploy -f

  4. php bin/magento cache:flush

P.S.: If you have any memory issue as I had, you can use -dmemory_limit=3G between PHP and bin/magento when running the commands.

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.