You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Emanuele Forlano <EF...@gsma.com> on 2015/10/01 16:16:25 UTC

Replication not working ApacheDS M19

Hi
we have some problems with SyncRepl. Following Apache documentation we set up two instances of embedded ApacheDs M19.
In the provider we have:

val replRequestHandler = new SyncReplRequestHandler()
server.setReplicationReqHandler(replRequestHandler)

in the consumer:

val replicationConf = new SyncReplConfiguration
replicationConf.setRemoteHost("localhost")
replicationConf.setRemotePort(1389)
replicationConf.setUseTls(false)
replicationConf.setReplUserDn("uid=admin,ou=system")
replicationConf.setReplUserPassword("secret".getBytes)
replicationConf.setBaseDn(“o=myDn”) //replaced
replicationConf.setFilter("(objectClass=*)")
replicationConf.setRefreshInterval(60000)
replicationConf.setRefreshNPersist(true)
replicationConf.setAliasDerefMode(AliasDerefMode.NEVER_DEREF_ALIASES)

val consumer: ReplicationConsumer = new ReplicationConsumerImpl()
consumer.setConfig(replicationConf)

server.setReplConsumers(ApacheDSUtils.buildConsumers(consumer))

When we run both the server we get this error:

org.apache.directory.api.ldap.model.exception.LdapException: java.lang.RuntimeException: java.lang.NullPointerException
at org.apache.directory.server.core.shared.DefaultCoreSession.search(DefaultCoreSession.java:1157) ~[apacheds-all-2.0.0-M19.jar:2.0.0-M19]
at org.apache.directory.server.ldap.replication.provider.SyncReplRequestHandler.doSimpleSearch(SyncReplRequestHandler.java:648) ~[apacheds-all-2.0.0-M19.jar:2.0.0-M19]
at org.apache.directory.server.ldap.replication.provider.SyncReplRequestHandler.doInitialRefresh(SyncReplRequestHandler.java:562) ~[apacheds-all-2.0.0-M19.jar:2.0.0-M19]
at org.apache.directory.server.ldap.replication.provider.SyncReplRequestHandler.handleSyncRequest(SyncReplRequestHandler.java:311) ~[apacheds-all-2.0.0-M19.jar:2.0.0-M19]
at org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handleReplication(SearchRequestHandler.java:240) [apacheds-all-2.0.0-M19.jar:2.0.0-M19]

Note: when I use a more specific filter for example: cn=someCn it works fine.

Any idea?

Thanks

Emanuele Forlano | Senior Developer | GSMA Intelligence<https://gsmaintelligence.com/>
eforlano@gsma.com<ma...@gsma.com>
+44 7738 622208
+39 320 79 55 486


This email and its attachments are intended for the above named only and may be confidential. If they have come to you in error you must take no action based on them, nor must you copy or show them to anyone; please reply to this email or call +44 207 356 0600 and highlight the error.

Re: Replication not working ApacheDS M19

Posted by Kiran Ayyagari <ka...@apache.org>.
On Thu, Oct 1, 2015 at 10:16 PM, Emanuele Forlano <EF...@gsma.com> wrote:

> Hi
> we have some problems with SyncRepl. Following Apache documentation we set
> up two instances of embedded ApacheDs M19.
> In the provider we have:
>
> val replRequestHandler = new SyncReplRequestHandler()
> server.setReplicationReqHandler(replRequestHandler)
>
> in the consumer:
>
> val replicationConf = new SyncReplConfiguration
> replicationConf.setRemoteHost("localhost")
> replicationConf.setRemotePort(1389)
> replicationConf.setUseTls(false)
> replicationConf.setReplUserDn("uid=admin,ou=system")
> replicationConf.setReplUserPassword("secret".getBytes)
> replicationConf.setBaseDn(“o=myDn”) //replaced
> replicationConf.setFilter("(objectClass=*)")
> replicationConf.setRefreshInterval(60000)
> replicationConf.setRefreshNPersist(true)
> replicationConf.setAliasDerefMode(AliasDerefMode.NEVER_DEREF_ALIASES)
>
> val consumer: ReplicationConsumer = new ReplicationConsumerImpl()
> consumer.setConfig(replicationConf)
>
> server.setReplConsumers(ApacheDSUtils.buildConsumers(consumer))
>
> When we run both the server we get this error:
>
> org.apache.directory.api.ldap.model.exception.LdapException:
> java.lang.RuntimeException: java.lang.NullPointerException
>
hard to say from this, can you enable debug mode and send the detailed
stack trace or
any other relevant parts?

> at
> org.apache.directory.server.core.shared.DefaultCoreSession.search(DefaultCoreSession.java:1157)
> ~[apacheds-all-2.0.0-M19.jar:2.0.0-M19]
> at
> org.apache.directory.server.ldap.replication.provider.SyncReplRequestHandler.doSimpleSearch(SyncReplRequestHandler.java:648)
> ~[apacheds-all-2.0.0-M19.jar:2.0.0-M19]
> at
> org.apache.directory.server.ldap.replication.provider.SyncReplRequestHandler.doInitialRefresh(SyncReplRequestHandler.java:562)
> ~[apacheds-all-2.0.0-M19.jar:2.0.0-M19]
> at
> org.apache.directory.server.ldap.replication.provider.SyncReplRequestHandler.handleSyncRequest(SyncReplRequestHandler.java:311)
> ~[apacheds-all-2.0.0-M19.jar:2.0.0-M19]
> at
> org.apache.directory.server.ldap.handlers.request.SearchRequestHandler.handleReplication(SearchRequestHandler.java:240)
> [apacheds-all-2.0.0-M19.jar:2.0.0-M19]
>
> Note: when I use a more specific filter for example: cn=someCn it works
> fine.
>
> Any idea?
>
> Thanks
>
> Emanuele Forlano | Senior Developer | GSMA Intelligence<
> https://gsmaintelligence.com/>
> eforlano@gsma.com<ma...@gsma.com>
> +44 7738 622208
> +39 320 79 55 486
>
>
> This email and its attachments are intended for the above named only and
> may be confidential. If they have come to you in error you must take no
> action based on them, nor must you copy or show them to anyone; please
> reply to this email or call +44 207 356 0600 and highlight the error.
>



-- 
Kiran Ayyagari
http://keydap.com