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
成功解決問題