Open wonderslug opened 8 years ago
have no problem running your docker-compose file :/ this is the normal log:
openldap | Stop OpenLDAP...
openldap | 57a23335 daemon: shutdown requested and initiated.
openldap | 57a23335 slapd shutdown: waiting for 0 operations/tasks to finish
openldap | 57a23335 slapd stopped.
....
instead of:
openldap | kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
I guess SLAPD_PID is empty https://github.com/osixia/docker-openldap/blob/stable/image/service/slapd/startup.sh#L364-L365
I have no explanation if you can investigate ?
Ok looks like this has to do with docker versions. Seems to work fine on 1.10.3 but it has issues on docker 1.11 and 1.12.
On docker 1.11.2 on linux it fails as follows
# docker run --env LDAP_ORGANISATION="My Company" --env LDAP_DOMAIN="my-company.com" \
--env LDAP_ADMIN_PASSWORD="JonSn0w" -it osixia/openldap:1.1.5 --loglevel debug
...
57a2b8c1 conn=1025 fd=20 closed
Stop OpenLDAP...
57a2b8c1 daemon: shutdown requested and initiated.
57a2b8c1 slapd shutdown: waiting for 0 operations/tasks to finish
57a2b8c1 slapd stopped.
Remove config files...
rm: cannot remove ‘/container/service/slapd/assets/config/bootstrap/ldif/readonly-user’: Directory not empty
rm: cannot remove ‘/container/service/slapd/assets/config/bootstrap/schema/mmc’: Directory not empty
rm: cannot remove ‘/container/service/slapd/assets/config/replication’: Directory not empty
rm: cannot remove ‘/container/service/slapd/assets/config/tls’: Directory not empty
*** /container/run/startup/slapd failed with status 1
*** Killing all processes...
On a mac with the latest stable docker 1.12.0 if fails initially with an out of space error
# docker run --env LDAP_ORGANISATION="My Company" --env LDAP_DOMAIN="my-company.com" \
--env LDAP_ADMIN_PASSWORD="JonSn0w" -it osixia/openldap:1.1.5 --loglevel debug
...
Add bootstrap schemas...
+ ldapadd -c -Y EXTERNAL -Q -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif
+ log-helper debug
57a2b7f3 conn=1000 fd=17 ACCEPT from PATH=/var/run/slapd/ldapi (PATH=/var/run/slapd/ldapi)
57a2b7f3 conn=1000 op=0 BIND dn="" method=163
57a2b7f3 conn=1000 op=0 BIND authcid="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" authzid="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth"
57a2b7f3 conn=1000 op=0 BIND dn="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" mech=EXTERNAL sasl_ssf=0 ssf=71
57a2b7f3 conn=1000 op=0 RESULT tag=97 err=0 text=
57a2b7f3 conn=1000 op=1 ADD dn="cn=ppolicy,cn=schema,cn=config"
57a2b7f3 ldif_write_entry: write error to "/etc/ldap/slapd.d/cn=config/cn=schema/cn={4}ppolicy.WmTr5f": No space left on device
57a2b7f3 conn=1000 op=1 RESULT tag=105 err=80 text=
57a2b7f3 conn=1000 op=2 UNBIND
57a2b7f3 conn=1000 fd=17 closed
ldap_add: Other (e.g., implementation specific) error (80)
*** /container/run/startup/slapd failed with status 80
*** Killing all processes...
57a2b7f3 daemon: shutdown requested and initiated.
57a2b7f3 slapd shutdown: waiting for 0 operations/tasks to finish
57a2b7f3 slapd stopped.
The out of space error goes away when the volumes are mounted to the host directories and then the original error I reported happens. (Yeah i get that its not missing schema attributes now).
It appears that on the 1.12 issues the slapd.pid and slapd.args file are empty
openldap | + ls -la /var/run/slapd/
openldap | total 8
openldap | drwxr-xr-x 2 openldap openldap 4096 Aug 4 02:02 .
openldap | drwxr-xr-x 5 root root 4096 Aug 4 02:02 ..
openldap | srwxrwxrwx 1 root root 0 Aug 4 02:02 ldapi
openldap | -rw-r--r-- 1 openldap openldap 0 Aug 4 02:02 slapd.args
openldap | -rw-r--r-- 1 openldap openldap 0 Aug 4 02:02 slapd.pid
Tested container start ok on ubuntu 16.04 (not a vm)
docker version
Client:
Version: 1.11.0
API version: 1.23
Go version: go1.5.4
Git commit: 4dc5990
Built: Wed Apr 13 18:38:59 2016
OS/Arch: linux/amd64
Server:
Version: 1.11.0
API version: 1.23
Go version: go1.5.4
Git commit: 4dc5990
Built: Wed Apr 13 18:38:59 2016
OS/Arch: linux/amd64
docker-compose version
docker-compose version 1.8.0, build f3628c7
docker-py version: 1.9.0
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013
and
docker-compose version
docker-compose version 1.6.2, build 4d72027
docker-py version: 1.7.2
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013
and container start ok with:
docker version
Client:
Version: 1.12.0
API version: 1.24
Go version: go1.6.3
Git commit: 8eab29e
Built: Thu Jul 28 22:11:10 2016
OS/Arch: linux/amd64
Server:
Version: 1.12.0
API version: 1.24
Go version: go1.6.3
Git commit: 8eab29e
Built: Thu Jul 28 22:11:10 2016
OS/Arch: linux/amd6
I'm seeing a similar behavior with v 1.1.6 working on docker 1.11.1 on OSX (aufs storage driver), but failing on docker 1.11.2 on linux (CentOS 7.2, kernel 3.10.0-327, overlayfs storage driver)
on OSX it starts ok with (snipped):
No certificate file and certificate key provided, generate: /container/service/slapd/assets/certs/ldap.crt and /container/service/slapd/assets/certs/ldap.key 2016/09/23 03:00:02 [INFO] generate received request 2016/09/23 03:00:02 [INFO] received CSR 2016/09/23 03:00:02 [INFO] generating key: ecdsa-384 2016/09/23 03:00:02 [INFO] encoded CSR 2016/09/23 03:00:02 [INFO] signed certificate with serial number 62342815670384740314578522805766971792130307996 Link /container/service/:ssl-tools/assets/default-ca/default-ca.pem to /container/service/slapd/assets/certs/ca.crt Disable replication config... Stop OpenLDAP... Remove config files... First start is done... *** Set environment for container process *** Remove file /container/environment/99-default/default.startup.yaml *** Environment files will be proccessed in this order : Caution: previously defined variables will not be overriden. /container/environment/99-default/default.yaml
On CentOS it fails with:
No certificate file and certificate key provided, generate: /container/service/slapd/assets/certs/ldap.crt and /container/service/slapd/assets/certs/ldap.key 2016/09/23 03:08:09 [INFO] generate received request 2016/09/23 03:08:09 [INFO] received CSR 2016/09/23 03:08:09 [INFO] generating key: ecdsa-384 2016/09/23 03:08:09 [INFO] encoded CSR 2016/09/23 03:08:10 [INFO] signed certificate with serial number 378296702457387363229803744464300083364990398291 Link /container/service/:ssl-tools/assets/default-ca/default-ca.pem to /container/service/slapd/assets/certs/ca.crt Disable replication config... Stop OpenLDAP... Remove config files... rm: cannot remove ‘/container/service/slapd/assets/config/bootstrap/ldif/readonly-user’: Directory not empty rm: cannot remove ‘/container/service/slapd/assets/config/bootstrap/schema/mmc’: Directory not empty rm: cannot remove ‘/container/service/slapd/assets/config/replication’: Directory not empty rm: cannot remove ‘/container/service/slapd/assets/config/tls’: Directory not empty *** /container/run/startup/slapd failed with status 1
which seems to be happening here: https://github.com/osixia/docker-openldap/blob/stable/image/service/slapd/startup.sh#L380
Any guidance would be greatly appreciated.
hello @fernandosanchezmunoz as a quick fix can you try to run the container with --copy-service argument ?
docker run [YOUR OPTIONS] -d osixia/openldap:1.1.6 --copy-service
That seems to work on linux!! Thanks!!
using docker-compose... can someone tell me how to pass in --copy-service via docker-compose?
CentOS Linux release 7.3.1611 (Core)
$ docker version
Client:
Version: 1.12.5
API version: 1.24
Go version: go1.6.4
Git commit: 7392c3b
Built: Fri Dec 16 02:42:17 2016
OS/Arch: linux/amd64
Server:
Version: 1.12.5
API version: 1.24
Go version: go1.6.4
Git commit: 7392c3b
Built: Fri Dec 16 02:42:17 2016
OS/Arch: linux/amd64
docker-compose --version
docker-compose version 1.9.0, build 2585387
*** 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...
Database and config directory are empty...
Init new ldap server...
invoke-rc.d: policy-rc.d denied execution of stop.
Creating initial configuration... done.
Creating LDAP directory... done.
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for libc-bin (2.19-18+deb8u6) ...
Start OpenLDAP...
Waiting for OpenLDAP to start...
Add bootstrap schemas...
config file testing succeeded
Add bootstrap ldif...
Add TLS config...
No certificate file and certificate key provided, generate:
/container/service/slapd/assets/certs/ldap.crt and /container/service/slapd/assets/certs/ldap.key
2017/01/10 17:20:21 [INFO] generate received request
2017/01/10 17:20:21 [INFO] received CSR
2017/01/10 17:20:21 [INFO] generating key: ecdsa-384
2017/01/10 17:20:21 [INFO] encoded CSR
2017/01/10 17:20:21 [INFO] signed certificate with serial number 603485632588099999684380951672016402744618931902
Link /container/service/:ssl-tools/assets/default-ca/default-ca.pem to /container/service/slapd/assets/certs/ca.crt
Disable replication config...
Stop OpenLDAP...
Remove config files...
rm: cannot remove ‘/container/service/slapd/assets/config/bootstrap/ldif/readonly-user’: Directory not empty
rm: cannot remove ‘/container/service/slapd/assets/config/bootstrap/schema/mmc’: Directory not empty
rm: cannot remove ‘/container/service/slapd/assets/config/replication’: Directory not empty
rm: cannot remove ‘/container/service/slapd/assets/config/tls’: Directory not empty
*** /container/run/startup/slapd failed with status 1
*** Killing all processes...
I have the same issue. both ldap and phpldapadmin, similar issues. I'm using kubernetes to create the container know. how to use the copy service?
*** Running /container/run/startup/phpldapadmin...
Set apache2 https config...
Bootstap phpLDAPadmin...
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/config’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/hooks/classes’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/hooks/functions’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/htdocs/css/default’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/htdocs/css/tango’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/htdocs/images/countries’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/htdocs/images/default’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/htdocs/images/tango’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/htdocs/js/jscalendar/lang’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/htdocs/js/jscalendar/skins/aqua’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/lib’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/ca_ES/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/cs_CZ/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/da_DK/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/de_DE/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/es_ES/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/fi_FI/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/fr_FR/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/gn_PY/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/hu_HU/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/it_IT/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/ja_JP/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/nb_NO/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/nl_BE/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/oc_FR/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/pl_PL/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/pt_BR/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/ru_RU/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/sk_SK/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/sv_FI/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/tr_TR/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/uk_UA/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/zh_CN/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/locale/zh_TW/LC_MESSAGES’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/queries’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/templates/creation’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/templates/modification’: Directory not empty
rm: cannot remove ‘/var/www/phpldapadmin_bootstrap/tools/po’: Directory not empty
*** /container/run/startup/phpldapadmin failed with status 1
*** Killing all processes...
@worthwhileindustries You can do it with
command: --copy-service
Howdy
Im trying to run the container and it keeps failing out with missing attributes.
Im seeing the same thing with version 1.1.3, 1.1.4, and 1.1.5. I am starting with as simple as
It fails with missing attributes olcSyncrepl and olcServerID
Am I just missing a schema file or something else?