0

So I've been having this issue for the past week now, I've tried to self-diagnose by following instructions online but I can't this to work.

I've even installed a new instance but same issues.

This is what I've followed so far -

php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush

I've also tried running this -

/opt/alt/php74/usr/bin/php bin/magento indexer:reindex

It got rid of the error message, but then I got a Page Cache error, when I try to flush the cache I'm back to Cron Error.

I've also run logged out each time to make sure but it doesn't help.

I've been trying to get to the bottom of this but can't find a solution. I've come across this link today - Unable to get cronjob working with Magento2.4 it mentions Elasticsearch, I have no idea what it is. I've tried to run the below and it didn't show me anything. I have no idea how to install especially using SSH.

 $ curl -XGET '<host>:9200/_cat/health?v&pretty'

I'm just a beginner, the installation guide tells me to install via zip and I'm just so confused. I don't remember Magento installation being this complicated, but the last time I've used it was like Magento ver 1.x

I found the ElasticSearch settings, No alive nodes found in your cluster. So I've tried to run commands found here https://community.magento.com/t5/Magento-2-x-Hosting-Performance/Magento-2-4-0-No-Alive-nodes-in-your-cluster-what-to-do-ON/td-p/456858

but running any 'sudo' commands doesn't work. I've tried to move the directory to where Magento is installed, so 'host/bin/magento', I tried under public_html but nothing works. I just can't progress any further.

Any help is appreciated.

Thanks

2 Answers 2

0

Can you try this: bin/magento cron:remove && bin/magento cron:install

This ussually works for my setups

1
  • I just tried this but got [director@euukult1 dev.medicalsupplydepot.uk]$ bin/magento cron:remove && bin/magento cron:install -bash: bin/magento: Permission denied
    – Mayur
    Commented Dec 27, 2021 at 17:36
0

Looks like your setup is not complete:

  • the error No alive nodes found usually means your elasticsearch is not connected to Magento.

IN short, although your local elasticsearch runs locally, you are yet to verify the database fetches elasticsearch on localhost.

select * from core_config_data where path like '%elasticsearch%'; should help

Also, since you mention to be beginner, it is often useful to double check the file permissions: 777 is not the best solution, instead, check the devdocs site at: https://devdocs.magento.com/guides/v2.4/config-guide/prod/prod_file-sys-perms.html

1
  • Thanks for your response. I tried your command but this is what I got. [director@euukult1 dev.medicalsupplydepot.uk]$ select * from core_config_data where path like %elasticsearch% -bash: syntax error near unexpected token `from' I don't know where to check for File permissions, so I'll have a look at that site you mentioned.
    – Mayur
    Commented Dec 27, 2021 at 17:34

Your Answer

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

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