# Error using ssl certs created by certgen tool

**URL:** <https://discuss.elastic.co/t/error-using-ssl-certs-created-by-certgen-tool/86119>\
**Category:** Elasticsearch\
**Created:** [May 17, 2017, 2:12pm UTC](https://discuss.elastic.co/t/error-using-ssl-certs-created-by-certgen-tool/86119 "2017-05-17T14:12:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hartfordfive](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hartfordfive/32/44794_2.png) [@hartfordfive](https://discuss.elastic.co/u/hartfordfive)\
**Post date:** [May 17, 2017, 2:12pm UTC](https://discuss.elastic.co/t/error-using-ssl-certs-created-by-certgen-tool/86119/1 "2017-05-17T14:12:32Z")

</div>

I'm about to use some new domain names so I've created certificates (for **client01** , **client02** , **clientXX** , and **server** with the certgen tool) for tenants that will be shipping logs (via filebeat) to an Nginx instance which then sends the logs to a local Kafka cluster. When creating the certs, i've set the CN to be set to the domain used for the endpoint, for example "[logs.example.com](http://logs.example.com)".

Unfortunately, for the root CA cert, the CN is "Elastic Certificate Tool Autogenerated CA" and when a filebeat client attempts to connect to the Nginx instance, it shows the following error:

_DBG Ping request failed with: Get [https://logs.example2.com:443/client01:](https://logs.example2.com:443/client01:) x509: certificate is valid for Elastic Certificate Tool Autogenerated CA, not [logs.example2.com](http://logs.example2.com)_

Is there any way I can change the CN for the generated root CA certificate? Keep in mind that I currently have the same setup running with an older domain (certs not generated with the certgen tool) which the root CN is "\*.example.com" and it's working file.

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [May 19, 2017, 5:56am UTC](https://discuss.elastic.co/t/error-using-ssl-certs-created-by-certgen-tool/86119/2 "2017-05-19T05:56:37Z")

</div>

> [@hartfordfive](#):
>
> DBG Ping request failed with: Get [https://logs.example2.com:443/client01:](https://logs.example2.com:443/client01:) x509: certificate is valid for Elastic Certificate Tool Autogenerated CA, not [logs.example2.com](http://logs.example2.com)

It looks like you have configured something incorrectly.  
There's no reason why your nginx server should provide the root CA certificate to requests.

Can you provide more details on your configuration?

---

<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:** [June 16, 2017, 6:01am UTC](https://discuss.elastic.co/t/error-using-ssl-certs-created-by-certgen-tool/86119/3 "2017-06-16T06:01:44Z")

</div>

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