Slapd does not start in version 1.4.0
SO: Ubuntu 20.04 Docker: 20.10.3, build 48d30b5 Openldap: 1.4.0
Slapd in container does not start. The container continues logging these messages:
601db435 slapd starting 601db435 daemon: listen(ldap://f917c052577c:389, 5) failed errno=98 (Address already in use) 601db435 slapd stopped.
Run instructions:
docker run --restart always --env-file ./openldap.env --name openldap -p 389:389 -p 636:636
-v /data/slapd/database:/var/lib/ldap
-v /data/slapd/config:/etc/ldap/slapd.d
-v /data/slapd/backup:/data/backup
-d osixia/openldap:1.4.0
openldap.env: HOSTNAME=ldap.contoso.com LDAP_ORGANISATION=contoso LDAP_DOMAIN=contoso.com LDAP_ADMIN_PASSWORD=SuperSecretPassword1 LDAP_READONLY_USER=true LDAP_READONLY_USER_USERNAME=rouser LDAP_READONLY_USER_PASSWORD=SuperSecretPassword2 LDAP_TLS=true LDAP_TLS_CRT_FILENAME=cert.pem LDAP_TLS_KEY_FILENAME=privkey.pem LDAP_TLS_CA_CRT_FILENAME=fullchain.pem LDAP_TLS_VERIFY_CLIENT=allow
The same configuration works like a charm with versions <1.4.0.
Hello. Same issue with version 1.5.0.
@danielepercivaldi as stated in https://github.com/osixia/docker-openldap/issues/360 removing/commenting out HOSTNAME from your env file should fix this issue
Thank you @obourdon . It works. Now I cannot understand the meaning of environment variable HOSTNAME. Is this a bug? Is HOSTNAME to be removed from documentation?
Thank you.
I resolved this settings hostname in the docker-compose:
keycloack:
image: osixia/openldap:1.4.0
hostname: mydomain.tld
Do not use HOSTNAME environment variable.