You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Norbet Reilly <nr...@gmail.com> on 2006/05/26 05:32:47 UTC

Detecting LDAP Port busy at start-up

I'm not sure whether to direct this question to the ApachedDS dev
list, or the MINA one...

I use an ApacheDS deployment with a custom partition that replaces an
existing directory installation. I want to detect the situation where
the other directory is already listening on the configured port, at
the time A-DS is started, and abort or at least log a very prominent
message.

With my current limited understanding I am leaning toward adding a
configuration setting to
org.apache.directory.server.configuration.MutableServerStartupConfiguration
(say "abortIfLdapPortInUse=true") and using it in
org.apache.directory.server.jndi.ServerContextFactory.startLDAP0() to
drive an optional check for "already in use" using
ServerSocket.bind().

Similar semantics may make sense for the other protocols that A-DS
supports, in which case it may be a case of a single
"abortIfAnyPortInUse" config item, or perhaps one per protocol.

Anyone have any thoughts or alternative implementation suggestions ?

Thanks

Re: Detecting LDAP Port busy at start-up

Posted by Alex Karasulu <ao...@bellsouth.net>.
Norbet Reilly wrote:

> Cool. Thanks for the note and enjoy your holiday!
>
Norbet I was looking for your email so I can reply to you but for some
reason I lost it.  Could you repost it for me?  Sorry for the inconvenience.

Thanks,
Alex

Re: Detecting LDAP Port busy at start-up

Posted by Norbet Reilly <nr...@gmail.com>.
Cool. Thanks for the note and enjoy your holiday!

Re: Detecting LDAP Port busy at start-up

Posted by Alex Karasulu <ao...@bellsouth.net>.
Norbet Reilly wrote:
> I'm not sure whether to direct this question to the ApachedDS dev
> list, or the MINA one...
>
> I use an ApacheDS deployment with a custom partition that replaces an
> existing directory installation. I want to detect the situation where
> the other directory is already listening on the configured port, at
> the time A-DS is started, and abort or at least log a very prominent
> message.
>
> With my current limited understanding I am leaning toward adding a
> configuration setting to
> org.apache.directory.server.configuration.MutableServerStartupConfiguration 
>
> (say "abortIfLdapPortInUse=true") and using it in
> org.apache.directory.server.jndi.ServerContextFactory.startLDAP0() to
> drive an optional check for "already in use" using
> ServerSocket.bind().
>
> Similar semantics may make sense for the other protocols that A-DS
> supports, in which case it may be a case of a single
> "abortIfAnyPortInUse" config item, or perhaps one per protocol.
>
> Anyone have any thoughts or alternative implementation suggestions ?

I'm thinking about this Norbet but please excuse me for being late ... 
I'm on vacation and will get back to you.

Thanks,
Alex