apacheds
apacheds copied to clipboard
can't re-start after stop
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
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?
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?
Same here. You'd think docker stop would be only be a SIGINT. Makes the image and/or ApacheDS unusable unfortunately. Any ideas @greggigon ?
I'm currently now working on this same issue in openmicroscopy/apacheds-docker#12. Even with proper signal handling and calls to stop
and repair
I'm seeing the same failures.
@derickbailey where were the logs where you saw the exception happening?
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?