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

can't re-start after stop #4

Open
mxriverlynn opened this issue Nov 29, 2016 · 6 comments
Open

can't re-start after stop #4

mxriverlynn opened this issue Nov 29, 2016 · 6 comments

Comments

@mxriverlynn
Copy link

I'm running into an issue with this image where I can't restart a container after i stop it.

the first time I docker run --name apacheds greggigon/apacheds (with all my other config options), it starts up fine and works.

but when i docker stop apacheds and then later docker start apacheds again, the apacheds server never starts again.

i end up going through all 20 attempts to verify the service, in the docker logs apacheds output:

LDAP not up yet... retrying... (19/20)
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
LDAP not up yet... retrying... (20/20)
TROUBLE!!! After [20] retries LDAP is still dead :(

any suggestions for making this work when i restart the container?

i'm not even sure where to look for errors, honestly... but i need this to allow stopping and restarting

thanks

@mxriverlynn
Copy link
Author

i found the logs and i'm seeing this error:

[14:52:14] ERROR [org.apache.directory.server.wrapper.ApacheDsTanukiWrapper] - Failed to start the service.
org.apache.directory.api.ldap.model.exception.LdapEntryAlreadyExistsException: ERR_250_ENTRY_ALREADY_EXISTS ou=system already exists!
	at org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition.add(AbstractBTreePartition.java:687)
	at org.apache.directory.server.core.DefaultDirectoryService.initializeSystemPartition(DefaultDirectoryService.java:1749)
	at org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:1809)
	at org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:1244)
	at org.apache.directory.server.ApacheDsService.initDirectoryService(ApacheDsService.java:318)
	at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:182)
	at org.apache.directory.server.wrapper.ApacheDsTanukiWrapper.start(ApacheDsTanukiWrapper.java:72)
	at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)

i'm very new to the world of directory services... i have a vague idea that this is the top level "organizational unit" called "system" and it looks like it's trying to re-create it and erroring out...

i'm not sure why it's trying to re-create the ou entry of system, though. any thoughts?

@mxriverlynn
Copy link
Author

looks like this is a known problem in ApacheDS when using kill -9 or other forceful shutdowns of apacheds. https://issues.apache.org/jira/browse/DIRSERVER-1954 and other issues logged for it

how do i properly shut down the docker container so this doesn't happen?

@bitwombat
Copy link

Same here. You'd think docker stop would be only be a SIGINT. Makes the image and/or ApacheDS unusable unfortunately. Any ideas @greggigon ?

@joshmoore
Copy link

I'm currently now working on this same issue in ome/apacheds-docker#12. Even with proper signal handling and calls to stop and repair I'm seeing the same failures.

@RothAndrew
Copy link

@derickbailey where were the logs where you saw the exception happening?

@gerardorosiles
Copy link

We are seen this issue too.
LDAP container starts correctly using docker-compose in developer's machines and in one of our servers.

On another server we were using docker-compose and container was starting correctly. Then I switched to deploying with Jenkins using a docker -H run command, and it stared failing. Switched back to docker-compose and also not working anymore.

I was able to get the container working by executing a local "docker run" command in this server, following the same parameterization shown here.

Any suggestions on how to fix it?

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

5 participants