Elasticsearch 'No alive nodes found in your cluster'

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
debridat1
Posts: 13
Joined: Wed Jan 22, 2020 2:23 pm
Location: Italy

Elasticsearch 'No alive nodes found in your cluster'

Post by debridat1 »

Hi to all,

I am using phpmyfaq 2.9.13 on Centos 7 (httpd-2.4.6 - PHP 5.6.40 - MySQL 8.0.19) and it works well.
I tried adding support to elasticsearch 2.4.6 but I get the following error:
Fatal error: Uncaught exception 'Elasticsearch\Common\Exceptions\NoNodesAvailableException' with message 'No alive nodes found in your cluster' in /var/www/html/myKBR/inc/libs/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php:51 Stack trace: #0 /var/www/html/myKBR/inc/libs/elasticsearch/src/Elasticsearch/Transport.php(71): Elasticsearch\ConnectionPool\StaticNoPingConnectionPool->nextConnection() #1 /var/www/html/myKBR/inc/libs/elasticsearch/src/Elasticsearch/Transport.php(89): Elasticsearch\Transport->getConnection() #2 /var/www/html/myKBR/inc/libs/elasticsearch/src/Elasticsearch/Connections/Connection.php(230): Elasticsearch\Transport->performRequest('GET', '/phpmyfaq/_stat...', Array, NULL, Array) #3 /var/www/html/myKBR/inc/libs/react/promise/src/FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}(Array) #4 /var/www/html/myKBR/inc/libs/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure in /var/www/html/myKBR/inc/libs/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php on line 51

I have configured the config\Elasticsearch.php file:
<?php
$PMF_ES['hosts'] = ['localhost:9200'];
$PMF_ES['index'] = 'mykbr';
$PMF_ES['type'] = 'kbr';
?>

Elasticsearch 2.4.6 works properly
{
"name" : "nodekbr",
"cluster_name" : "mykbr",
"cluster_uuid" : "IUTrGaRyQVGzFQTGd1OB_A",
"version" : {
"number" : "2.4.6",
"build_hash" : "5376dca9f70f3abef96a77f4bb22720ace8240fd",
"build_timestamp" : "2017-07-18T12:17:44Z",
"build_snapshot" : false,
"lucene_version" : "5.5.4"
},
"tagline" : "You Know, for Search"
}

Can someone help me?
Thank you
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Elasticsearch 'No alive nodes found in your cluster'

Post by Thorsten »

Hi,

looks like PHP cannot access the Elasticsearch instance, could please try to test this?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
debridat1
Posts: 13
Joined: Wed Jan 22, 2020 2:23 pm
Location: Italy

Re: Elasticsearch 'No alive nodes found in your cluster'

Post by debridat1 »

yes,
it is php that does not communicate with elasticsearch.
The same configuration replicated on a windows machine works correctly.
Maybe it's an Apache or Centos configuration problem ... I'm investigating ...

Thank you
Post Reply