Docker-openldap: Can not load ldif file

Created on 19 Dec 2018  路  6Comments  路  Source: osixia/docker-openldap

issue

When I try to load existing ldif file with command
docker run --volume /Users/macky/Desktop/Example.ldif:/container/service/slapd/assets/config/bootstrap/ldif/50-bootstrap.ldif osixia/openldap:1.2.2 --copy-service

failed log

* CONTAINER_LOG_LEVEL = 3 (info)
Copy /container/service to /container/run/service
Search service in CONTAINER_SERVICE_DIR = /container/run/service :
link /container/run/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools
link /container/run/service/slapd/startup.sh to /container/run/startup/slapd
link /container/run/service/slapd/process.sh to /container/run/process/slapd/run
Set environment for startup files
*
Environment files will be proccessed in this order :
Caution: previously defined variables will not be overriden.
/container/environment/99-default/default.startup.yaml
/container/environment/99-default/default.yaml

To see how this files are processed and environment variables values,
run this container with '--loglevel debug'
* Running /container/run/startup/:ssl-tools...
Running /container/run/startup/slapd...
Database and config directory are empty...
Init new ldap server...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of stop.
Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.44+dfsg-5+deb9u2... done.
Creating initial configuration... done.
Creating LDAP directory... done.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Start OpenLDAP...
Waiting for OpenLDAP to start...
Add bootstrap schemas...
config file testing succeeded
Add image bootstrap ldif...
*
* /container/run/startup/slapd failed with status 53

* Killing all processes...

ldif file:

http://www.zytrax.com/books/ldap/ch5/sample-1-people.txt

Any suggestion?

Most helpful comment

what fixed it?

All 6 comments

close it as resolved.

what fixed it?

LDAP_DOMAIN value has to match dn added in a ldif file

am having the same issue - can someone explain how this was resolved?

"LDAP_DOMAIN value has to match dn added in a ldif file" doesn't really mean much to me..

@slavenandjelic Make sure that the domain components match the ldap domain. For example:
In the environment variable: LDAP_DOMAIN="abcd.1234"
In bootstrap.ldif: dn: [...] dc=abcd, dc=1234

I am having this issue, and the LDAP_DOMAIN match with .ldif file is not helping

Was this page helpful?
0 / 5 - 0 ratings