i use plindelauf/curator4 image to connect and run an action for the Elasticsearch which is running in another container. the docker ps gives:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ac97b5674524 plindelauf/curator4 "/opt/docker-entrypoi" 6 seconds ago Up 5 seconds curator
e584c9b090c8 vagrant-registry.vm:5000/sslserver "python /sslServer/ss" 23 hours ago Up 23 hours 0.0.0.0:12121->12121/tcp sslserver
20eee9943664 kibana:4 "/docker-entrypoint.s" 23 hours ago Up 23 hours 0.0.0.0:5601->5601/tcp kibana
8c462586982e logstash:2 "/docker-entrypoint.s" 23 hours ago Up 23 hours 0.0.0.0:5044->5044/tcp, 0.0.0.0:12201->12201/tcp, 0.0.0.0:12201->12201/udp logstash
c971fa3e357b elasticsearch:2 "/docker-entrypoint.s" 23 hours ago Up
i run the container with
$ docker run -d -e INTERVAL_IN_MINUTES=5 -v /home/vagrant/configs:/opt/config --link elasticsearch:elasticsearch --name curator plindelauf/curator4
everything looks ok but when I tried to run the Curator manual i see the following error
root@ac97b5674524:/opt# curator --config /opt/config/curator.yml /opt/config/actionfile.yml
Traceback (most recent call last):
File "/usr/local/bin/curator", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/curator/curator.py", line 5, in main
cli()
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/curator/cli.py", line 215, in cli
client = get_client(**client_args)
File "/usr/local/lib/python2.7/site-packages/curator/utils.py", line 566, in get_client
'Error: {0}'.format(e)
elasticsearch.exceptions.ElasticsearchException: Unable to create client connection to Elasticsearch. Error: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f144c062f90>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f144c062f90>: Failed to establish a new connection: [Errno 111] Connection refused)
I believe the --link is correct. I am new on that stuff so I do not know what is going on. i am not sure if i have to provide you the config file for the curator, too. just let me know if so.
ok. the problem in my case was just the given ip in the curator.yml. When I changed 127.0.0.1 to the ip where elastic was running the problem solved