Curator running problem

Hi all,

I have installed curator via RPM package on CentOS 6.7. I tried to delete some indices on elastic search.
But when I tried to run curator, it gives error as below.

2017-06-13 15:13:21,660 DEBUG curator.cli cli: 135 action_disabled = False
2017-06-13 15:13:21,660 DEBUG curator.cli cli: 139 continue_if_exception = False
2017-06-13 15:13:21,660 DEBUG curator.cli cli: 141 timeout_override = None
2017-06-13 15:13:21,660 DEBUG curator.cli cli: 143 ignore_empty_list = False
2017-06-13 15:13:21,660 INFO curator.cli cli: 153 Preparing Action ID: 1, "delete_indices"
2017-06-13 15:13:21,660 DEBUG curator.utils get_client: 714 kwargs = {'hosts': ['127.31.21.47:9200'], 'use_ssl': False, 'ssl_no_validat e': False, 'master_only': False, 'client_key': None, 'aws_secret_key': None, 'ce rtificate': None, 'aws_region': None, 'http_auth': None, 'client_cert': None, 'u rl_prefix': '', 'aws_key': None, 'port': 9200, 'timeout': 30}
2017-06-13 15:13:21,664 DEBUG curator.utils get_client: 764 Not using "requests_aws4auth" python module to connect.
Unable to create client connection to Elasticsearch. Error: ConnectionError(<ur llib3.connection.HTTPConnection object at 0x7f4ea09b7c50>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(< urllib3.connection.HTTPConnection object at 0x7f4ea09b7c50>: Failed to establish a new connection: [Errno 111] Connection refused)

Please let me know if you have any ideas, thanks so much.

Elasticsearch version is 5.2.2
Curator version is 5.1.1.

Just want to add something that I just found here. I did not have python installed, which python version I need to choose.

Since you installed via the RPM, Python is bundled with that. You don't need a separate Python.

This indicates that the host you specified, 127.31.21.47:9200, is not reachable by Curator, or Elasticsearch is not running on port 9200 at that IP address..

@theuntergeek

Thanks for your reply. I have checked Elasticsearch via typing curl "127.31.21.47:9200" from the terminal, it runs well.
I also checked the config.yml, like this:
client:
hosts: ["127.31.21.47:9200"]

Why it cannot reachable? Thanks.

By changing the logging: block in your config.yml file to have blacklist: [], and loglevel: DEBUG, you will receive more debug information. I can't answer why curl works, and Curator can't. The error Unable to create client connection to Elasticsearch. is pretty clear, though.

Please run with these settings changed, and include the last 20 or so lines of the log after attempting again.

@theuntergeek

Here's the information that I got after the change based on your suggestion.
2017-06-13 16:58:48,620 DEBUG elasticsearch log_request_fail:105 > None
2017-06-13 16:58:48,620 DEBUG urllib3.util.retry from_int:200 Converted retries value: False -> Retry(t otal=False, connect=None, read=None, redirect=0, status=None)
2017-06-13 16:58:48,620 DEBUG urllib3.connectionpool _new_conn:207 Starting new HTTP connection (4): 127.31. 21.47
2017-06-13 16:58:48,620 WARNING elasticsearch log_request_fail:97 GET http://127.31.21.47:9200/ [status:N/A request:0.000s]
Traceback (most recent call last):
File "/home/buh/.local/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
File "/home/buh/.local/lib/python3.6/site-packages/urllib3/util/connection.py", line 83, in create_connection
File "/home/buh/.local/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, in create_connection
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/buh/.local/lib/python3.6/site-packages/elasticsearch/connection/http_urllib3.py", line 114, in perform_request
File "/home/buh/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 649, in urlopen
File "/home/buh/.local/lib/python3.6/site-packages/urllib3/util/retry.py", line 333, in increment
File "/home/buh/.local/lib/python3.6/site-packages/urllib3/packages/six.py", line 686, in reraise
File "/home/buh/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
File "/home/buh/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 356, in _make_request
File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
File "/usr/local/lib/python3.6/http/client.py", line 1285, in _send_request
File "/usr/local/lib/python3.6/http/client.py", line 1234, in endheaders
File "/usr/local/lib/python3.6/http/client.py", line 1026, in _send_output
File "/usr/local/lib/python3.6/http/client.py", line 964, in send
File "/home/buh/.local/lib/python3.6/site-packages/urllib3/connection.py", line 166, in connect
File "/home/buh/.local/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f8a9e572ef0>: Failed to establish a new connection: [Errno 111] Connection refused
2017-06-13 16:58:48,621 DEBUG elasticsearch log_request_fail:105 > None
Unable to create client connection to Elasticsearch. Error: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f 8a9e572ef0>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.conn ection.HTTPConnection object at 0x7f8a9e572ef0>: Failed to establish a new connection: [Errno 111] Connection refused)

It's quite clear that Curator cannot form a connection, regardless of what curl may reveal. On that subject, what do you see when you run curl http://127.31.21.47:9200/?

@theuntergeek

I found the stupid mistake... I put 127 instead of 172... , now it's working. thanks so much.
By the way, can you take a look at this question about Elasticsearch? Here's the link.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.