# "no LDAP servers defined in config file" inspite of being defined yes

**URL:** <https://community.grafana.com/t/no-ldap-servers-defined-in-config-file-inspite-of-being-defined-yes/41904>\
**Category:** Configuration\
**Tags:** ldap\
**Created:** [January 20, 2021, 1:37pm UTC](https://community.grafana.com/t/no-ldap-servers-defined-in-config-file-inspite-of-being-defined-yes/41904 "2021-01-20T13:37:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danieltollkoetter](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@danieltollkoetter](https://community.grafana.com/u/danieltollkoetter)\
**Post date:** [January 20, 2021, 1:37pm UTC](https://community.grafana.com/t/no-ldap-servers-defined-in-config-file-inspite-of-being-defined-yes/41904/1 "2021-01-20T13:37:00Z")

</div>

**Grafana ldap connection**  
no LDAP servers defined in config file

I am completely new to ldap configuration, and only somewhat familiar with Grafana configuration.  
Trying to connect the ldap we are using for the SUSE LES shell for the grafana ldap config.

I have set ldap=true and provided the ldap.toml file below, for which the grafana appliation user has access rights.

grafana log:  
t=2021-01-18T08:09:33+0100 lvl=info msg=“LDAP enabled, reading config file” logger=ldap file=/etc/grafana/ldap.toml  
t=2021-01-18T08:09:33+0100 lvl=eror msg=“Error while trying to authenticate user” logger=context userId=0 orgId=0 uname= error=“Failed to get LDAP config: LDAP enabled but no LDAP servers defined in config file” remote\_addr=192.168.206.95

I do not know where this remote address comes from.  
The address given in the ldap.toml file works.

os shell:  
 → cat /etc/grafana/ldap.toml  
host = “172.22.91.102”  
port = 636  
use\_ssl = false  
start\_tls = true  
ssl\_skip\_verify = true  
bind\_dn = “dc=section,dc=corp”  
search\_filter = “(cn=%s)”  
search\_base\_dns = [“dc=section,dc=corp”]

```
-> curl -v telnet://172.22.91.102:636

```

- Rebuilt URL to: telnet://172.22.91.102:636/
- Trying 172.22.91.102…
- TCP\_NODELAY set
- Connected to 172.22.91.102 (172.22.91.102) port 636 (#0)

This is based on the shell config at

→ cat /etc/ldap.conf  
bind\_policy soft  
pam\_lookup\_policy yes  
pam\_password exop  
nss\_initgroups\_ignoreusers root,ldap  
nss\_map\_attribute uniqueMember member  
nss\_schema rfc2307bis  
pam\_filter objectClass=posixAccount  
ldap\_version 3  
network\_timeout 1  
timelimit 1  
bind\_timelimit 1  
timeout 1  
base dc=section,dc=corp  
uri ldaps://ldap-master ldaps://ldap-replica01 ldaps://ldap-replica02  
tls\_checkpeer yes  
tls\_cacertfile /etc/ssl/certs/corp/ca\_cert\_bundle

where the alias ldap-master translates to the ip above.  
Also tried with that alias in ldap.toml, same result

---

<div class="post-metadata">

**Author:** ![danieltollkoetter](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@danieltollkoetter](https://community.grafana.com/u/danieltollkoetter)\
**Post date:** [January 26, 2021, 6:55am UTC](https://community.grafana.com/t/no-ldap-servers-defined-in-config-file-inspite-of-being-defined-yes/41904/2 "2021-01-26T06:55:39Z")

</div>

**Solved for this step: [[servers]] headline**

This issue is solved by inserting the  
[[servers]]  
headline in the ldap.toml file.
