directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <kayyag...@apache.org>
Subject Re: ApacheDS "Tools" "dump" question
Date Wed, 05 Oct 2011 23:04:06 GMT
On Wed, Oct 5, 2011 at 2:50 PM, Steve Hayden <hshayden@yahoo.com> wrote:
> Greetings,
>
> First, let me say I'm sorry to keep pestering you with additional questions and express
my gratitude for your help.
>
np, you are welcome!
> With regard to your statements "the config reader won't support at the moment", and "will
fix this in the trunk", please help me understand these.
>
>
> 1) Is the "config reader" the "utility" within Apache Directory Studio that will be reading
in the LDIF snippets you provided, and that data will be added to the "ou=config" within the
LDAP as seen in Apache Directory Studio (more specifically, where in hierarchy as seen in
Apache Directory Studio does the replication configuration data go)?
consider Studio as just an 'editor' for this scenario, the config
reader that am talking about is the one present inside the server that
reads
the configuration from config.ldif file
And coming to the location where the config data/entry goes, I have
given the DN in the earlier mail
(ou=replConsumers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config)

Note that you can also edit the configuration file config.ldif with a
text editor but it is ideal to use Studio cause it is easy and also
prevents
some editing mistakes
> 2) As far as the "will fix this in the trunk", how/when could one lay hands on the update?
grab the sources from trunk and build it [1]
> 3) Is there an "alternate" way to (for lack of better word) "ingest" the LDIF into a
directory other than Apache Directory Studio "import LDIF" (e.g could a Java program/method
"populate" that data into a directory)?
you can use ldapadd command or any other ldap client program
> 4) And if one can "programmatically" add (or update existing) "replication" data, one
could do this anytime (for example, once I've populated the LDAP with the data in step 2 below
(the slave), if I wanted the slave to become the master, and create another server to become
a new slave, could I simply apply the associated #1 and #2 LDIF files to the appropriate servers/machines?
yes
> 5) Would you consider ApacheDS 2.0 ready for production?
>
there are no serious bugs that would prevent its usage in production,
if you want to use it then I would suggest to have some safe backup
mechanism
for the data. Having said all this personally I won't hesitate to use
this in production environment.
>
> (I apologize if I've used the wrong/confusing jargon, please bear with me.)
>
again you are welcome, and glad that you have asked these questions

> Kindest regards/thanks,
> Steve
>
>

[1] svn checkout
http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies
    Let us know if you have issues in building it

>
> ----- Original Message -----
> From: Kiran Ayyagari <kayyagari@apache.org>
> To: Steve Hayden <hshayden@yahoo.com>; users@directory.apache.org
> Cc:
> Sent: Tuesday, October 4, 2011 12:57 PM
> Subject: Re: ApacheDS "Tools" "dump" question
>
> On Tue, Oct 4, 2011 at 12:35 PM, Steve Hayden <hshayden@yahoo.com> wrote:
>> Greetings,
>> Thanks for prompt response and information.
>>
>> As far as the steps below,
>>
>> 1) is the first step performed on the "master", and the second performed on the (for
lack of better term) "slave"?
> yes
>> 2) if the answer to the first question is "yes", then I presume that in the second
step, as it indicates "localhost", that both servers are running on the same machine in this
case?
> yeah, I just provided that as an example, it can be a different host name
>> 3) as both steps below include LDIF, I presume I could "import" the associated LDIF's
using the import function in Apache Directory Studio (once modified to the specifics of my
environment)?
> yeap
>> 4) for the parameter/value "ads-replRefreshInterval: 60000", what is the time increment
(does "60000" equal 60 (e.g. "refresh every 60 seconds)?
> yes, the value is given in milli seconds
>> 5) for the parameter/value "ads-searchBaseDN: ou=system", does that mean "only update/replicate
data/updates in the "ou=system" part of the DIT? (and if so, how does one replicate both "ou=system"
and "ou=schema" for example)
>>
> again this was just an example, you can give any partition that you
> want to replicate.with and currently there exists support for
> replicating
> with multiple partitions, however I think the config reader won't
> support at the moment (thanks for bringing this up, this reminded me
> about the
> forgotten issue with the config reader), will fix this in the trunk
>>
>> Thanks in advance for your invaluable information.
>>
>> Kindest regards,
>> Steve
>>
>> ----- Original Message -----
>> From: Kiran Ayyagari <kayyagari@apache.org>
>> To: Steve Hayden <hshayden@yahoo.com>; users@directory.apache.org
>> Cc:
>> Sent: Tuesday, October 4, 2011 12:05 PM
>> Subject: Re: ApacheDS "Tools" "dump" question
>>
>> Hi Steve,
>>
>>     The configuration for version 2.0 is stored in an LDIF file. This
>> configuration is also exposed as a partition named ou=config
>>
>>     1. To make a server respond to replication requests add the
>> attribute ads-replReqHandler with the value
>>         org.apache.directory.server.ldap.replication.provider.SyncReplRequestHandler
>>
>>     (you can also directly execute the below LDIF directly )
>>
>> dn: ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
>> changetype: modify
>> add: ads-replReqHandler
>> ads-replReqHandler:
>> org.apache.directory.server.ldap.replication.provider.SyncReplRequestHandler
>>
>>
>>     2. To replicate with another server add an entry with the
>> objectclass 'ads-replConsumer' under
>> ou=replConsumers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
>>
>>   an example would be
>>
>> dn: ads-replConsumerId=1,ou=replConsumers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
>> objectClass: ads-base
>> objectClass: ads-replConsumer
>> objectClass: top
>> ads-replAliasDerefMode: never
>> ads-replAttributes: *
>> ads-replConsumerId: 1
>> ads-replProvHostName: localhost
>> ads-replProvPort: 1090
>> ads-replRefreshInterval: 60000
>> ads-replRefreshNPersist: true
>> ads-replSearchFilter: (objectClass=*)
>> ads-replSearchScope: sub
>> ads-replSearchSizeLimit: 0
>> ads-replSearchTimeOut: 0
>> ads-replUserDn: uid=admin,ou=system
>> ads-replUserPassword:: c2VjcmV0
>> ads-searchBaseDN: ou=system
>>
>>
>>         finally the server needs to be restarted to make these changes effective
>>
>> Let us know if you have any other questions
>>
>> On Tue, Oct 4, 2011 at 11:31 AM, Steve Hayden <hshayden@yahoo.com> wrote:
>>>
>>>
>>> Greetings,
>>>
>>> I am pursuing the option you suggested of going to ApacheDS 2.0, and in the documentation
("http://directory.apache.org/apacheds/1.5/mitosis-development-guide.html") it indicates the
way to setup replication is as follows:
>>>
>>>
>>> Configuration
>>> The replication system is a Multi-Master replication, ie, each server can
>>> update any server it is connected to. The way you tell a server to replicate
to
>>> others is simple :
>>> <replicationInterceptor>
>>> <configuration>
>>> <replicationConfiguration logMaxAge="5"
>>> replicaId="instance_a"
>>> replicationInterval="2"
>>> responseTimeout="10"
>>> serverPort="10390">
>>> <s:property name="peerReplicas">
>>> <s:set>
>>> <s:value>instance_b@localhost:1234</s:value>
>>> <s:value>instance_c@localhost:1234</s:value>
>>> </s:set>
>>> </s:property>
>>> </replicationConfiguration>
>>> </configuration>
>>> </replicationInterceptor>
>>>
>>>
>>>
>>> However, it does not indicate where this code should go (or am I blind?).
>>> This looks like normal XML, but I do not find any XML files in the ApacheDS 2.0
folders/directories  (or again, am I blind?).
>>>
>>> Any insight would be appreciated.
>>>
>>> Kindest regards/thanks,
>>> Steve
>>>
>>>
>>> ________________________________
>>> From: Kiran Ayyagari <kayyagari@apache.org>
>>> To: Steve Hayden <hshayden@yahoo.com>
>>> Sent: Thursday, September 29, 2011 10:33 AM
>>> Subject: Re: ApacheDS "Tools" "dump" question
>>>
>>> replication in 1.5.7 is broken, version 2.0-M2 has support for
>>> replication(it is an implementation of RFC4533 (a.k.a syncrepl ) )
>>> If upgrading to 2.0-M2 is not an option then I would suggest you to
>>> write a program to take the dump of the directory data(in LDIF)
>>> Implementing this using ApacheDirectory project's client-api [1] is
>>> quite easy, let me know if you have any questions.
>>>
>>> [1] http://directory.apache.org/api/java-api.html
>>> On Thu, Sep 29, 2011 at 10:17 AM, Steve Hayden <hshayden@yahoo.com> wrote:
>>>> Greetings,
>>>> Thanks for your prompt reply and information.
>>>> Unfortunately using the Studio export/import is not an option in my
>>>> application. What I am actually trying to do is to create a failover
>>>> mechanism for when a "master" directory fails and must switch to another
>>>> LDAP server (perhaps a sloave) that contains the same (or most of) the data
>>>> contained in the master.  In the ApacheDS source code, there is some
>>>> "replication" code, but it does not seem to do much/anything.
>>>>
>>>> Do you have any advice on how to implement failover/redundancy?
>>>> Thanks in advance.
>>>> Steve
>>>> ________________________________
>>>> From: Kiran Ayyagari <kayyagari@apache.org>
>>>> To: users@directory.apache.org; Steve Hayden <hshayden@yahoo.com>
>>>> Sent: Wednesday, September 28, 2011 5:58 PM
>>>> Subject: Re: ApacheDS "Tools" "dump" question
>>>>
>>>> the tools project is quite old(broken) and not maintained at the moment
>>>> if you want to take a dump would suggest to use Studio's export feature
>>>>
>>>> HTH
>>>> On Wed, Sep 28, 2011 at 4:11 PM, Steve Hayden <hshayden@yahoo.com>
wrote:
>>>>> Greetings,
>>>>>
>>>>> I am attempting to use the "dump" utility contained in the
>>>>> "apacheds-tools.jar"and am having some
>>>>> difficulties. I am attempting this on a Windows 7 environment (and will
>>>>> also need to do it on Linux).
>>>>> I have tried this with the 1.5.5 and 1.5.7 versions of ApacheDS, and
>>>>> "dump" does not seems to work on
>>>>> either.  I have the "apacheds-tools.jar" in the folder:
>>>>>
>>>>> "C:\Software_Downloads\ApacheDS\apacheds_1.5.7\bin"
>>>>>
>>>>> and am using using the command:
>>>>>
>>>>> java -jar apacheds-tools.jar dump -p system -i C:\app\data\ldap
>>>>>
>>>>>
>>>>> (the "schema" and "system" files that ApacheDS creates are in that "ldap"
>>>>> folder). Executing the command
>>>>> above results in the following exception:
>>>>>
>>>>> ***************** Begin of output/exceptions *************
>>>>>        _                     _         
____  ____    _____           _
>>>>>       / \   _ __   __ _  ___| |__   ___|  _ \/ ___|  |_  
_|__   ___ |
>>>>> |___
>>>>>      / _ \ | '_ \ / _` |/ __| '_ \ / _ \ | | \___ \    | |/ _
\ / _ \| /
>>>>> __|
>>>>>     / ___ \| |_) | (_| | (__| | | |  __/ |_| |___) |   | | (_)
| (_) | \__
>>>>> \
>>>>>    /_/   \_\ .__/ \__,_|\___|_| |_|\___|____/|____/    |_|\___/
>>>>> \___/|_|___/
>>>>>            |_|
>>>>>
>>>>> Exception in thread "main" java.lang.IllegalStateException:
>>>>> C:\ofm\data\ldap\bin does not exist!
>>>>>         at
>>>>> org.apache.directory.daemon.InstallationLayout.verifyInstallation(InstallationLayout.java:294)
>>>>>         at
>>>>> org.apache.directory.server.tools.DumpCommand.execute(DumpCommand.java:156)
>>>>>         at
>>>>> org.apache.directory.server.tools.ApachedsTools.main(ApachedsTools.java:112)
>>>>>
>>>>> ******************* End of output/exceptions *************
>>>>>
>>>>> As there does not appear to be a "bin" folder created by the ApacheDS
>>>>> startup (or upon creation of a
>>>>> new LDAP), it seems that the tool (given the ouput above) is expecting
>>>>> that folder to exist.
>>>>>
>>>>> Is there something I'm doing wrong?
>>>>>
>>>>> Any insight/clue would be appreciated.
>>>>>
>>>>> Kindest regards/thanks,
>>>>> Steve
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Kiran Ayyagari
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Kiran Ayyagari
>>>
>>
>>
>>
>> --
>> Kiran Ayyagari
>>
>>
>
>
>
> --
> Kiran Ayyagari
>



-- 
Kiran Ayyagari

Mime
View raw message