[Errno 111] Connection refused)

错误信息: raise ConnectionError('N/A', str(e), e)

elasticsearch.exceptions.ConnectionError: ConnectionError(: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(: Failed to establish a new connection: [Errno 111] Connection refused)

错误原因: 容器没有启动成功

 

解决方法

1. 拷贝host到容器文件夹下

2. 运行容器, 如果原容器存在,需要先进行删除 sudo docker container rm elasticsearch

创建容器,后台运行,指定ubuntu 路径/home/python/elasticsearch-2.4.6/config 与 /usr/share/elasticsearch/config delron/elasticsearch-ik 相互访问

sudo docker run -dti --network=host --name=elasticsearch -v /home/python/elasticsearch-2.4.6/config:/usr/share/elasticsearch/config delron/elasticsearch-ik:2.4.6-1.0

查看正在运行的容器

docker container ls

[Errno 111] Connection refused)_第1张图片

 

你可能感兴趣的:(Bug)