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: 5
Joined: Wed Jan 22, 2020 2:23 pm

Elasticsearch 'No alive nodes found in your cluster'

Post by debridat1 » Wed Jan 22, 2020 2:50 pm

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: 14868
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

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

Post by Thorsten » Wed Jan 22, 2020 6:38 pm

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: 5
Joined: Wed Jan 22, 2020 2:23 pm

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

Post by debridat1 » Thu Jan 23, 2020 11:05 am

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