Hi Kiran,
The version I am using is: ApacheDS 2.0.0-M23
Here are the steps I just did to get the logs below(I checked and these logs
weren't there before I did these steps):
*Note: I have 2 servers setup up with master-master replication (if I write on
1 it replicates to 2 and if I write on 2 it replicates to 1)
1. I set 'ads-replEnabled' to false on server 1
2. I restarted server 1
3. I added a new user with the uid 'rudolph1' to server 1
4. I searched server 2 for rudolph1 and could not find him
5. I set 'ads-replEnabled' to true on server 1
6. I restarted server 1
7. I searched server 2 for rudolph1 and could not find him
8. I added a new user with uid 'john1' to server 1
9. I searched server 2 for john1 and I found him on server 2
10.I searched server 2 for rudolph1 one more time and still couldn't find him
on server 2
Here are the logs I get from server 1:
[root@mgt-rel log]# grep -irn 'error*' .
./apacheds.log:6774:[19:14:16] ERROR [org.apache.directory.server.CONSUMER_LOG]
- ERR_316 Directory service is not started.
./apacheds.log:6814:[19:14:16] ERROR [org.apache.directory.server.CONSUMER_LOG]
- ERR_316 Directory service is not started.
./apacheds.log:6857:[19:14:16] ERROR [org.apache.directory.server.CONSUMER_LOG]
- ERR_316 Directory service is not started.
./apacheds.log:6900:[19:14:16] ERROR [org.apache.directory.server.CONSUMER_LOG]
- ERR_316 Directory service is not started.
./apacheds.log:6943:[19:14:16] ERROR [org.apache.directory.server.CONSUMER_LOG]
- ERR_316 Directory service is not started.
./apacheds.log:6987:[19:14:16] ERROR [org.apache.directory.server.CONSUMER_LOG]
- ERR_316 Directory service is not started.
./apacheds.log:7030:[19:14:16] ERROR [org.apache.directory.server.CONSUMER_LOG]
- ERR_316 Directory service is not started.
./apacheds.log:7073:[19:14:16] ERROR [org.apache.directory.server.CONSUMER_LOG]
- ERR_316 Directory service is not started.
./apacheds.log:7116:[19:14:16] ERROR [org.apache.directory.server.CONSUMER_LOG]
- ERR_316 Directory service is not started.
./apacheds.log:7160:[19:14:16] ERROR [org.apache.directory.server.CONSUMER_LOG]
- ERR_316 Directory service is not started.
./apacheds.log:7206:[19:14:16] ERROR [org.apache.directory.server.CONSUMER_LOG]
- ERR_316 Directory service is not started.
./apacheds.log:7250:[19:14:16] ERROR [org.apache.directory.server.CONSUMER_LOG]
- ERR_316 Directory service is not started.
org.apache.directory.api.ldap.model.exception.LdapServiceUnavailableException:
ERR_316 Directory service is not started.
at
org.apache.directory.server.core.DefaultOperationManager.ensureStarted(DefaultOperationManager.java:1403)
at
org.apache.directory.server.core.DefaultOperationManager.hasEntry(DefaultOperationManager.java:717)
at
org.apache.directory.server.core.shared.DefaultCoreSession.exists(DefaultCoreSession.java:949)
at
org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl.handleSearchResultEntry(ReplicationConsumerImpl.java:388)
at
org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl.doSyncSearch(ReplicationConsumerImpl.java:772)
at
org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl.startSync(ReplicationConsumerImpl.java:569)
at
org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl.ping(ReplicationConsumerImpl.java:688)
at
org.apache.directory.server.ldap.replication.consumer.PingerThread.run(PingerThread.java:87)
./apacheds.log:7283:[19:14:16] ERROR [org.apache.directory.server.CONSUMER_LOG]
- Failed to store the cookie in consumer entry
ads-replConsumerId=1,ou=replConsumers,ads-serverid=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
org.apache.directory.api.ldap.model.exception.LdapServiceUnavailableException:
ERR_316 Directory service is not started.
at
org.apache.directory.server.core.DefaultOperationManager.ensureStarted(DefaultOperationManager.java:1403)
at
org.apache.directory.server.core.DefaultOperationManager.modify(DefaultOperationManager.java:813)
at
org.apache.directory.server.core.shared.DefaultCoreSession.modify(DefaultCoreSession.java:625)
at
org.apache.directory.server.core.shared.DefaultCoreSession.modify(DefaultCoreSession.java:590)
at
org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl.storeCookie(ReplicationConsumerImpl.java:934)
at
org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl.handleSyncInfo(ReplicationConsumerImpl.java:526)
at
org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl.doSyncSearch(ReplicationConsumerImpl.java:780)
at
org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl.startSync(ReplicationConsumerImpl.java:569)
at
org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl.ping(ReplicationConsumerImpl.java:688)
at
org.apache.directory.server.ldap.replication.consumer.PingerThread.run(PingerThread.java:87)
./wrapper.log:4104:INFO | jvm 1 | 2016/12/22 19:14:16 | [19:14:16] ERROR
[org.apache.directory.server.CONSUMER_LOG] - ERR_316 Directory service is not
started.
./wrapper.log:4144:INFO | jvm 1 | 2016/12/22 19:14:16 | [19:14:16] ERROR
[org.apache.directory.server.CONSUMER_LOG] - ERR_316 Directory service is not
started.
./wrapper.log:4187:INFO | jvm 1 | 2016/12/22 19:14:16 | [19:14:16] ERROR
[org.apache.directory.server.CONSUMER_LOG] - ERR_316 Directory service is not
started.
./wrapper.log:4230:INFO | jvm 1 | 2016/12/22 19:14:16 | [19:14:16] ERROR
[org.apache.directory.server.CONSUMER_LOG] - ERR_316 Directory service is not
started.
./wrapper.log:4273:INFO | jvm 1 | 2016/12/22 19:14:16 | [19:14:16] ERROR
[org.apache.directory.server.CONSUMER_LOG] - ERR_316 Directory service is not
started.
./wrapper.log:4317:INFO | jvm 1 | 2016/12/22 19:14:16 | [19:14:16] ERROR
[org.apache.directory.server.CONSUMER_LOG] - ERR_316 Directory service is not
started.
./wrapper.log:4360:INFO | jvm 1 | 2016/12/22 19:14:16 | [19:14:16] ERROR
[org.apache.directory.server.CONSUMER_LOG] - ERR_316 Directory service is not
started.
./wrapper.log:4403:INFO | jvm 1 | 2016/12/22 19:14:16 | [19:14:16] ERROR
[org.apache.directory.server.CONSUMER_LOG] - ERR_316 Directory service is not
started.
./wrapper.log:4446:INFO | jvm 1 | 2016/12/22 19:14:16 | [19:14:16] ERROR
[org.apache.directory.server.CONSUMER_LOG] - ERR_316 Directory service is not
started.
./wrapper.log:4490:INFO | jvm 1 | 2016/12/22 19:14:16 | [19:14:16] ERROR
[org.apache.directory.server.CONSUMER_LOG] - ERR_316 Directory service is not
started.
./wrapper.log:4536:INFO | jvm 1 | 2016/12/22 19:14:16 | [19:14:16] ERROR
[org.apache.directory.server.CONSUMER_LOG] - ERR_316 Directory service is not
started.
./wrapper.log:4580:INFO | jvm 1 | 2016/12/22 19:14:16 | [19:14:16] ERROR
[org.apache.directory.server.CONSUMER_LOG] - ERR_316 Directory service is not
started.
./wrapper.log:4613:INFO | jvm 1 | 2016/12/22 19:14:16 | [19:14:16] ERROR
[org.apache.directory.server.CONSUMER_LOG] - Failed to store the cookie in
consumer entry
ads-replConsumerId=1,ou=replConsumers,ads-serverid=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
Here are the logs I get from server 2:
[root@css-virt0082 log]# grep -rin 'error*' .
./apacheds.log:8310:[19:14:14] ERROR [org.apache.directory.server.CONSUMER_LOG]
- Failed to sync with refreshAndPersist mode
org.apache.directory.ldap.client.api.exception.InvalidConnectionException:
Cannot connect on the server, the connection is invalid
at
org.apache.directory.ldap.client.api.LdapNetworkConnection.checkSession(LdapNetworkConnection.java:279)
at
org.apache.directory.ldap.client.api.LdapNetworkConnection.searchAsync(LdapNetworkConnection.java:1748)
at
org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl.doSyncSearch(ReplicationConsumerImpl.java:758)
at
org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl.startSync(ReplicationConsumerImpl.java:569)
at
org.apache.directory.server.ldap.LdapServer$2.run(LdapServer.java:743)
at java.lang.Thread.run(Thread.java:745)
./apacheds.log:8321:[19:14:14] ERROR [org.apache.directory.server.CONSUMER_LOG]
- Failed to connect to the producer 192.168.200.164:10389, cause : Cannot
connect to the server: Connection refused
./apacheds.log:8323:[19:14:15] ERROR [org.apache.directory.server.CONSUMER_LOG]
- Failed to connect to the producer 192.168.200.164:10389, cause : Cannot
connect to the server: Connection refused
./apacheds.log:8746:[19:14:19] ERROR [org.apache.directory.server.CONSUMER_LOG]
- Failed to connect to the producer 192.168.200.164:10389, cause : Cannot
connect to the server: Connection refused
./apacheds.log:8749:[19:14:20] ERROR [org.apache.directory.server.CONSUMER_LOG]
- Failed to connect to the producer 192.168.200.164:10389, cause : Cannot
connect to the server: Connection refused
./apacheds.log:8896:[19:15:14] ERROR
[org.apache.directory.server.ldap.replication.provider.SyncReplSearchListener]
- Failed to write to the consumer 6 during the event ADD on entry
uid=john1,ou=people,dc=example,dc=com
./apacheds.log:8897:[19:15:14] ERROR
[org.apache.directory.server.ldap.replication.provider.SyncReplSearchListener] -
org.apache.mina.core.write.WriteToClosedSessionException
at
org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:510)
at
org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:487)
at
org.apache.directory.server.ldap.replication.provider.SyncReplSearchListener.sendResult(SyncReplSearchListener.java:198)
at
org.apache.directory.server.ldap.replication.provider.SyncReplSearchListener.entryAdded(SyncReplSearchListener.java:237)
at
org.apache.directory.server.core.event.EventInterceptor.fire(EventInterceptor.java:113)
at
org.apache.directory.server.core.event.EventInterceptor.add(EventInterceptor.java:242)
at
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
at
org.apache.directory.server.core.subtree.SubentryInterceptor.add(SubentryInterceptor.java:1018)
at
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
at
org.apache.directory.server.core.collective.CollectiveAttributeInterceptor.add(CollectiveAttributeInterceptor.java:134)
at
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
at
org.apache.directory.server.core.operational.OperationalAttributeInterceptor.add(OperationalAttributeInterceptor.java:310)
at
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
at
org.apache.directory.server.core.schema.SchemaInterceptor.add(SchemaInterceptor.java:1109)
at
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
at
org.apache.directory.server.core.hash.ConfigurableHashingInterceptor.add(ConfigurableHashingInterceptor.java:90)
at
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
at
org.apache.directory.server.core.exception.ExceptionInterceptor.add(ExceptionInterceptor.java:188)
at
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
at
org.apache.directory.server.core.admin.AdministrativePointInterceptor.add(AdministrativePointInterceptor.java:1189)
at
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
at
org.apache.directory.server.core.authz.AciAuthorizationInterceptor.add(AciAuthorizationInterceptor.java:518)
at
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
at
org.apache.directory.server.core.referral.ReferralInterceptor.add(ReferralInterceptor.java:247)
at
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
at
org.apache.directory.server.core.authn.AuthenticationInterceptor.add(AuthenticationInterceptor.java:334)
at
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
at
org.apache.directory.server.core.normalization.NormalizationInterceptor.add(NormalizationInterceptor.java:131)
at
org.apache.directory.server.core.DefaultOperationManager.add(DefaultOperationManager.java:397)
at
org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl.handleSearchResultEntry(ReplicationConsumerImpl.java:404)
at
org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl.doSyncSearch(ReplicationConsumerImpl.java:772)
at
org.apache.directory.server.ldap.replication.consumer.ReplicationConsumerImpl.startSync(ReplicationConsumerImpl.java:569)
at
org.apache.directory.server.ldap.LdapServer$2.run(LdapServer.java:743)
at java.lang.Thread.run(Thread.java:745)
./wrapper.log:1623:INFO | jvm 1 | 2016/12/22 19:14:14 | [19:14:14] ERROR
[org.apache.directory.server.CONSUMER_LOG] - Failed to sync with
refreshAndPersist mode
./wrapper.log:1634:INFO | jvm 1 | 2016/12/22 19:14:14 | [19:14:14] ERROR
[org.apache.directory.server.CONSUMER_LOG] - Failed to connect to the producer
192.168.200.164:10389, cause : Cannot connect to the server: Connection refused
./wrapper.log:1636:INFO | jvm 1 | 2016/12/22 19:14:15 | [19:14:15] ERROR
[org.apache.directory.server.CONSUMER_LOG] - Failed to connect to the producer
192.168.200.164:10389, cause : Cannot connect to the server: Connection refused
./wrapper.log:2059:INFO | jvm 1 | 2016/12/22 19:14:19 | [19:14:19] ERROR
[org.apache.directory.server.CONSUMER_LOG] - Failed to connect to the producer
192.168.200.164:10389, cause : Cannot connect to the server: Connection refused
./wrapper.log:2062:INFO | jvm 1 | 2016/12/22 19:14:20 | [19:14:20] ERROR
[org.apache.directory.server.CONSUMER_LOG] - Failed to connect to the producer
192.168.200.164:10389, cause : Cannot connect to the server: Connection refused
./wrapper.log:2209:INFO | jvm 1 | 2016/12/22 19:15:14 | [19:15:14] ERROR
[org.apache.directory.server.ldap.replication.provider.SyncReplSearchListener]
- Failed to write to the consumer 6 during the event ADD on entry
uid=john1,ou=people,dc=example,dc=com
./wrapper.log:2210:INFO | jvm 1 | 2016/12/22 19:15:14 | [19:15:14] ERROR
[org.apache.directory.server.ldap.replication.provider.SyncReplSearchListener] -
Any help that you can provide to point me in the right direction would help
tremendously. You guys are awesome for putting in the time to address my
questions.
Thanks,
Michael Pittman
>Hi Michael,
>
> I have looked at the config you posted in the other mail and it is looking
>good.
>
>On Thu, Dec 22, 2016 at 1:27 AM, Pittman, Michael <[email protected]>
>wrote:
>
>> Hey guys,
>>
>> I posted earlier about not being able to get replication working, but it
>> seems to be working now. I thought it wasn't working because I was waiting
>> for the existing entries on my ldap server to be replicated, but they never
>> were.
>>
>> So at this point, if I create new entries on my provider ldap server, then
>> they are replicated to my consumer ldap server. The issue is that the
>> pre-existing entries are not being replicated.
>>
>> this is odd, all old entries must also get replicated after turning the
>replication on. Can you check
>the logs and see if there are any errors.
>
>Which version are you using?
>
>> I also tried turning replication off, then adding a new entry, then
>> turning replication back on. In this case the entry does not replicate.
>>
>> this shouldn't happen
>> The only thing that is working is if I enable replication, then add an
>> entry. In this case the entry does get replicated. I have the configuration
>> setting on the consumer 'ads-replRefreshNPersist' set to true. Any ideas
>> what is going on here?
>>
>> can you check the logs for any errors and post them here.
>
>
>> Thanks,
>>
>> Michael Pittman
>> Software Engineer
>> CRITICAL NETWORKS / HARRIS CORPORATION
>> Mobile: (863) 517-1910
>>
>> Kiran Ayyagari
Michael Pittman
Software Engineer
CRITICAL NETWORKS / HARRIS CORPORATION
Mobile: (863) 517-1910