当前位置:   article > 正文

[Errno 111] Connection refused)_failed to establish a new connection: [errno 111]

failed to establish a new connection: [errno 111] connection refused

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

elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f25e0e93c18>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f25e0e93c18>: 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

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/148368?site
推荐阅读
相关标签
  

闽ICP备14008679号