免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5116 | 回复: 4
打印 上一主题 下一主题

[ldap] openldap主从同步问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-03-20 14:10 |只看该作者 |倒序浏览
我搭建了openldap主从服务器,单台各自都正常 查询,添加.删除等都正常. 很郁闷.谢谢

现在有问题是 主服务器数据不能和从服务器同步数据.启动./slurpd -d 64 报错如下:

Config: ** configuration file successfully read and parsed
Config: (pidfile         /usr/local/openldap/var/slapd.pid)
Config: (argsfile        /usr/local/openldap/var/slapd.args)
Config: (loglevel 256)
Config: (access to dn.base="" by * read)
Config: (access to dn.base="cn=Subschema" by * read)
Config: (access to *)
Config: (allow bind_v2)
Config: (database        bdb)
Config: (suffix          "o=dns"
Config: (rootdn          "uid=administrator,o=dns"
Config: (rootpw          rgdnscomcn)
Config: (directory       /usr/local/openldap/var/openldap-data)
Config: (replogfile      /usr/local/openldap/var/openldap-slurp/replica/slurpd.replog)
Config: (replica host=ldap://192.168.1.163:389        binddn="uid=administrator,o=dns"        bindmethod=simple        credentials=rgdnscomcn)
Config: ** successfully added replica "ldap:0"
Config: (index   objectClass     eq)
Config: (index   mail            eq)
Config: ** configuration file successfully read and parsed
Error: ldap_simple_bind_s for ldap:0 failed: Can't contact LDAP server
^CRetrying operation for DN mail=@mm.info,ou=domains,o=dns on replica ldap:0


主服务器slapd.conf配置如下:

# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.23.2.6 2003/02/26 15:17:50 kurt Exp $
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include         /usr/local/openldap/etc/openldap/schema/core.schema
include /usr/local/openldap/etc/openldap/schema/corba.schema
include /usr/local/openldap/etc/openldap/schema/cosine.schema
#include /usr/local/openldap/etc/openldap/schema/dyngroup.schema
include /usr/local/openldap/etc/openldap/schema/inetorgperson.schema
#include /usr/local/openldap/etc/openldap/schema/jmm.schema
#include /usr/local/openldap/etc/openldap/schema/mirapoint.schema
# Define global ACLs to disable default read access.

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral       ldap://root.openldap.org

pidfile         /usr/local/openldap/var/slapd.pid
argsfile        /usr/local/openldap/var/slapd.args

loglevel 256
# Load dynamic backend modules:
# modulepath    /usr/local/openldap/libexec/openldap
# moduleload    back_bdb.la
# moduleload    back_ldap.la
# moduleload    back_ldbm.la
# moduleload    back_passwd.la
# moduleload    back_shell.la

# Sample security restrictions
#
#   Disallow clear text exchange of passwords
# disallow bind_simple_unprotected
#
#       Require integrity protection (prevent hijacking)
#       Require 112-bit (3DES or better) encryption for updates
#       Require 63-bit encryption for simple bind
# security ssf=1 update_ssf=112 simple_bind=64
# Sample access control policy:

#       Root DSE: allow anyone to read it
#       Subschema (sub)entry DSE: allow anyone to read it
#       Other DSEs:
#               Allow self write access
#               Allow authenticated users read access
#               Allow anonymous users to authenticate
#       Directives needed to implement policy:
access to dn.base="" by * read
access to dn.base="cn=Subschema" by * read
access to *
#        by self write
        by * write
#       by users read
        by * read
#       by anonymous auth
        by * auth

# if no access controls are present, the default policy is:
#       Allow read by all
#
# rootdn can always write!

allow bind_v2

#######################################################################
# ldbm database definitions
#######################################################################

database        bdb
suffix          "o=dns"
rootdn          "uid=administrator,o=dns"
# Cleartext passwords, especially for the rootdn, should
# be avoid.  See slappasswd( and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw          123
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd/tools. Mode 700 recommended.
directory       /usr/local/openldap/var/openldap-data
#replace conf
replogfile      /usr/local/openldap/var/openldap-slurp/replica/slurpd.replog
replica host=ldap://192.168.1.163:389
        binddn="uid=administrator,o=dns"
        bindmethod=simple
        credentials=123

# Indices to maintain
index   objectClass     eq
index   mail            eq


从服务器slapd.conf配置
# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.23.2.6 2003/02/26 15:17:50 kurt Exp $
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include         /usr/local/openldap/etc/openldap/schema/core.schema
include /usr/local/openldap/etc/openldap/schema/corba.schema
include /usr/local/openldap/etc/openldap/schema/cosine.schema
#include /usr/local/openldap/etc/openldap/schema/dyngroup.schema
include /usr/local/openldap/etc/openldap/schema/inetorgperson.schema
#include /usr/local/openldap/etc/openldap/schema/jmm.schema
#include /usr/local/openldap/etc/openldap/schema/mirapoint.schema
# Define global ACLs to disable default read access.

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral       ldap://root.openldap.org

pidfile         /usr/local/openldap/var/slapd.pid
argsfile        /usr/local/openldap/var/slapd.args

loglevel 256
# Load dynamic backend modules:
# modulepath    /usr/local/openldap/libexec/openldap
# moduleload    back_bdb.la
# moduleload    back_ldap.la
# moduleload    back_ldbm.la
# moduleload    back_passwd.la
# moduleload    back_shell.la

# Sample security restrictions
#
#   Disallow clear text exchange of passwords
# disallow bind_simple_unprotected
#
#       Require integrity protection (prevent hijacking)
#       Require 112-bit (3DES or better) encryption for updates
#       Require 63-bit encryption for simple bind
# security ssf=1 update_ssf=112 simple_bind=64
# Sample access control policy:

#       Root DSE: allow anyone to read it
#       Subschema (sub)entry DSE: allow anyone to read it
#       Other DSEs:
#               Allow self write access
#               Allow authenticated users read access
#               Allow anonymous users to authenticate
#       Directives needed to implement policy:
access to dn.base="" by * read
access to dn.base="cn=Subschema" by * read
access to *
#        by self write
        by * write
#        by users read
        by * read
#        by anonymous auth
        by * auth

# if no access controls are present, the default policy is:
#       Allow read by all
#
# rootdn can always write!

allow bind_v2

#######################################################################
# ldbm database definitions
#######################################################################

database        bdb
suffix          "o=dns"
rootdn          "uid=administrator,o=dns"
# Cleartext passwords, especially for the rootdn, should
# be avoid.  See slappasswd( and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw          123
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd/tools. Mode 700 recommended.
directory       /usr/local/openldap/var/openldap-data
updatedn "uid=administrator,o=dns"
updateref ldap://192.168.1.3:389
#replace conf
#replogfile      /usr/local/openldap/var/openldap-slurp/replica/slurpd.replog
#replica host=ldap://192.168.1.163:389
#     binddn="uid=administrator,o=dns"
#     bindmethod=simple
#     credentials=123

# Indices to maintain
index   objectClass     eq
index   mail            eq

论坛徽章:
0
2 [报告]
发表于 2007-03-21 09:55 |只看该作者
我从主服务器可以查询从服务器的数据,为什么还报 这个错Error: ldap_simple_bind_s for ldap:0 failed: Can't contact LDAP server

用命令在主服务器可以查询从服务器数据结果如下

./ldapsearch -x -H ldap://192.168.1.163  -D "uid=administrator,o=dns" -b o=dns -w rgdnscomcn mail=@dudu.com
# extended LDIF
#
# LDAPv3
# base <o=dns> with scope sub
# filter: mail=@dudu.com
# requesting: ALL
#

# @dudu.com, domains, dns
dn: mail=@dudu.com,ou=domains,o=dns
objectClass: inetOrgPerson
cn: @dudu.com
mail: @dudu.com
sn: m-g5.dns.com.cn

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

论坛徽章:
0
3 [报告]
发表于 2007-03-21 15:54 |只看该作者
请参考下面这篇文章:http://www.chinaunix.net/jh/49/805302.html

论坛徽章:
0
4 [报告]
发表于 2007-03-26 18:19 |只看该作者
不行. 有那位大侠指点一下. 我用的系统是freebsd4.10


郁闷中 谢谢了

论坛徽章:
0
5 [报告]
发表于 2007-03-27 10:08 |只看该作者
大家帮帮忙啊. 怎么都围着看.没有人回贴呀. 版主指点一下吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP