문제

I was using ElasticSearch in my old server and then I migrate the server for a new one that it's not using it anymore, so I'm receiving this issue message below.

ElasticSearch issue

Exception #0 (Elasticsearch\Common\Exceptions\NoNodesAvailableException): No alive nodes found in your cluster

I could I change the search engine to the default using terminal?

도움이 되었습니까?

해결책

⚠️ Since Magento 2.4, ElasticSearch is required and MySQL is not supported as a search engine anymore.

You can use the Magento 2 CLI to do it, you can check your current search engine using:

php -f bin/magento config:show catalog/search/engine

magerun2 to get the catalog search engine

After that you can set to the default one using the config:set feature, like that:

php -f bin/magento config:set catalog/search/engine 'mysql'

Or you can run this SQL query in your DB:

DELETE FROM `core_config_data` WHERE `path` LIKE 'catalog/search/engine'

다른 팁

Magento CLI is also able to handle that:

magento config:set catalog/search/engine 'mysql'

Run this command

php bin/magento config:set catalog/search/engine '' -f

Or

Remove Value From Database

SELECT * FROM `core_config_data` WHERE `path` LIKE 'catalog/search/engine'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top