php es 报错 No alive nodes. All the 1 nodes seem to be down
php连接es时报错No alive nodes. All the 1 nodes seem to be down,原因是Elasticsearch开启了安全认证,查看服务器端响应信息为:
received plaintext http traffic on an https channel, closing connection Netty4HttpCha
我是通过docker安装的es,修改es启动命令为:
docker run \
-d \
--name es01 \
-e "discovery.type=single-node" \
-e "xpack.security.enabled=false" \
--net elastic -p 9200:9200 \
-it \
docker.elastic.co/elasticsearch/elasticsearch:8.12.2
成功解决问题