如果之前有人问过这个问题,很抱歉,但是当我搜索类似的问题时,我得到了类似于这些的结果(这对我来说没有任何意义)。
我一直试图在两个完全更新的Rocky Linux8.6服务器上使用Red的Directory 11文档来设置389-ds。我的服务器是supplier1.example.com和supplier2.example.com,它们位于同一个子网上。我使用每个服务器的私有IP和主机名设置了每个服务器的/etc/host文件,并通过点击另一个服务器的IP和主机名来验证连接性。端口389和636对TCP开放。共享的后缀是"dc=example,dc=com“。
目录服务器实例是使用dscreate的交互模式创建的( TCP 389上的LDAP、TCP 636上的LDAPS、自签名证书等)。我怀疑问题就在于那些自我签署的证书和两个系统之间缺乏信任,但我甚至不知道如何开始纠正这一点。
谢谢你读这篇文章。
使用下面的示例命令,我能够创建复制协议.
服务器1:
sudo dsconf -D "cn=Directory Manager" ldap://supplier1.example.com replication \
enable --suffix="dc=example,dc=com" --role="supplier" --replica-id=2 \
--bind-dn="cn=replication manager,cn=config" --bind-passwd="password"
sudo dsconf -D "cn=Directory Manager" ldap://supplier1.example.com repl-agmt \
create --suffix="dc=example,dc=com" --host="supplier2.example.com" --port=389 \
--conn-protocol=LDAP --bind-dn="cn=replication manager,cn=config" \
--bind-passwd="password" --bind-method=SIMPLE --init \
example-agreement-supplier1-to-supplier2服务器2:
dsconf -D "cn=Directory Manager" ldap://supplier2.example.com replication \
enable --suffix="dc=example,dc=com" --role="supplier" --replica-id=1 \
--bind-dn="cn=replication manager,cn=config" --bind-passwd="password"
sudo dsconf -D "cn=Directory Manager" ldap://supplier2.example.com repl-agmt \
create --suffix="dc=example,dc=com" --host="supplier1.example.com" --port=389 \
--conn-protocol=LDAP --bind-dn="cn=replication manager,cn=config" \
--bind-passwd="password" --bind-method=SIMPLE --init \
example-agreement-supplier2-to-supplier1文档最初要求复制协议命令使用超过636的LDAPS,但是当我尝试时,复制总是失败的。这是一段跑步的节选
$ ldapsearch -x -b "cn=mapping tree,cn=config" -D "cn=Directory Manager" -w password objectClass=nsDS5ReplicationAgreement -LL
...
nsds5replicaLastUpdateStatus: Error (-2) Problem connecting to replica - LDAP error: Local error (connection error)
nsds5replicaLastUpdateStatusJSON: {"state": "red", "ldap_rc": "-2", "ldap_rc_text": "Local error", "repl_rc": "16", "repl_rc_text": "connection error", "date": "2022-05-26T21:58:31Z", "message": "Error (-2) Problem connecting to replica - LDAP error: Local error (connection error)"}
nsds5replicaUpdateInProgress: FALSE
nsds5replicaLastInitStart: 20220526212655Z
nsds5replicaLastInitEnd: 19700101000000Z
nsds5replicaLastInitStatus: Error (-2) - LDAP error: Local error - no response received
nsds5replicaLastInitStatusJSON: {"state": "red", "ldap_rc": "-2", "ldap_rc_text": "Local error", "repl_rc": "255", "repl_rc_text": "no response received", "conn_rc": "0", "conn_rc_text": "operation success", "date": "2022-05-26T21:27:10Z", "message": "Error (-2) - LDAP error: Local error - no response received"}发布于 2022-10-07 15:29:54
通过在389-ds之外生成新的自签名证书,并使用以下命令在每个服务器上导入这些证书,我可以在LDAPS上进行复制:
dsconf -D "cn=Directory Manager" ldap://host.domain.com security certificate add --file host_domain.com.crt --name "Server-Cert" --primary-cert。
随后重新启动实例解决了这个问题。
注:除了389-ds之外,我很少有经验,所以可能有更好的方法来做到这一点。
https://serverfault.com/questions/1101887
复制相似问题