directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Wallis <>
Subject Re: stop and restart embedded server (1.0.2)
Date Mon, 27 Aug 2007 00:37:02 GMT
G'day Alex,
   Thanks for that. I have gotten a bit further. Now I get a "Address  
already in use" when I restart the server. I think I read somewhere  
that this was a known problem and may be fixed in a later release or  
there is a patch for it. Do you know if this is so?


brian wallis...

On 27/08/2007, at 9:56 AM, Alex Karasulu wrote:
> Please take a look at the tearDown() method of the following class  
> and it's
> super class:
>     *
> *This should show you how to properly shutdown the server.  There  
> is no easy
> way right now
> to programmatically shutdown just the LDAP port without stopping  
> the whole
> server.  There
> is a UI you can trigger to be launched if the server is running on the
> console which allows you
> to just stop listening on the port.  However this I don't think  
> really helps
> you a lot.  Take a look
> at the server-jndi project's ServerContextFactory to see if there  
> is an
> alternative means to hack
> the code to do this.
> If you like submit a patch via JIRA and we can review this as a new  
> feature.
> HTH,
> Alex
> On 8/26/07, Brian Wallis <> wrote:
>> G'day,
>>    I'm attempting to build some testcases that use multiple ldap
>> servers and want to test failure scenarios.
>> I am starting up three apacheds instances on different ports and then
>> I want to stop and restart them as required for the various test
>> scenarios. I cannot work out how to do this. I am using the following
>> to stop the servers and it does seem to stop them.
>>      Hashtable env = new Hashtable();
>>      env.putAll(new ShutdownConfiguration
>> (instanceName).toJndiEnvironment());
>>      env.put(Context.PROVIDER_URL, "ou=system");
>>      env.put(Context.INITIAL_CONTEXT_FACTORY,
>> "");
>>      env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system");
>>      env.put(Context.SECURITY_CREDENTIALS, "secret");
>>      new InitialDirContext(env);
>> but I cannot work out how to restart the server again.
>> What I really want to do is just stop it from listening on its port
>> and the re-enable it.
>> thanks,
>> brian wallis...

View raw message