Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDAP service does not seem to restart properly #45

Open
binduwavell opened this issue Jun 28, 2020 · 8 comments
Open

LDAP service does not seem to restart properly #45

binduwavell opened this issue Jun 28, 2020 · 8 comments

Comments

@binduwavell
Copy link

binduwavell commented Jun 28, 2020

If I accept an LDAP server when I create my project, I spin up the stack, I turn it down and then spin it up again, the LDAP container fails to start.

Here is the logged error:

openldap | Error: the config directory (/etc/ldap/slapd.d) is empty but not the database directory (/var/lib/ldap)
openldap | *** /container/run/startup/slapd failed with status 1

In fact ./data/ldap has files while ./data/slap.d is empty.

@aborroy
Copy link
Contributor

aborroy commented Jun 29, 2020

Thanks for the feedback, @binduwavell
It looks like "latest"/"stable" version for openldap was broken.
It's working now using 1.4.0 release.

aborroy added a commit that referenced this issue Jun 29, 2020
It looks like there was a problem with 'latest'/'stable' version fron openldap Docker Image. Fixed by using 1.4.0 release.
@binduwavell
Copy link
Author

It seems to still not be working. I wonder if the issue is that I'm on windows and native docker volumes should be used?

@binduwavell
Copy link
Author

Whelp, I tried to upgrade my generator and I don't appear to have gotten the fix to use 1.4.0 so probably that is the issue.

@binduwavell
Copy link
Author

binduwavell commented Jul 9, 2020

I've fiddled some more and this is still not working for me on Windows. I did try switching to a normal Docker volume and it didn't help.

Angel, are you testing on Windows or Mac?

@aborroy
Copy link
Contributor

aborroy commented Jul 20, 2020

I'm using Mac, I'll test in Windows to see what happens.

@zejdad
Copy link

zejdad commented Dec 7, 2020

Hi, I am experiencing the same problem with 1.4.0. First run is fine, but any subsequent attempt to re-run the container with non-empty /var/lib/ldap leads to:

openldap | *** CONTAINER_LOG_LEVEL = 3 (info)
openldap | *** Search service in CONTAINER_SERVICE_DIR = /container/service :
openldap | *** link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools
openldap | *** link /container/service/slapd/startup.sh to /container/run/startup/slapd
openldap | *** link /container/service/slapd/process.sh to /container/run/process/slapd/run
openldap | *** Set environment for startup files
openldap | *** Environment files will be proccessed in this order : 
openldap | Caution: previously defined variables will not be overriden.
openldap | /container/environment/99-default/default.yaml
openldap | /container/environment/99-default/default.startup.yaml
openldap | 
openldap | To see how this files are processed and environment variables values,
openldap | run this container with '--loglevel debug'
openldap | *** Running /container/run/startup/:ssl-tools...
openldap | *** Running /container/run/startup/slapd...
openldap | openldap user and group adjustments
openldap | get current openldap uid/gid info inside container
openldap | -------------------------------------
openldap | openldap GID/UID
openldap | -------------------------------------
openldap | User uid: 911
openldap | User gid: 911
openldap | uid/gid changed: false
openldap | -------------------------------------
openldap | updating file uid/gid ownership
**openldap | Error: the config directory (/etc/ldap/slapd.d) is empty but not the database directory (/var/lib/ldap)**
openldap | *** /container/run/startup/slapd failed with status 1
openldap | 
openldap | *** Killing all processes...

After deleting the /var/lib/ldap contents it starts normally. Please, do you have any solution?

I just noticed it is being discussed also here:
osixia/docker-openldap#472

Regards,
David

@aborroy
Copy link
Contributor

aborroy commented Dec 9, 2020

May you test with the latest version (0.0.21)?
I've changed the volume mapping to see if that helps.

@zejdad
Copy link

zejdad commented Dec 9, 2020

Angel, thank you for working on this issue!

I just updated alfresco-docker-installer (sudo npm install --global generator-alfresco-docker-installer) to 0.1.21 (to be sure, I checked the version tag in the package.json). However, it (yo alfresco-docker-installer) generates exactly the same configs as before; or at least I have not spotted any difference (same directory size, no diff for docker-compose.yml). Namely, volume mappings for openldap in docker-compose.yml are still ./data/ldap:/var/lib/ldap and ./data/slap.d:/etc/ldap/slap.d .

Have a nice day!
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants