Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Fatal error: Uncaught Error: Wrong parameters for Elasticsearch #1509

Closed
deckside opened this issue Aug 20, 2019 · 6 comments
Closed

PHP Fatal error: Uncaught Error: Wrong parameters for Elasticsearch #1509

deckside opened this issue Aug 20, 2019 · 6 comments
Assignees

Comments

@deckside
Copy link

Summary of problem or feature request

After restart elasticserach service is not indexing.
Code snippet of problem

ubuntu@ip-172-31-11-28:/var/www/magento/bin$ sudo php magento indexer:reindex catalogsearch_fulltext
PHP Fatal error: Uncaught Error: Wrong parameters for Elasticsearch\Common\Exceptions\ServerErrorResponseException([string $message [, long $code [, Throwable $previous = NULL]]]) in /var/www/magento/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:666
Stack trace:
#0 /var/www/magento/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(666): Exception->__construct(NULL, 503)
#1 /var/www/magento/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(282): Elasticsearch\Connections\Connection->process5xxError(Array, Array, Array)
#2 /var/www/magento/vendor/react/promise/src/FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections{closure}(Array)
#3 /var/www/magento/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)
#4 /var/www/magento/vendor/guzzlehttp/ringphp/src/Core.php(341): GuzzleHttp\Ring\Future\CompletedFutureValue->then(Obj in /var/www/magento/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php on line 666
ubuntu@ip-172-31-11-28:/var/www/magento/bin$
System details

{
"name" : "8a9Dhi6",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "t8ox8lfkSaO5z3KGhFhiLg",
"version" : {
"number" : "5.6.12",
"build_hash" : "cfe3d9f",
"build_date" : "2018-09-10T20:12:43.732Z",
"build_snapshot" : false,
"lucene_version" : "6.6.1"
},
"tagline" : "You Know, for Search"

Operating System
Magento 2.2.6 CE
PHP Version PHP 7.1.20-1+ubuntu16.04.1+deb.sury.org+1
MSQL Version -mysql Ver 14.14 Distrib 5.7.27, for Linux (x86_64) using EditLine wrapper

@rbayet
Copy link
Collaborator

rbayet commented Aug 21, 2019

Hello @deckside,

OK, on one hand, there seems to be indeed a problem in the elasticsearch/elasticsearch client with regards to how the exception is handled.
Can you give me the versions of smile/elasticsuite and elasticsearch/elasticsearch modules ?

On the other hand, have you checked your ElasticSearch server logs (/var/log/elasticsearch/elasticsearch.log) to see why a 503 error is thrown by the server ?

Best regards,

@deckside
Copy link
Author

Hi
Thank you for your help

The Elasticsuite versions as listed in the module manager are
Smile_ElasticsuiteAdminNotification 2.8.0
Smile_ElasticsuiteCatalog 2.4.0
Smile_ElasticsuiteCatalogOptimizer 2.4.0
Smile_ElasticsuiteCatalogRule 2.4.0
Smile_ElasticsuiteCore 2.4.0
Smile_ElasticsuiteSwatches 2.4.0
Smile_ElasticsuiteThesaurus 2.4.0
Smile_ElasticsuiteTracker 2.5.0
Smile_ElasticsuiteVirtualCategory 2.4.0

ElasticSearch version
"name" : "8a9Dhi6",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "na",
"version" : {
"number" : "5.6.12",
"build_hash" : "cfe3d9f",
"build_date" : "2018-09-10T20:12:43.732Z",
"build_snapshot" : false,
"lucene_version" : "6.6.1"

The log file is attached

elasticsearch.log

@rbayet
Copy link
Collaborator

rbayet commented Aug 21, 2019

Hello @deckside,

Actually, I was referring to the composer PHP packages version which you can obtain from the root of your Magento 2 project with

  • composer show elasticsearch/elasticsearch | grep -i versions
  • and composer show smile/elasticsuite | grep -i versions

(or by looking into your composer.lock for lines

"name": "elasticsearch/elasticsearch",
"version": [the version number]

and

"name": "smile/elasticsuite",
"version": [the version number]

)

Thanks for the log file.

Regards,

@deckside
Copy link
Author

deckside commented Aug 21, 2019

Versions are

"name": "elasticsearch/elasticsearch",
"version": "v6.7.1",

"name": "smile/elasticsuite",
"version": "2.6.9",

@romainruaud
Copy link
Collaborator

@deckside I'm seeing a lot of "Out of memory" errors in your Elasticsearch log...

How is your clusted sized ?

Also, what is the size of your catalog (number of storeviews and products) ?

@no-response
Copy link

no-response bot commented Sep 25, 2019

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.

@no-response no-response bot closed this as completed Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants