openldap 2.4 复制mirror mode的问题
环境RHEL 6.3 X64
OPENLDAP 版本
lapd -V
@(#) $OpenLDAP: slapd 2.4.23 (May7 2012 13:59:20) $
两台服务器:10.x.x.710.x.x.8
目的是,这两台的LDAP 数据相互同步。
10.x.x.7 配置如下
root@IT-ldap1#cat /etc/openldap/slapd.conf
include /etc/openldap/schema/corba.schema
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/duaconf.schema
include /etc/openldap/schema/dyngroup.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/java.schema
include /etc/openldap/schema/misc.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/openldap.schema
include /etc/openldap/schema/ppolicy.schema
include /etc/openldap/schema/collective.schema
allow bind_v2
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
loglevel 256
logfile /var/log/slapd/ldap.log
TLSCACertificatePath /etc/openldap/certs
TLSCertificateFile "\"OpenLDAP Server\""
TLSCertificateKeyFile /etc/openldap/certs/password
database config
access to *
by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage
by * none
database monitor
access to attrs=userPassword
by self write
by anonymous auth
by dn.base="cn=Manager,dc=services,dc=eu" write
by * none
access to *
by * write
by * read
serverID 1
database bdb
suffix "dc=test,dc=eu"
checkpoint 1024 15
rootdn "cn=Manager,dc=test,dc=eu"
rootpw {SSHA}abJjc8Q3tt0+Qe7K01FUysrpNVRM8/qO
directory /var/lib/ldap
# Indices to maintain for this database
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
#overlay syncprov
syncrepl rid=001
provider=ldap://10.x.x.8:389
bindmethod=simple
binddn="cn=Manager,dc=test,dc=eu"
credentials="test"
searchbase="dc=test,dc=eu"
schemachecking=on
type=refreshAndPersist
retry="60 +"
mirrormode on
================================================================
10.x.x.8 配置如下
root@IT-ldap2#cat /etc/openldap/slapd.conf
include /etc/openldap/schema/corba.schema
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/duaconf.schema
include /etc/openldap/schema/dyngroup.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/java.schema
include /etc/openldap/schema/misc.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/openldap.schema
include /etc/openldap/schema/ppolicy.schema
include /etc/openldap/schema/collective.schema
allow bind_v2
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
loglevel 256
logfile /var/log/slapd/ldap.log
TLSCACertificatePath /etc/openldap/certs
TLSCertificateFile "\"OpenLDAP Server\""
TLSCertificateKeyFile /etc/openldap/certs/password
database config
access to *
by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage
by * none
database monitor
access to attrs=userPassword
by self write
by anonymous auth
by dn.base="cn=Manager,dc=services,dc=eu" write
by * none
access to *
by * write
by * read
serverID 1
database bdb
suffix "dc=test,dc=eu"
checkpoint 1024 15
rootdn "cn=Manager,dc=test,dc=eu"
rootpw {SSHA}abJjc8Q3tt0+Qe7K01FUysrpNVRM8/qO
directory /var/lib/ldap
# Indices to maintain for this database
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
#overlay syncprov
syncrepl rid=001
provider=ldap://10.x.x.7:389
bindmethod=simple
binddn="cn=Manager,dc=test,dc=eu"
credentials="test"
searchbase="dc=test,dc=eu"
schemachecking=on
type=refreshAndPersist
retry="60 +"
mirrormode on
=====================================================================
两边都报错如下:
do_syncrep2: rid=001 got search entry without Sync State control
do_syncrepl: rid=001 rc -1 retrying
conn=1095 fd=12 ACCEPT from IP=10.x.x.7:30808 (IP=0.0.0.0:389)
conn=1095 op=0 BIND dn="cn=manager,dc=zteservices,dc=eu" method=128
conn=1095 op=0 BIND dn="cn=manager,dc=zteservices,dc=eu" mech=SIMPLE ssf=0
conn=1095 op=0 RESULT tag=97 err=0 text=
conn=1095 op=1 SRCH base="dc=zteservices,dc=eu" scope=2 deref=0 filter="(objectClass=*)"
conn=1095 op=1 SRCH attr=* +
slap_global_control: unrecognized control: 1.3.6.1.4.1.4203.1.9.1.1
send_search_entry: conn 1095ber write failed.
conn=1095 fd=12 closed (connection lost on write)
do_syncrep2: rid=001 got search entry without Sync State control
do_syncrepl: rid=001 rc -1 retrying
Google 很久没有找到方法。
求大神帮忙看看啊。 配置明顯有問題,自己搜索我前幾天才發佈的openldap2.4 mirrorr模式。
2.4版本的你肯定找不到教材,我都找不到,你還想找,我自己把官方的英文片段看了不下5片以上。我不光把mirror最簡單模式給弄出來。連最複雜的N-WAY 多主+多從模式也已弄出來。
woxizishen 发表于 2013-11-01 07:43 static/image/common/back.gif
配置明顯有問題,自己搜索我前幾天才發佈的openldap2.4 mirrorr模式。
2.4版本的你肯定找不到教材,我都 ...
兄弟,麻烦你贴下 你那帖子的 链接 ??
还有,麻烦指导一下啊,这个配置哪里错了... 回复 3# P_sam
rootpw {SSHA}abJjc8Q3tt0+Qe7K01FUysrpNVRM8/qO
credentials="test"
這什麽???一個用哈希,一個用明文
?????????????????????????????????????????????????????????????
這2個請加上
type=refreshAndPersist 同步機制設定
overlay syncprov 後端工作在overlay模式下 標準多主模式架構和多主模式架構 woxizishen 发表于 2013-11-06 08:02 static/image/common/back.gif
回复 3# P_sam
1.使用“overlay syncprov ”启动进程的时候,报错:overlay "syncprov" not found
2.type=refreshAndPersist这个 添加了。
3.在没有使用 overlay syncprov 的情况下,密码都是使用的secret明文。报错还是一样的。
报错提示的是 写错误,报错如下:
conn=1052 fd=12 ACCEPT from IP=10.x.x.8:56680 (IP=0.0.0.0:389)
conn=1052 op=0 BIND dn="cn=manager1,dc=zteservices,dc=eu" method=128
conn=1052 op=0 BIND dn="cn=manager1,dc=zteservices,dc=eu" mech=SIMPLE ssf=0
conn=1052 op=0 RESULT tag=97 err=0 text=
conn=1052 op=1 SRCH base="dc=zteservices,dc=eu" scope=2 deref=0 filter="(objectClass=*)"
conn=1052 op=1 SRCH attr=* +
slap_global_control: unrecognized control: 1.3.6.1.4.1.4203.1.9.1.1
send_search_entry: conn 1052ber write failed.
conn=1052 fd=12 closed (connection lost on write)
connection_read(12): no connection!
connection_read(12): no connection! 回复 5# woxizishen
谢谢啊!!
问题搞定了!!
哈哈
把配置文件里面的这三行的注释去掉就可以使用syncprov了。
数据同步成功。
modulepath /usr/lib/openldap
modulepath /usr/lib64/openldap
moduleload syncprov.la
回复 7# P_sam
估計你應該不是按照官方檔案配置的,官方里沒有需要加入你上面那幾個選項,另外你互相同步的主機不用TLS來保證數據傳輸的安全性嗎?當然如果你的數據不重要到無所謂了。
另外tls并不好配置,是openldap2.4我個人認為最難配置的。官方講的都是一些參數作用,沒有具體告訴你配置方法。你可以試試。 你好~我想请问下你解决之后还是bindmethod用的simple,credentials用的是加密过的密文3Eg+gKegvZ73HYz5c2c5JA么?
我试验的 rootpw用的是密文,然后这样配置
bindmethod=simple
credentials=3Eg+gKegvZ73HYz5c2c5JA
就不能同步。
可不可以指点下用加密过的密码如何实现同步呢?
回复 7# P_sam
http://bbs.51cto.com/thread-1078277-1.html
这个是你总结的连接吧,你总结的挺好的,但怎么不全呢?是不是其他的在另外的文章中啊?
能否给个连接,非常感谢!
回复 4# woxizishen
页:
[1]