openldap

Docker run the openldap,get the error:[Errno 17] File exists


I refer to the command on the official website to run openldap container. but I get the err like below, someone who can help. It's been bothering me for a long time. the command I run is:

docker run --name xingyue_openldap --restart always  -v /data/openldap/data:/var/lib/ldap -v 

/data/openldap/slapd:/etc/ldap/slapd.d --env LDAP_ORGANISATION="xingyue" --env LDAP_DOMAIN="xingyue.com" \
--env LDAP_ADMIN_PASSWORD="admin" -e LDAP_TLS=false -p 389:389 -p 636:636 --detach osixia/openldap:1.3.0 --copy-service

And the err like this and repeat output:

*** Killing all processes...
*** CONTAINER_LOG_LEVEL = 3 (info)
*** Copy /container/service to /container/run/service ignored
*** /container/run/service already exists
*** Search service in CONTAINER_SERVICE_DIR = /container/run/service :
*** link /container/run/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools
*** failed to link /container/run/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools: [Errno 17] File exists: '/container/run/service/:ssl-tools/startup.sh' -> '/container/run/startup/:ssl-tools'
*** link /container/run/service/slapd/startup.sh to /container/run/startup/slapd
*** failed to link /container/run/service/slapd/startup.sh to /container/run/startup/slapd: [Errno 17] File exists: '/container/run/service/slapd/startup.sh' -> '/container/run/startup/slapd'
*** link /container/run/service/slapd/process.sh to /container/run/process/slapd/run
*** directory /container/run/process/slapd already exists
*** failed to link /container/run/service/slapd/process.sh to /container/run/process/slapd/run : [Errno 17] File exists: '/container/run/service/slapd/process.sh' -> '/container/run/process/slapd/run'
*** Set environment for startup files
*** Environment files will be processed 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...
Start OpenLDAP...
*** /container/run/startup/slapd failed with status 1
enter code here

Solution

  • I don't know why my docker lacks the docker0 network card, so I reinstall the docker0 network card, and restart docker. This is the reason of the error