Symfony 4.2.8 : Can’t connect to ES 7.10 through the fos:elastica:populate command

I encounter a problem in my production site in Symfony 4.2.8 (yes I know…).

When I try to launch a bin/console fos:elastica:populate or bin/console fos:elastica:reset the console crash (with -vvv option) :

Exception trace:
 () at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Transport/Http.php:190
 ElasticaTransportHttp->exec() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Request.php:194
 ElasticaRequest->send() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Client.php:689
 ElasticaClient->request() at /var/www/current/vendor/friendsofsymfony/elastica-bundle/src/Elastica/Client.php:58
 FOSElasticaBundleElasticaClient->request() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Client.php:721
 ElasticaClient->requestEndpoint() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Index.php:586
 ElasticaIndex->requestEndpoint() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Index.php:225
 ElasticaIndex->delete() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Index.php:296
 ElasticaIndex->create() at /var/www/current/vendor/friendsofsymfony/elastica-bundle/src/Index/Resetter.php:110
 FOSElasticaBundleIndexResetter->resetIndex() at /var/www/current/vendor/friendsofsymfony/elastica-bundle/src/Command/PopulateCommand.php:184
 FOSElasticaBundleCommandPopulateCommand->populateIndex() at /var/www/current/vendor/friendsofsymfony/elastica-bundle/src/Command/PopulateCommand.php:164
 FOSElasticaBundleCommandPopulateCommand->execute() at /var/www/current/vendor/symfony/console/Command/Command.php:255
 SymfonyComponentConsoleCommandCommand->run() at /var/www/current/vendor/symfony/console/Application.php:926
 SymfonyComponentConsoleApplication->doRunCommand() at /var/www/current/vendor/symfony/framework-bundle/Console/Application.php:89
 SymfonyBundleFrameworkBundleConsoleApplication->doRunCommand() at /var/www/current/vendor/symfony/console/Application.php:269
 SymfonyComponentConsoleApplication->doRun() at /var/www/current/vendor/symfony/framework-bundle/Console/Application.php:75
 SymfonyBundleFrameworkBundleConsoleApplication->doRun() at /var/www/current/vendor/symfony/console/Application.php:145
 SymfonyComponentConsoleApplication->run() at /var/www/current/bin/console:39

In Http.php line 190:

 [ElasticaExceptionConnectionHttpException]  
 Couldn't connect to host, Elasticsearch down?

A curl on ES server respond :

{
 "name" : "prod",
 "cluster_name" : "elasticsearch",
 "cluster_uuid" : "********",
 "version" : {
  "number" : "7.10.0",
  "build_flavor" : "default",
  "build_type" : "deb",
  "build_hash" : "51e9d6f22758d0374a0f3f5c6e8f3a7997850f96",
  "build_date" : "2020-11-09T21:30:33.964949Z",
  "build_snapshot" : false,
  "lucene_version" : "8.7.0",
  "minimum_wire_compatibility_version" : "6.8.0",
  "minimum_index_compatibility_version" : "6.0.0-beta1"
 },
 "tagline" : "You Know, for Search"
}

I create a new branch to upgrade all the component but I need a clue to operate a quick fix on production…
If somebody have an idea thank in advance.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *