docker-test-openldap icon indicating copy to clipboard operation
docker-test-openldap copied to clipboard

Slapd fails to start with new build image

Open paulkitt opened this issue 1 year ago • 2 comments

We build the actual state of the repo planing to make some small changes in the user/group structure. When starting the image with no modifications slapd fails:

openldap             | 6310a7c3 @(#) $OpenLDAP: slapd  (May 14 2022 18:35:44) $
openldap             |  Debian OpenLDAP Maintainers <[email protected]>
openldap             | 6310a7c4 hdb_db_open: database "dc=planetexpress,dc=com": database already in use.
openldap             | 6310a7c4 backend_startup_one (type=hdb, suffix="dc=planetexpress,dc=com"): bi_db_open failed! (-1)
openldap             | 6310a7c4 slapd stopped.

paulkitt avatar Sep 01 '22 12:09 paulkitt

Anybody manages to work with the current master? The project is great and it would be awesome to find a way to work with it.

paulkitt avatar Sep 01 '22 12:09 paulkitt

This seems to be a problem with a previous error from ldapmodify while configure TLS:

Configure TLS...
+ ldapmodify -Y EXTERNAL -H ldapi:/// -f /opt/openldap/bootstrap/config/tls.ldif -Q
modifying entry "cn=config"
ldap_modify: Other (e.g., implementation specific) error (80)

The script exit early an does not shutdown the slapd process.

rroemhild avatar Sep 02 '22 10:09 rroemhild

Looks like the issue is because of missing /etc/ldap/ssl/fullchain.crt

jskacel avatar Oct 26 '22 08:10 jskacel

So.. if you remove these lines https://github.com/rroemhild/docker-test-openldap/blob/master/rootfs/opt/openldap/bootstrap/config/tls.ldif#L3-L5 and rebuild the image, it will start to work

Or you need to provide your certificates (with CA) and mount it to /etc/ldap/ssl

jskacel avatar Oct 26 '22 09:10 jskacel