//部署es代码
docker run -d \
--name es \
-e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
-e "discovery.type=single-node" \
-v es-data:/usr/share/elasticsearch/data \
-v es-plugins:/usr/share/elasticsearch/plugins \
--privileged \
--network es-net \
-p 9200:9200 \
-p 9300:9300 \
elasticsearch:7.12.1
//部署kibana代码,
docker run -d \
--name kibana \
-e ELASTICSEARCH_HOSTS=http://es:9200 \
--network=es-net \
-p 5601:5601 \
kibana:7.12.1
//报错信息
{"type":"log","@timestamp":"2022-09-18T09:04:24+00:00","tags":["warning","elasticsearch"],"pid":7,"message":"Unable to revive connection: http://es:9200/"}
{"type":"log","@timestamp":"2022-09-18T09:04:24+00:00","tags":["warning","elasticsearch"],"pid":7,"message":"No living connections"}
{"type":"log","@timestamp":"2022-09-18T09:04:24+00:00","tags":["warning","plugins","licensing"],"pid":7,"message":"License information could not be obtained from Elasticsearch due to Error: No Living connections error"}
后来查了查了,有说该kibana连接es的公网IP的解决,但是不行,后来再次尝试的时候发现,原来是自己的服务器运行内存太小了,运行es之后,再运行kibana,阿里云给自动关闭了,后来重启了下,把服务器原先开的服务给搞掉才成功部署es和kibana