directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Hayden <hshay...@yahoo.com>
Subject Re: ApacheDS V2 Replication not working
Date Fri, 07 Oct 2011 13:54:40 GMT
Greetings,

Yes, I have restarted both servers numerous times, and no data gets replicated.

I presume that regardless of when replication was set up, that ALL data from the master will
be replicated on the slave (including data that existed in the master BEFORE the replication
was setup), correct?

WRT logs, I'm not seeing anything put in the logs since the server was first started up the
first time. Upon startup on the command line, the following is displayed:

og4j:WARN No appenders could be found for logger (org.apache.directory.server.ApacheDsService).
og4j:WARN Please initialize the log4j system properly.
og4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
           _                     _          ____ 
____
          / \   _ __    ___  ___| |__   ___|  _ \/ ___|
         / _ \ | '_ \ / _` |/ __| '_ \ / _ \ | | \___ \
        / ___ \| |_) | (_| | (__| | | |  __/ |_| |___) |
       /_/   \_\ .__/ \__,_|\___|_| |_|\___|____/|____/


Here is my "log4j.properties" file contents:

#############################################################################
#    Licensed to the Apache Software Foundation (ASF) under one or more
#    contributor license agreements.  See the NOTICE file distributed with
#    this work for additional information regarding copyright ownership.
#    The ASF licenses this file to You under the Apache License, Version 2.0
#    (the "License"); you may not use this file except in compliance with
#    the License.  You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS,
#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#    See the License for the specific language governing permissions and
#    limitations under the License.
#############################################################################
log4j.rootCategory=WARN, R, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=C:/temp/ApacheDS_MultiServer/instances/ApacheDS_Server3/log/apacheds.log

log4j.appender.R.MaxFileSize=1024KB
# Keep some backup files
log4j.appender.R.MaxBackupIndex=5

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n

log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n

# with these we'll not get innundated when switching to DEBUG
log4j.logger.org.apache.directory.shared.ldap.name=WARN
log4j.logger.org.apache.directory.shared.codec=WARN
log4j.logger.org.apache.directory.shared.asn1=WARN

(I would appreciated any feedback/suggestions on how to modify this file to make logging more
robust).

The following are the values for the

Again, thanks for your help.

Kindest regards,
Steve



________________________________
From: Kiran Ayyagari <kayyagari@apache.org>
To: users@directory.apache.org; Steve Hayden <hshayden@yahoo.com>
Sent: Friday, October 7, 2011 8:44 AM
Subject: Re: ApacheDS V2 Replication not working

On Thu, Oct 6, 2011 at 11:24 PM, Steve Hayden <hshayden@yahoo.com> wrote:
> Greetings,
>
> I have created/configured two ApacheDS V2 servers on one machine (Windows 07'), named
"ApacheDS_Server3" (the "master", port 30389), and "ApacheDS_Server4" (the "slave", port 40489).
(I configured these using instructions documented in "users@directory.apage.org" email thread
"How to create multiple instances of ApacheDS V2 on one machine".
>
> I start the two from a Cygwin command line prompt using the following command:
>
> java -jar apacheds-service-2.0.0-M3.jar instances/ApacheDS_Server3/
>
> (this is for the master, for the slave, an identical command with only the last character
is changed to "4")
>
> I can "Open Connection" in Apache Directory Studio on both servers, and they seem healthy.
On the master I have imported the following LDIF:
>
> 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
> -
>
>
> And on the slave, I have imported the following LDIF:
>
> 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: 30389
> 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:: secret
> ads-searchBaseDN: ou=system
>
>
> I can start/stop both servers and that seem to behave normally. When I stop the master,
it seems the slave IS "listening", as it throws the following exception:
>
> java.io.IOException: An existing connection was forcibly closed by the remote host.
>         at sun.nio.ch.SocketDispatcher.read0(Native Method)
>         at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:37)
>         at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:250)
>         at sun.nio.ch.IOUtil.read(IOUtil.java:223)
>         at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:248)
>         at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:280)
>
>
> However, no data gets replicated from "ou=system". I have users in "ou=users", I have
an element in "ou=system" ("ou=MyDevices"), I have added a new user since replication was
"turned on", and none of this data gets propagated to the slave.
>
> I also changed the refresh interval to a shorter period (5000), as well as I had the
incorrect value for the port in the LDIF file, and changed it in Apache Directory Studio.
Making this change there should not be a problem, right?
>
> Is there anything obvious in my data (above), or in my methodology, that would prevent
data from being replicated?
>
did you restart the slave after changing the provider port? please
provide any logs if you have
> Thanks in advance for any help.
>
> Kindest regards,
> Steve
>



-- 
Kiran Ayyagari
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message