The Elasticsearch server could not be reached. Further data is therefore unavailable

Hey,

I'm trying to setup the Elasticsearch server in the search-api drupal 8. But I'm getting the above message when I save the server.

In parallel with that I accessed the Elasticsearch server URI in the postman, but it's giving the basic information about it(i.e version number, cluster name)?

Can you help me with what's wrong with that?

Thanks

What is in your Drupal logs?

Hi @warkolm,

Here is what I found in my dblogs.

Warning : Invalid argument supplied for foreach() in Drupal\elasticsearch_helper\ElasticsearchClientBuilder->getHosts() (line 57 of /app/web/modules/contrib/elasticsearch_helper/src/ElasticsearchClientBuilder.php )

#0 /app/web/core/includes/bootstrap.inc(600): _drupal_error_handler_real(2, 'Invalid argumen...', '/app/web/module...', 57, Array) #1 /app/web/modules/contrib/elasticsearch_helper/src/ElasticsearchClientBuilder.php(57): _drupal_error_handler(2, 'Invalid argumen...', '/app/web/module...', 57, Array) #2 /app/web/modules/contrib/elasticsearch_helper/src/ElasticsearchClientBuilder.php(43): Drupal\elasticsearch_helper\ElasticsearchClientBuilder->getHosts() #3 [internal function]: Drupal\elasticsearch_helper\ElasticsearchClientBuilder->build() #4 /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php(255): call_user_func_array(Array, Array) #5 /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php(173): Drupal\Component\DependencyInjection\Container->createService(Array, 'elasticsearch_h...') #6 /app/web/modules/contrib/elasticsearch_helper/src/Form/ElasticsearchHelperSettingsForm.php(53): Drupal\Component\DependencyInjection\Container->get('elasticsearch_h...') #7 /app/web/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php(28): Drupal\elasticsearch_helper\Form\ElasticsearchHelperSettingsForm::create(Object(Drupal\Core\DependencyInjection\Container)) #8 /app/web/modules/contrib/layout_builder_st/src/DependencyInjection/ClassResolver.php(18): Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('\Drupal\elastic...') #9 /app/web/core/lib/Drupal/Core/Controller/HtmlFormController.php(48): Drupal\layout_builder_st\DependencyInjection\ClassResolver->getInstanceFromDefinition('\Drupal\elastic...') #10 /app/web/core/lib/Drupal/Core/Controller/FormController.php(76): Drupal\Core\Controller\HtmlFormController->getFormObject(Object(Drupal\Core\Routing\RouteMatch), '\Drupal\elastic...') #11 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #12 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #13 /app/web/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() #14 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #15 /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #16 /app/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() #17 /app/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #18 /app/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /app/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /app/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /app/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /app/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /app/web/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /app/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #27 {main}

.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.