Docker-openldap: Can't startup if container/service/slapd/assets/certs is host mounted directory

Created on 29 Sep 2016  路  5Comments  路  Source: osixia/docker-openldap

When I try to run the container with the following command:

docker run --name ldap-service --hostname ldap-service --volume ~/openldapdocker/slapd/database:/var/lib/ldap --volume ~/openldapdocker/slapd/config:/etc/ldap/slapd.d --volume ~/openldapdocker/certs:/container/service/slapd/assets/certs --env LDAP_ORGANISATION="Example" --env LDAP_DOMAIN="local" --env LDAP_ADMIN_PASSWORD="password" osixia/openldap:1.1.6

slapd fails with this output

** CONTAINER_LOG_LEVEL = 3 (info)
*
* Search service in CONTAINER_SERVICE_DIR = /container/service :
** link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools
*
* link /container/service/slapd/startup.sh to /container/run/startup/slapd
** link /container/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...
unable to load DH parameters
139999151150736:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:696:Expecting: DH PARAMETERS
*** /container/run/startup/slapd failed with status 1

*** Killing all processes...

I am running docker 1.12.1 on Mac OS 10.10.5 (yes, I need to upgrade the OS).

Thanks

Most helpful comment

I am having this issue on Ubuntu 16.04.

All 5 comments

Hello,
I just copy past this on ubuntu and it worked,
is anyone with Mac OS can help ? :)

Even after updating to macOS 10.12, I still have the issue. The image works for me as long as I don't try to mount the /container/service/slapd/assets/certs directory. Is there some way I can get to the generated cert without mounting this directory?

Okay, I just discover the solution. I wiped out the contents of the mounted LDAP config and database directories and I was able to successfully start the OpenLDAP service. I guess some previous setting was causing trouble. Thanks for looking into this!

This is not fixed. See #83. Wiping the LDAP database every time you reboot is not a solution to this problem. As mentioned in #83 using --copy-service does not appear to fix the issue.

I am having this issue on Ubuntu 16.04.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tlchan picture tlchan  路  3Comments

Shriyanshmit picture Shriyanshmit  路  5Comments

jckoester picture jckoester  路  4Comments

adambom picture adambom  路  6Comments

LeaklessGfy picture LeaklessGfy  路  4Comments