You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2007/04/21 13:08:17 UTC

[jira] Closed: (DIRSERVER-380) Shutting down server multiple times results in 'Failed to sync all'

     [ https://issues.apache.org/jira/browse/DIRSERVER-380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRSERVER-380.
---------------------------------------


Closing all issues created in 2005 and before which are marked resolved

> Shutting down server multiple times results in 'Failed to sync all'
> -------------------------------------------------------------------
>
>                 Key: DIRSERVER-380
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-380
>             Project: Directory ApacheDS
>          Issue Type: Bug
>         Environment: Windows XP, J2SE 1.4.2_05, Apache 0.9 SNAPSHOT
>            Reporter: David Geleyn
>         Assigned To: Alex Karasulu
>         Attachments: out.txt, out2.txt, Test.java
>
>
> Situation in which the error occurs:
> When shutting down server of Product X (which embeds Apache Directory Server) we 
> have some problems with shutting down the embeded LDAP server. One of the 
> reasons could be the addShutdownhook in RootNexus.java. When embedding the 
> LDAP server we need to add a shutdownhook ourselves to make sure the LDAP 
> server is gracefully shutdown (see code below). Among other things, the 
> shutdown of the embedded LDAP server seems to call the sync on the 
> RootNexus as well, causing an IllegalStateException as 2 separate threads 
> are accessing the RootNexus.
> Java API for System.exit:
> The virtual machine's shutdown sequence consists of two phases. In the 
> first phase all registered shutdown hooks, if any, are started in some 
> unspecified order and allowed to run concurrently until they finish. 
> Example of shutting down (which is implicitly a part of our shutdownhook):
> Properties env = new Properties();
> env.setProperty(Context.PROVIDER_URL, "ou=system");
> env.setProperty(Context.INITIAL_CONTEXT_FACTORY, 
> "org.apache.ldap.server.jndi.ServerContextFactory");
> env.setProperty(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system");
> env.setProperty(Context.SECURITY_CREDENTIALS, "secret");
> env.setProperty(EnvKeys.SYNC, "true");
> env.setProperty(EnvKeys.SHUTDOWN, "true");
> new InitialDirContext(env);
> Maybe this is caused by the soluttion for bug report 
> http://issues.apache.org/jira/browse/DIREVE-92?
> I'm capable of reproducing this behavior in a small program which is attached.
> The program will ask for input (via System.in.read). When asked for input, please press Control-C to exit. The program will call the shutdown hook multiple times and will result in a 'Failed to sync all'.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.