# Unable to configure Elasticsearch https with SearchGuard

**URL:** <https://forum.search-guard.com/t/unable-to-configure-elasticsearch-https-with-searchguard/592>\
**Category:** Search Guard\
**Created:** [September 4, 2017, 11:25am UTC](https://forum.search-guard.com/t/unable-to-configure-elasticsearch-https-with-searchguard/592 "2017-09-04T11:25:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![senthil\_kumar](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@senthil\_kumar](https://forum.search-guard.com/u/senthil_kumar)\
**Post date:** [September 4, 2017, 11:25am UTC](https://forum.search-guard.com/t/unable-to-configure-elasticsearch-https-with-searchguard/592/1 "2017-09-04T11:25:58Z")

</div>

We are currently running Elasticsearch 5.4.2 in our organization. Currently, this is integrated with our Intranet site(developed with [asp.net](http://asp.net)), and is used to search some important information regarding our business.

We are planning to move our intranet site from “http” to “https”. When the Intranet site runs under “https” and elasticsearch under “http”, we are receiving following error “jquery 1.12.4.min.js:4 Mixed Content: The page at ‘[https://intranet/codesearch](https://intranet/codesearch)’ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ‘[http://intranet:9200/code2017/\_search](http://intranet:9200/code2017/_search)’. This request has been blocked; the content must be served over HTTPS”

Hence, we have decided to run elasticsearch under “https” and installed X-Pack. Now, the 30 days trail period of X-Pack is over. The pricing of X-Pack is high which we can’t afford. As an alternate, we tried with SearchGuard. The below steps have been taken to configure SG, but no luck.

1. Installed Searchguard

2. while running install\_demo\_configuration.sh, following error occurs.

3. Instead of running install\_demo\_configuration.sh, created the “keystore.jks”,“truststore.jks” manually with powershell(by running base64) and moved them to elasticsearch config folder and added the following into elasticserach.yml file.

searchguard.ssl.transport.keystore\_filepath: keystore.jks

searchguard.ssl.transport.truststore\_filepath: truststore.jks

searchguard.ssl.transport.enforce\_hostname\_verification: false

searchguard.ssl.http.enabled: true

searchguard.ssl.http.keystore\_filepath: keystore.jks

searchguard.ssl.http.truststore\_filepath: truststore.jks

searchguard.authcz.admin\_dn:

- “CN=kirk,OU=client,O=client,L=test, C=de”

network.host: 0.0.0.0

cluster.name: searchguard\_demo

1. After that, tried to run sgadmin\_demo.sh, but, following error occurs

Now, elasticsearch is in running state, but showing “Search Guard not initialized (SG11). See [https://github.com/floragunncom/search-guard-docs/blob/master/sgadmin.md](https://github.com/floragunncom/search-guard-docs/blob/master/sgadmin.md)”

Our environment is

OS: Windows server 2012 R2

ES: elasticsearch 5.4.2

SG: searchguard 5.4.2

Java: jre1.8.0\_121

Number of nodes: 1

Please help.

---

<div class="post-metadata">

**Author:** ![ali\_aqdas\_Shah](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@ali\_aqdas\_Shah](https://forum.search-guard.com/u/ali_aqdas_Shah)\
**Post date:** [October 31, 2017, 10:23am UTC](https://forum.search-guard.com/t/unable-to-configure-elasticsearch-https-with-searchguard/592/2 "2017-10-31T10:23:27Z")

</div>

.
