directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Karasulu (JIRA)" <>
Subject [jira] Commented: (DIREVE-151) Shutting down server multiple times results in 'Failed to sync all'
Date Tue, 29 Mar 2005 18:00:19 GMT
     [ ]
Alex Karasulu commented on DIREVE-151:

Yah this stack trace is a result of trying to close the database when it has already been
closed so its harmless.  The thing is are you shutting down the server explicitly somewhere?
 If so remove that code and try shutting down again.  The server will naturally apply its
own shutdown hook.  

Also perhaps we can make the shutdown hook inside the server check if the server is already
shutdown before trying again to avoid this trace.  Let me know what your results are if you
remove the your hook that shutsdown the LDAP server.  Based on that we might mess with the
hook inside apacheds.

> Shutting down server multiple times results in 'Failed to sync all'
> -------------------------------------------------------------------
>          Key: DIREVE-151
>          URL:
>      Project: Directory Server
>         Type: Bug
>     Versions: 0.9
>  Environment: Windows XP, J2SE 1.4.2_05, Apache 0.9 SNAPSHOT
>     Reporter: David Geleyn
>     Assignee: Alex Karasulu
>      Fix For: 0.9
>  Attachments:, out.txt, out2.txt
> 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 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 
> I'm capable of reproducing this behavior in a small program which is attached.
> The program will ask for input (via 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.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message