We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
master_not_discovered_exception results in the following fatal error:
Error: Wrong parameters for Elasticsearch\Common\Exceptions\ServerErrorResponseException([string $message [, long $code [, Throwable $previous = NULL]]]) in Exception->__construct() (line 704 of /vagrant/htdocs/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php). Exception->__construct(Array, 503, Object) (Line: 704) Elasticsearch\Connections\Connection->tryDeserializeError(Array, 'Elasticsearch\Common\Exceptions\ServerErrorResponseException') (Line: 675) Elasticsearch\Connections\Connection->tryDeserialize500Error(Array) (Line: 643) Elasticsearch\Connections\Connection->process5xxError(Array, Array, Array) (Line: 315) Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}(Array) (Line: 25) React\Promise\FulfilledPromise->then(Object, NULL, NULL) (Line: 55) GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object, NULL, NULL) (Line: 341) GuzzleHttp\Ring\Core::proxy(Object, Object) (Line: 324) Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}(Array, Object, Object, Array) (Line: 222) Elasticsearch\Connections\Connection->performRequest('GET', '/_cluster/health', Array, NULL, Array, Object) (Line: 105) Elasticsearch\Transport->performRequest('GET', '/_cluster/health', Array, NULL, Array) (Line: 58) Elasticsearch\Namespaces\AbstractNamespace->performRequest(Object) (Line: 87) Elasticsearch\Namespaces\ClusterNamespace->health() (Line: 112) nodespark\DESConnector\Client->isClusterOk() (Line: 149) Drupal\elasticsearch_connector\Controller\ClusterListBuilder->buildRow(Object) (Line: 262) Drupal\elasticsearch_connector\Controller\ClusterListBuilder->render() (Line: 23) Drupal\Core\Entity\Controller\EntityListController->listing('elasticsearch_cluster') call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 694) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Problem occurs in Elasticsearch\Connections\Connection::tryDeserializeError().
a print_r of the $response variable:
Array ( [transfer_stats] => Array ( [url] => http://localhost/_cluster/health [content_type] => application/json; charset=UTF-8 [http_code] => 503 [header_size] => 104 [request_size] => 215 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 30.010349 [namelookup_time] => 0.004242 [connect_time] => 0.004286 [pretransfer_time] => 0.004303 [size_upload] => 0 [size_download] => 151 [speed_download] => 5 [speed_upload] => 0 [download_content_length] => 151 [upload_content_length] => -1 [starttransfer_time] => 30.010292 [redirect_time] => 0 [redirect_url] => [primary_ip] => ::1 [certinfo] => Array ( ) [primary_port] => 9200 [local_ip] => ::1 [local_port] => 37072 [http_version] => 2 [protocol] => 1 [ssl_verifyresult] => 0 [scheme] => HTTP [error] => [errno] => 0 ) [curl] => Array ( [error] => [errno] => 0 ) [effective_url] => http://localhost/_cluster/health [headers] => Array ( [content-type] => Array ( [0] => application/json; charset=UTF-8 ) [content-length] => Array ( [0] => 151 ) ) [version] => 1.1 [status] => 503 [reason] => Service Unavailable [body] => {"error":{"root_cause":[{"type":"master_not_discovered_exception","reason":null}],"type":"master_not_discovered_exception","reason":null},"status":503} )
After $error = $this->serializer->deserialize($response['body'], $response['transfer_stats']);
$error = $this->serializer->deserialize($response['body'], $response['transfer_stats']);
this results in the following $error variable: Array ( [error] => Array ( [root_cause] => Array ( [0] => Array ( [type] => master_not_discovered_exception [reason] => ) ) [type] => master_not_discovered_exception [reason] => ) [status] => 503 )
Array ( [error] => Array ( [root_cause] => Array ( [0] => Array ( [type] => master_not_discovered_exception [reason] => ) ) [type] => master_not_discovered_exception [reason] => ) [status] => 503 )
The text was updated successfully, but these errors were encountered:
Fix elastic#977: Only treat structured exception after 2.0.
61a4d9a
Fix elastic#977: Fix phpcs error
84fedf0
Added unit test to elastic#977 fix + defensive approach
e215a0b
177bd95
Successfully merging a pull request may close this issue.
Summary of problem
master_not_discovered_exception results in the following fatal error:
Code snippet of problem
Problem occurs in Elasticsearch\Connections\Connection::tryDeserializeError().
a print_r of the $response variable:
After
$error = $this->serializer->deserialize($response['body'], $response['transfer_stats']);
this results in the following $error variable:
Array ( [error] => Array ( [root_cause] => Array ( [0] => Array ( [type] => master_not_discovered_exception [reason] => ) ) [type] => master_not_discovered_exception [reason] => ) [status] => 503 )
System details
The text was updated successfully, but these errors were encountered: