Closed Playhf closed 1 month ago
Hello @Playhf,
Yes, we know about it. For now, you can find a workaround here #2880.
BR, Vadym
@vahonc so what is the workaround? remove magento/module-elasticsearch-8 module and use elasticsearch/elasticsearch ~7.17.0 composer package?
Thanks
@Playhf
Yes, stay tuned, but keep using client v7 for now, while we work under refactoring.
BR, Vadym
@vahonc should i also downgrade smile/elasticsuite package version to any older? i removed magento/module-elasticsearch-8 package now have elasticsearch/elasticsearch:v7.12 but it still tries to execute OpenSearch since it is hardcoded in \Smile\ElasticsuiteCore\Client\ClientBuilder constructor.
Thanks
@Playhf,
You don't need to downgrade smile/elasticsuite
package version to any older, you just don't need to use the Elasticsearch8 Magento module.
Most probably, running composer remove magento/module-elasticsearch-8
will make you rollback to elasticsearch/elasticsearch
on version 7.x.
If not, try doing:
$ composer remove magento/module-elasticsearch-8
$ composer require elasticsearch/elasticsearch ~7.17.0
Maybe you have an version issue: https://github.com/magento/magento2/blob/2.4.7/composer.json#L44
BR, Vadym
@Playhf
As for this:
i removed magento/module-elasticsearch-8 package now have elasticsearch/elasticsearch:v7.12 but it still tries to execute OpenSearch since it is hardcoded in \Smile\ElasticsuiteCore\Client\ClientBuilder constructor.
Are you sure that you select ElasticSuite as the default search engine?
Also, please check/provide the configuration of your Elasticsearch Client.
BR, Vadym
@Playhf that's normal to have an OpenSearch client.
OpenSearch is just a fork of Elasticsearch (by Amazon). The OpenSearch PHP client is also a fork of the Elasticsearch PHP client v7.
Since the v8 of the Elasticsearch PHP client, there has been many changes in the code, making this client only reliable for connecting to ES 8 backend servers.
Since we have to support all the possible backend servers (Opensearch 1.x and 2.x, Elasticsearch 7.x and 8.x), we had to find the best possible option, which is to use the OpenSearch PHP client, because this client is able to connect to all the pre-listed flavors of Elasticsearch and Opensearch servers.
Please refer to Vadym's last post to ensure your search engine configuration is correct (Elasticsuite is selected as engine, and proper servers are configured).
Please also check the "Magento is already installed" chapter of our doc : https://github.com/Smile-SA/elasticsuite/wiki/ModuleInstall#magento-is-already-installed-
You might have to run these commands (with proper config) :
bin/magento config:set -le smile_elasticsuite_core_base_settings/es_client/servers node-1:9200,node-2:9200
bin/magento config:set -le smile_elasticsuite_core_base_settings/es_client/enable_https_mode 0
bin/magento config:set -le smile_elasticsuite_core_base_settings/es_client/enable_http_auth 0
bin/magento config:set -le smile_elasticsuite_core_base_settings/es_client/http_auth_user ""
bin/magento config:set -le smile_elasticsuite_core_base_settings/es_client/http_auth_pwd ""
bin/magento config:set -le catalog/search/engine elasticsuite
bin/magento app:config:import
This issue was waiting update from the author for too long. Without any update, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away! Thanks for your contribution.
php bin/magento setup:upgrade failse with No alive nodes found in your cluster error while installing data from Smile_ElasticsuiteCatalog module.
Hello, I'm trying to install smile/elasticsuite:2.11.6.1 for magento magento/product-community-edition:2.4.7 and with magento/module-elasticsearch-8 installed. elasticsearch/elasticsearch module version is 8.5.3 (coming from magento/module-elasticsearch-8)
Steps to reproduce
Expected result
Setup upgrade installs all things for elasticsuite module
Actual result
As you can see from the first screen issue is coming from \Smile\ElasticsuiteCatalog\Setup\InstallData::install (line 97) After that module tries to create ElasticSuiteClient in \Smile\ElasticsuiteCore\Client\Client::getEsClient as you can see here it always returns \OpenSearch\Client for some reason.
In \Smile\ElasticsuiteCore\Client\ClientBuilder::build it tries to build a client and on line 109 clientBuilder creates client object which must be an instance of \OpenSearch\Client
After that attempting to make a test connection it fails because I don't have Open search installed.
I can see a comment in \Smile\ElasticsuiteCore\Client\ClientBuilder::build it claims it must work with elasticsearch 8 but it doesn't `We decided to use the OpenSearch client because he is versatile and can work with :
Please assist. Thanks