# Enterprise search installation gives API key error

**URL:** <https://discuss.elastic.co/t/enterprise-search-installation-gives-api-key-error/283645>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [September 8, 2021, 10:46am UTC](https://discuss.elastic.co/t/enterprise-search-installation-gives-api-key-error/283645 "2021-09-08T10:46:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandeep\_Raju](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@Sandeep\_Raju](https://discuss.elastic.co/u/Sandeep_Raju)\
**Post date:** [September 8, 2021, 10:46am UTC](https://discuss.elastic.co/t/enterprise-search-installation-gives-api-key-error/283645/1 "2021-09-08T10:46:18Z")

</div>

Hi,

I'm trying to install Elastic Enterprise Search on my system.  
My kibana version is 7.14. Enterprise search didn't have a version and downloaded tar.gz package .  
I downloaded the file from [Download Elastic Enterprise Search | Elastic](https://www.elastic.co/downloads/enterprise-search)

I have added necessary settings in elasticsearch.yml, enterprise-search.yml and kibana.yml.

But when i run,

```auto
ENT_SEARCH_DEFAULT_PASSWORD=PASSWORD bin/enterprise-search

```

I get the below error:  
**Elasticsearch API key service must be enabled. It is enabled automatically when you configure Elasticsearch to use TLS on the HTTP interface.Alternatively, you can explicitly enable the setting within Elasticsearch by opening config/elasticsearch.yml and adding:xpack.security.authc.api\_key.enabled: true**

But I have added `xpack.security.authc.api_key.enabled: true` to my elasticsearch.yml file.  
Have restarted all services.

I have enabled `xpack.security.enabled: true` in my `elasticsearch.yml`.  
I have tried to run many times, but I'm getting the same error.

Don't get why still I'm this is giving error.

Please help as I'm unable to progress in Enterprise search.

---

<div class="post-metadata">

**Author:** ![ross.bell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ross.bell/32/77559_2.png) [@ross.bell](https://discuss.elastic.co/u/ross.bell)\
**Post date:** [September 8, 2021, 2:31pm UTC](https://discuss.elastic.co/t/enterprise-search-installation-gives-api-key-error/283645/2 "2021-09-08T14:31:48Z")

</div>

Hey @Sandeep_Raju,

Could you provide your `elasticsearch.yml` and `enterprise_search.yml` config files? You can include just the uncommented portions, and please redact any sensitive values like passwords.

Thanks  
Ross

---

<div class="post-metadata">

**Author:** ![Sandeep\_Raju](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@Sandeep\_Raju](https://discuss.elastic.co/u/Sandeep_Raju)\
**Post date:** [September 8, 2021, 6:29pm UTC](https://discuss.elastic.co/t/enterprise-search-installation-gives-api-key-error/283645/3 "2021-09-08T18:29:37Z")

</div>

Hey @ross.bell

Here are my yml settings:

**elasticsearch.yml**

```auto
###Uncommented lines
xpack.security.enabled: true
xpack.security.authc.api_key.enabled: true

```

**enterprise-search.yml**

```auto
elasticsearch.username: elastic
elasticsearch.password: MyPassword
allow_es_settings_modification: true
secret_management.encryption_keys: [b85fec18066999ecf0a8f03b861a084d661feb265703123f1f023104ba87322e, 04f98e745b2e408f1ec5ef70463308781f6472d28091024aa75faf1e69c2e619]
kibana.external_url: http://localhost:5601
ent_search.auth.source: standard
ent_search.external_url: http://localhost:3002

```

**kibana.yml**

```auto
elasticsearch.username: elastic
elasticsearch.password: MyPassword
enterpriseSearch.host: http://localhost:3002

```

Here are my yml settings.  
But I keep getting the same error even after restarting all services.  
Kindly help

---

<div class="post-metadata">

**Author:** ![ross.bell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ross.bell/32/77559_2.png) [@ross.bell](https://discuss.elastic.co/u/ross.bell)\
**Post date:** [September 8, 2021, 11:11pm UTC](https://discuss.elastic.co/t/enterprise-search-installation-gives-api-key-error/283645/4 "2021-09-08T23:11:01Z")

</div>

I was able to start up 7.14.1 Elasticsearch/Kibana/Enterprise Search locally using your exact config entries. Enterprise Search started up fine without the error you mention. I have two ideas:

- Maybe your Enterprise Search isn't connecting to the Elasticsearch instance you intended? This would explain why your `elasticsearch.yml` configuration changes don't seem to resolve the issue.
- And then similarly, make sure you're modifying the correct config files/locations:
  - `[Elasticsearch root]/config/elasticsearch.yml`
  - `[Enterprise Search root]/config/enterprise-search.yml`

There should be configuration files in those locations already with all options commented out.

Hope that helps.

---

<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:** [October 6, 2021, 11:11pm UTC](https://discuss.elastic.co/t/enterprise-search-installation-gives-api-key-error/283645/5 "2021-10-06T23:11:45Z")

</div>

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