6.4. コマンドラインを使用した、ハブサーバーのコンシューマーに対するサプライヤーとしての設定
ハブを準備するには、以下を行う必要があります。
- コンシューマーへのレプリカ合意を作成します。
- コンシューマーを初期化します。
レプリケーショントポロジーのハブでこの手順を実行します。
前提条件
- ハブが初期化され、サプライヤーからハブへのレプリケーションが機能する。
-
ハブで
dc=example,dc=com
接尾辞のレプリケーションを有効にしている。
手順
レプリカ合意を追加し、コンシューマーを初期化します。
#
dsconf -D "cn=Directory Manager" ldap://hub.example.com repl-agmt create --suffix "dc=example,dc=com" --host "consumer.example.com" --port 389 --conn-protocol LDAP --bind-dn "cn=replication manager,cn=config" --bind-passwd "password" --bind-method SIMPLE --init example-agreement-hub-to-consumer
このコマンドは、
example-agreement-hub-to-consumer
という名前のレプリカ合意を作成します。レプリカ合意は、コンシューマーのホスト名、プロトコル、このコンシューマーへのデータの接続や複製時にサプライヤーが使用する認証情報などの設定を定義します。この合意の作成後、Directory Server は
consumer.example.com
を初期化します。複製するデータ量によっては、初期化に時間がかかる場合があります。
検証
初期化が成功したかどうかを確認します。
#
dsconf -D "cn=Directory Manager" ldap://hub.example.com repl-agmt init-status --suffix "dc=example,dc=com" example-agreement-hub-to-consumer
Agreement successfully initialized.レプリケーションのステータスを表示します。
#
dsconf -D "cn=Directory Manager" ldap://hub.example.com repl-agmt status --suffix "dc=example,dc=com" example-agreement-hub-to-consumer
Status For Agreement: "example-agreement-hub-to-consumer" (consumer.example.com:389) Replica Enabled: on Update In Progress: FALSE Last Update Start: 20210331131534Z Last Update End: 20210331131534Z Number Of Changes Sent: 0 Number Of Changes Skipped: None Last Update Status: Error (0) Replica acquired successfully: Incremental update succeeded Last Init Start: 20210331131530Z Last Init End: 20210331131533Z Last Init Status: Error (0) Total update succeeded Reap Active: 0 Replication Status: Not in Synchronization: supplier (Unknown) consumer (Unknown) State (green) Reason (error (0) replica acquired successfully: incremental update succeeded) Replication Lag Time: UnavailableReplication Status
フィールドおよびLast Update Status
フィールドを確認します。
トラブルシューティング
デフォルトでは、サーバー上のすべての合意に対するレプリケーションアイドルタイムアウトは 1 時間です。タイムアウトが原因で大規模なデータベースの初期化が失敗する場合は、
nsslapd-idletimeout
パラメーターをより高い値に設定します。たとえば、パラメーターを7200
(2 時間) に設定するには、次のコマンドを実行します。#
dsconf -D "cn=Directory Manager" ldap://hub .example.com config replace nsslapd-idletimeout=7200
無制限の期間を設定するには、
nsslapd-idletimeout
を0
に設定します。