docker-openldap: ldap_modify: error (80)
I got ldap_modify: Other (e.g., implementation specific) error (80) error during startup with godaddy certificate
I start the container by
docker run -d -v $HOME/certs:/container/service/slapd/assets/certs \
-h ldap.mycompany.com \
--name=ldap \
-e LDAP_TLS_CRT_FILENAME=425ddb461b040d25.crt \
-e LDAP_TLS_KEY_FILENAME=mycompany_com.key \
-e LDAP_TLS_CA_CRT_FILENAME=gd_bundle-g2-g1.crt \
-e LDAP_ORGANISATION="My Company Inc." \
-e LDAP_DOMAIN="mycompany.com" \
osixia/openldap:1.0.9
but it exited with status 80. Here are the logs where it fails:
Use TLS
Files /container/service/slapd/assets/certs/425ddb461b040d25.crt and /container/service/slapd/assets/certs/planetmeican_com.key already exists
ldap_modify: Other (e.g., implementation specific) error (80)
modifying entry "cn=config"
*** /etc/my_init.d/slapd failed with status 80
*** Killing all processes...
At first i tried to use a self-signed certificate generated by openssl, but it seems that this image uses gnu-tls, and they’re incompatible, so it doesn’t work. After that i used certificate generated by this image, that works. but when i changed to godaddy certificate, i got this error. I even tried to replace gnutls with openssl in dockerfile and container-start.sh and rebuild the image, but got the same error
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 23 (1 by maintainers)
It seems that somewhere the file names are hardcoded. When I return the default names (ca.crt, server.crt, server.key), I no longer meet this error.
For me, check ./certs/dhparams to see if its size is 0. Removing it solves this problem.
I just wanted to add that I have experienced the same error during the first initialization of the container. In my case, I was using a self-signed certificate and forgot to provide the
ca.crtfile, which must in this case be identical to thecert.crt. I am using version 1.3.0 of theosixia/openldap:1.3.0docker image.I have used the following code to generate
cert.key,cert.crt, andca.crtbased on my personalcsr.conffile:Hope this helps 😃
You also need a DH Parameters file:
openssl dhparam -out dhparam.pem 4096LDAP_TLS_DH_PARAM_FILENAME=dhparam.pemI am not adding nothing of new, but in summary we have to:
Run the container mapping the certs
@phlegx Did you get it working? @dengshuan Can you please post your configuration when you replaced gnutls with openssl? Thank you!
@dengshuan Getting the same error. Could you solve it by replacing gnutls with openssl or otherwise? If yes, how did you replace it if I may ask? Could you post your configuration?
thanks a lot!