0

Running Magento 2.4.

After installing Magento I get the following error in the admin panel:

One or more indexers are invalid. Make sure your Magento cron job is running.

I've logged into SSH as Magento user (non root). I've ran the following:

bin/magento indexer:reindex

Which produces ...

Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index has been rebuilt successfully in 00:00:00
Category Products index has been rebuilt successfully in 00:00:00
Product Categories index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Product EAV index has been rebuilt successfully in 00:00:00
Stock index has been rebuilt successfully in 00:00:00
Inventory index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:00
Catalog Search index exception: Could not ping search engine: No alive nodes found in your cluster

I cleared cache, yet the problem still exists.

I've ran bin/magento cron:install and my crontab looks like so:

#~ MAGENTO START 663d4cebd52acc169f7992767d6661404ecce65ca58a220ba7b032ca1dc11162
* * * * * /usr/bin/php7.4 /var/www/html/mage/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /var/www/html/mage/var/log/magento.cron.log
#~ MAGENTO END 663d4cebd52acc169f7992767d6661404ecce65ca58a220ba7b032ca1dc11162

I've also directly ran /usr/bin/php7.4 /var/www/html/mage/bin/magento cron:run to confirm everything is working and it produces: Ran jobs by schedule.

Yet when I log into admin panel the message is still there.

Any ideas?

1 Answer 1

1

Notice that your search index failed:

Catalog Search index exception: Could not ping search engine: No alive nodes found in your cluster

That error means Magento can’t connect to your elasticsearch instance. Check or configure your elasticsearch settings in Configuration > Catalog > Search Engine and test your connection and then try reindexing again.

2
  • I already have elastic search installed. But, the service was stopped. Running systemctl start elasticsearch seems to take an age to load. Edit: Nope, I get Job for elasticsearch.service failed because a timeout was exceeded. Apr 26, 2021 at 12:24
  • It turns out I needed more memory for elasticsearch. After that it worked. Thank you. Apr 26, 2021 at 16:01

Your Answer

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

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