# Curate Unable to connect to Elasticsearch cluster

**URL:** <https://discuss.elastic.co/t/curate-unable-to-connect-to-elasticsearch-cluster/266171>\
**Category:** Elasticsearch\
**Tags:** curator\
**Created:** [March 3, 2021, 11:05pm UTC](https://discuss.elastic.co/t/curate-unable-to-connect-to-elasticsearch-cluster/266171 "2021-03-03T23:05:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bjen\_Shah](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bjen_shah/32/46250_2.png) [@Bjen\_Shah](https://discuss.elastic.co/u/Bjen_Shah)\
**Post date:** [March 3, 2021, 11:05pm UTC](https://discuss.elastic.co/t/curate-unable-to-connect-to-elasticsearch-cluster/266171/1 "2021-03-03T23:05:02Z")

</div>

````auto
$ curator_cli --version
curator_cli, version 5.8.3
$ curator_cli --loglevel DEBUG --use_ssl --host 'https://test01.elk.com' --certificate '/etc/pki/www/pams-ca.pem' --port 9200 show_indices
2021-03-03 16:22:08,053 DEBUG curator.cli_singletons.cli_action.show_indices check_filters:125 Validating provided filters: [{'filtertype': 'none'}]
2021-03-03 16:22:08,053 DEBUG curator.validators.SchemaCheck __init__ :26 Schema: <function Filters.<locals>.f at 0x7fce9ae97940>
2021-03-03 16:22:08,053 DEBUG curator.validators.SchemaCheck __init__ :27 "filters" config: [{'filtertype': 'none'}]
2021-03-03 16:22:08,054 DEBUG curator.validators.SchemaCheck __init__ :26 Schema: {'filtertype': Any(In(['age', 'alias', 'allocated', 'closed', 'count', 'empty', 'forcemerged', 'ilm', 'kibana', 'none', 'opened', 'pattern', 'period', 'shards', 'space', 'state']), msg="filtertype must be one of ['age', 'alias', 'allocated', 'closed', 'count', 'empty', 'forcemerged', 'ilm', 'kibana', 'none', 'opened', 'pattern', 'period', 'shards', 'space', 'state']")}
2021-03-03 16:22:08,054 DEBUG curator.validators.SchemaCheck __init__ :27 "filter" config: {'filtertype': 'none'}
2021-03-03 16:22:08,054 DEBUG curator.validators.filters f:48 Filter #0: {'filtertype': 'none'}
2021-03-03 16:22:08,054 DEBUG curator.utils process_ssl_args:826 Attempting to verify SSL certificate.
2021-03-03 16:22:08,054 DEBUG curator.utils try_aws_auth:886 Checking for AWS settings
2021-03-03 16:22:08,057 DEBUG curator.utils get_client:1019 kwargs = {'use_ssl': True, 'hosts': ['https://test01.elk.com'], 'certificate': '/etc/pki/www/pams-ca.pem', 'port': 9200, 'url_prefix': '', 'aws_key': None, 'aws_sign_request': False, 'client_cert': None, 'timeout': 30, 'aws_secret_key': None, 'aws_token': None, 'ssl_no_validate': False, 'client_key': None, 'http_auth': None, 'connection_class': <class 'elasticsearch.connection.http_requests.RequestsHttpConnection'>, 'verify_certs': True, 'ca_certs': '/etc/pki/www/pams-ca.pem', 'aws_region': False}
2021-03-03 16:22:08,057 INFO curator.utils get_client:1024 Instantiating client object
2021-03-03 16:22:08,057 INFO curator.utils get_client:1027 Testing client connectivity
/opt/python/3.8./lib/python3.8/site-packages/urllib3/connection.py:388: SubjectAltNameWarning: Certificate for test01.elk.com has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.)
2021-03-03 16:22:08,186 ERROR curator.utils get_client:1040 Unable to connect to Elasticsearch cluster. Error: Unknown mimetype, unable to deserialize: text/html
2021-03-03 16:22:08,187 CRITICAL curator.utils get_client:1045 Curator cannot proceed. Exiting.```

Any Idea, what's am doing wrong here.
````

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [March 4, 2021, 6:00pm UTC](https://discuss.elastic.co/t/curate-unable-to-connect-to-elasticsearch-cluster/266171/2 "2021-03-04T18:00:32Z")

</div>

> [@Bjen\_Shah](#):
>
> `Error: Unknown mimetype, unable to deserialize: text/html`

This indicates you are probably not connecting directly to Elasticsearch, but to something else. Elasticsearch will only ever respond with JSON. If you're getting back text/html, it's not Elasticsearch you're connected to.

---

<div class="post-metadata">

**Author:** ![Bjen\_Shah](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bjen_shah/32/46250_2.png) [@Bjen\_Shah](https://discuss.elastic.co/u/Bjen_Shah)\
**Post date:** [March 4, 2021, 7:53pm UTC](https://discuss.elastic.co/t/curate-unable-to-connect-to-elasticsearch-cluster/266171/3 "2021-03-04T19:53:46Z")

</div>

it's only elasticsearch is running on that port then how it's connecting to something else. I don't understand your statement "This indicates you are probably not connecting directly to Elasticsearch, but to something else."

I am directly trying to connect with elasticsearch where elasticsearch is using ssl cert and kibana are connected as with ssl verifying process as well. and it works fine.

but I don't understand why curator won't able to verify ssl cert as it supposed to.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [March 4, 2021, 8:12pm UTC](https://discuss.elastic.co/t/curate-unable-to-connect-to-elasticsearch-cluster/266171/4 "2021-03-04T20:12:15Z")

</div>

> [@Bjen\_Shah](#):
>
> `--use_ssl --host 'https://test01.elk.com' --certificate '/etc/pki/www/pams-ca.pem' --port 9200`

You're including `https` in `--host`, and also including `--port 9200`. You must be hitting `https://test01.elk.com:443` and not port `9200`.

Either switch to using `--use-ssl --host 'test01.elk.com' --port 9200` or `--use-ssl --host 'https://test01.elk.com:9200'` (and not specify `--port`).

---

<div class="post-metadata">

**Author:** ![Bjen\_Shah](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bjen_shah/32/46250_2.png) [@Bjen\_Shah](https://discuss.elastic.co/u/Bjen_Shah)\
**Post date:** [March 5, 2021, 4:43am UTC](https://discuss.elastic.co/t/curate-unable-to-connect-to-elasticsearch-cluster/266171/5 "2021-03-05T04:43:28Z")

</div>

Thank you very much for your reply "@theuntergeek", It did work. and I did update my curator config file to [https://host](https://host):port, It worked perfectly fine.

I would highly suggest people to use option as I followed and mentioned here. when you use curator.yml config: with self signed certificates for ssl/tls verification used on your Elasticsearch node.

On documents, it is not really mentioned clearly. so I was using

```
client:
  hosts:
    - 127.0.0.1
  port: 9200

```

when I changed to format below, It actually worked just fine.

```
client:
  hosts:
    - https://securehost.com:9200

```

Please don't follow as it mentioned [Here](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.8/configfile.html). but try to see what works for you. 😀

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 2, 2021, 4:44am UTC](https://discuss.elastic.co/t/curate-unable-to-connect-to-elasticsearch-cluster/266171/6 "2021-04-02T04:44:02Z")

</div>

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