[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Replication problems.
I am running OpenLDAP 2.0.7 on linux (compiled from source), and finding that
replication doesn't work. I have also tried this with 2.0.6 obtained from the
linux-mandrake cooker. Never tried it with 1.2.x.
I am running two slapds one on port 3890 ( master ) and one on port 3891
(slave) on the same host.
( with secrets replaced with < name > )
in slapd.conf.3890 (master) ( symbolicly linked from slapd.conf ):
< schema includes >
replica host=127.0.0.1:3891 binddn="<bind address> " bindmethod=simplec
redentials=<a secret password>
replogfile /var/log/slapd.replica
in slapd.conf.3891 (slave):
< schema includes >
updatedn "dn=admin,dc=viator,dc=com"
updateref "ldap://127.0.0.1:3890"
< rootdn the same as slapd.conf.3890 >
I then startup the master and slave
/usr/sbin/slapd -h ldap://127.0.0.1:3890 -f /etc/openldap/slapd.conf.3890
/usr/sbin/slapd -h ldap://127.0.0.1:3891 -f /etc/openldap/slapd.conf.3891
Then from running
"slurpd -d 255 -f /etc/openldap/slapd.conf.3890"
I am seeing :
Config: opening config file "/etc/openldap/slapd.conf.3890"
Config: (schemacheck off)
Config: (include /etc/openldap/schema/core.schema)
Config: (include /etc/openldap/schema/viator.schema)
Config: (replica host=127.0.0.1:3891 binddn="<bind address>"
bindmethod=simple credentials=<a secret password>)
Config: ** successfully added replica "127.0.0.1:3891"
Config: (replogfile /var/log/slapd.replica)
Config: (pidfile /var/slapd.pid)
Config: (argsfile /var/slapd.args)
Config: (database ldbm)
Config: (suffix "dc=viator,dc=com")
Config: (rootdn "<bind address>")
Config: (rootpw <a secret password>)
Config: (directory /var/lib/ldap)
Config: ** configuration file successfully read and parsed
begin replication thread for 127.0.0.1:3891
Replica 127.0.0.1:3891, skip repl record for propertyName=host,
propertySet=connectionsource, application=etravel, instance=default,
dc=viator,dc=com (not mine)
It is saying that it added replica ( which is the correct address), but when
adding some debug statements, in servers/slurpd/ri.c, I find that the
re->re_replicas is NULL. How can this be so?
This is my modified ismine function:
static int
ismine(
Ri *ri,
Re *re
)
{
Rh *rh;
int i;
if(1) return 1;
Debug(LDAP_DEBUG_ANY,"rc.c:206, ismine\n",0,0,0);
if ( ri == NULL || re == NULL || ri->ri_hostname == NULL ||
re->re_replicas == NULL ) {
if (ri == NULL)
Debug(LDAP_DEBUG_ANY,"ri == NULL\n",0,0,0);
if (re == NULL)
Debug(LDAP_DEBUG_ANY,"re == NULL\n",0,0,0);
if (ri->ri_hostname == NULL)
Debug(LDAP_DEBUG_ANY,"ri->ri_hostname == NULL\n",0,0,0);
if (re->re_replicas == NULL)
// THIS LINE IS PRINTED OUT
Debug(LDAP_DEBUG_ANY,"re->re_replicas == NULL\n",0,0,0);
return 0;
}
Debug(LDAP_DEBUG_ANY,"rc.c:211, cmp : %s,%d\n",
ri->ri_hostname,ri->ri_port,0);
rh = re->re_replicas;
for ( i = 0; rh[ i ].rh_hostname != NULL; i++ ) {
Debug(LDAP_DEBUG_ANY,"rc.c:214, host: %s:%d\n",rh[ i
].rh_hostname,rh[ i].rh_port,0);
if ( !strcmp( rh[ i ].rh_hostname, ri->ri_hostname) &&
rh[ i ].rh_port == ri->ri_port ) {
return 1;
}
}
return 0;
}
Any help would be appreciated,
Chris Burnley