# Post LDAP setting in elasticsearch.yml file, error seen in elasticsearch launch

**URL:** https://discuss.elastic.co/t/post-ldap-setting-in-elasticsearch-yml-file-error-seen-in-elasticsearch-launch/232125
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [May 12, 2020, 1:32am UTC](https://discuss.elastic.co/t/post-ldap-setting-in-elasticsearch-yml-file-error-seen-in-elasticsearch-launch/232125 "2020-05-12T01:32:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![lisha7](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@lisha7](https://discuss.elastic.co/u/lisha7)
#### Post date: [May 12, 2020, 1:32am UTC](https://discuss.elastic.co/t/post-ldap-setting-in-elasticsearch-yml-file-error-seen-in-elasticsearch-launch/232125/1 "2020-05-12T01:32:33Z")

</div>

Hi Team

I have added LDAP setting in elasticsearch.yml file and post which if i launch elasticsearch I get below error.

# ---------------------------------- Various -----------------------------------

# 

# Require explicit names when deleting indices:

# 

#action.destructive\_requires\_name: true

#---------------------LDAP setting----------------------------------------------  
xpack.security:  
authc:  
realms:  
ldap1:  
type: ldap  
order: 0  
url: "ldaps://ldap:636"  
bind\_dn: "ou=a,dc=b,dc=c,dc=d,dc=e"  
bind\_password: xxxxxx"  
user\_search:  
base\_dn: "dc=b,dc=c,dc=d,dc=e"  
filter: "(cn={0})"  
group\_search:  
base\_dn: "dc=b,dc=c,dc=d,dc=e"  
files:  
role\_mapping: "ES\_PATH\_CONF/x-pack/role\_mapping.yml"  
unmapped\_groups\_as\_roles: false

Error detail:  
java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.security.Security]  
Likely root cause: java.lang.IllegalArgumentException: Incorrect realm settings found. Realm settings have been changed to include the type as part of the setting key.  
For example 'xpack.security.authc.realms.file.my\_file.order'  
Found invalid config: xpack.security.authc.realms.ldap1.type, xpack.security.authc.realms.ldap, xpack.security.authc.realms.ldap1.bind\_password, xpack.security.authc.realms.ldap1.order, xpack.security.authc.realms.ldap1.bind\_dn, xpack.security.authc.realms.ldap1.url, xpack.security.authc.realms.ldap1.unmapped\_groups\_as\_roles  
Please see the breaking changes documentation.

---

<div class="post-metadata">

### Author: ![ropc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ropc/32/47022_2.png) [@ropc](https://discuss.elastic.co/u/ropc)
#### Post date: [May 12, 2020, 2:14am UTC](https://discuss.elastic.co/t/post-ldap-setting-in-elasticsearch-yml-file-error-seen-in-elasticsearch-launch/232125/2 "2020-05-12T02:14:22Z")

</div>

Hi @lisha7 - Welcome to our community forums!

There are some invalid settings in your configuration. For example, `type` is not a valid setting. You may want to check an example of LDAP configuration in our [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/ldap-realm.html#ldap-%20realm-configuration).

I hope that helps.

---

<div class="post-metadata">

### Author: ![lisha7](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@lisha7](https://discuss.elastic.co/u/lisha7)
#### Post date: [May 13, 2020, 12:20am UTC](https://discuss.elastic.co/t/post-ldap-setting-in-elasticsearch-yml-file-error-seen-in-elasticsearch-launch/232125/3 "2020-05-13T00:20:43Z")

</div>

Thanks Romain.

I have given valid setting as per the documentation,  
xpack.security.http.ssl.verification\_mode: certificate  
xpack.security.authc.token.enabled: true  
xpack.security.authc.realms:  
ldap.ldap1:  
order: 2  
url: "ldaps://SERVER\_IP:636"  
user\_search:  
base\_dn: "dc=example,dc=com"  
attribute: cn  
group\_search:  
base\_dn: "ou=groups,dc=example,dc=com"  
ssl:  
verification\_mode: certificate  
truststore:  
path: "/app/config/truststore/keystore.ks"  
password: "PASSWORD"  
files:  
role\_mapping: "/app/config/mappings/role-mappings.yml"  
unmapped\_groups\_as\_roles: false

I see below error,  
java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.security.Security]  
Likely root cause: java.lang.IllegalArgumentException: Incorrect realm settings found. Realm settings have been changed to include the type as part of the setting key.  
For example 'xpack.security.authc.realms.file.my\_file.order'  
Found invalid config: xpack.security.authc.realms.ldap  
Please see the breaking changes documentation.

---

<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 10, 2020, 12:20am UTC](https://discuss.elastic.co/t/post-ldap-setting-in-elasticsearch-yml-file-error-seen-in-elasticsearch-launch/232125/4 "2020-06-10T00:20:47Z")

</div>

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