栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

PHP Fatal error: Uncaught ElasticsearchCommonExceptionsNoNodesAvailableException: No alive nodes

PHP Fatal error: Uncaught ElasticsearchCommonExceptionsNoNodesAvailableException: No alive nodes

环境背景为docker dnmp 安装 ES+PHP

对应docker-compose配置及对应端口

也可正常访问9200端口

 

 代码

然后出现了500报错,报错内容:

 PHP Fatal error:  Uncaught ElasticsearchCommonExceptionsNoNodesAvailableException: No alive nodes found in your cluster in /www/localhost/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php:67
Stack trace:
#0 /www/localhost/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(87): ElasticsearchConnectionPoolStaticNoPingConnectionPool->nextConnection()
#1 /www/localhost/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(105): ElasticsearchTransport->getConnection()
#2 /www/localhost/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(275): ElasticsearchTransport->performRequest('POST', '/my_index/my_ty...', Array, '{"testField":"a...', Array)
#3 /www/localhost/vendor/react/promise/src/FulfilledPromise.php(28): ElasticsearchConnectionsConnection->ElasticsearchConnections{closure}(Array)
#4 /www/localhost/vendor/ezimuel/ringphp/src/Future/CompletedFuturevalue.php(55): ReactPromiseFulfilledPromise->then(Object(Clos in /www/localhost/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php on line 67

原因是找不到节点,解决方法如下:查找自己的ip指定ip

 

 然后执行就OK了

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/700880.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号