# Rally fails to connect to metrics instance with X-Pack Security

**URL:** <https://discuss.elastic.co/t/rally-fails-to-connect-to-metrics-instance-with-x-pack-security/87320>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [May 27, 2017, 2:21am UTC](https://discuss.elastic.co/t/rally-fails-to-connect-to-metrics-instance-with-x-pack-security/87320 "2017-05-27T02:21:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Woodford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/woodford/32/9540_2.png) [@Woodford](https://discuss.elastic.co/u/Woodford)\
**Post date:** [May 27, 2017, 2:21am UTC](https://discuss.elastic.co/t/rally-fails-to-connect-to-metrics-instance-with-x-pack-security/87320/1 "2017-05-27T02:21:21Z")

</div>

Trying to run with metrics, using the default [elastic.co](http://elastic.co) elasticsearch v5 docker image.  
As far as I can see/find, there is no way to configure rally to use a metrics instance that has X-Pack Security enabled.  
Is there somewhere I can put in a workaround? Or would we have to configure the python code to connect with a certificate?  
For testing I could disable Security, but longer term I'd like to enable it.

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [June 19, 2017, 6:27am UTC](https://discuss.elastic.co/t/rally-fails-to-connect-to-metrics-instance-with-x-pack-security/87320/2 "2017-06-19T06:27:54Z")

</div>

Hi @Woodford,

this is doable with Rally. In the initial setup routine (`esrally configure --advanced-config`), Rally will ask you "Use secure connection (True, False)". This will enable an SSL connection to the metrics store. If you have already configured your metrics store, you can also edit `~/.rally/rally.ini` directly and set `datastore.secure = True`.

As you also mention certificates: Rally uses [certifi](https://pypi.python.org/pypi/certifi) to get SSL root certificates. If you use a self-signed certificate, that might cause problems. If that's the case could you please more concrete details about the error message(s) you're getting?

Daniel

---

<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:** [July 17, 2017, 6:28am UTC](https://discuss.elastic.co/t/rally-fails-to-connect-to-metrics-instance-with-x-pack-security/87320/3 "2017-07-17T06:28:17Z")

</div>

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