Bug 788140

Summary: cannot set repl referrals or state
Product: Red Hat Enterprise Linux 6 Reporter: Rich Megginson <rmeggins>
Component: 389-ds-baseAssignee: Rich Megginson <rmeggins>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: amsharma, ckannan, jgalipea, mkosek, mreynolds, nkinder
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.2.10.0-1.el6 Doc Type: Bug Fix
Doc Text:
Cause: Using replication, with suffixes that have a space in them (e.g. dc=example, dc=com instead of dc=example,dc=com). Consequence: Directory server error log fills up with errors like this: NSMMReplicationPlugin - repl_set_mtn_referrals: could not set referrals for replica dc=example,dc=com: 32 Fix: Correctly normalize the DN values used for the suffix so the server does not think they are missing (32). Result: Replication does not cause server error log to fill with bogus error messages.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 07:13:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 749275, 755094    

Description Rich Megginson 2012-02-07 15:15:05 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/277

Setting up replication leads to many errors like this:
[01/Feb/2012:20:56:00 -0700] NSMMReplicationPlugin - repl_set_mtn_referrals: could not set referrals for replica dc=example,dc=com: 32

Comment 3 Jenny Severance 2012-02-14 15:12:50 UTC
Please add steps to reproduce/verify this bug

Comment 4 Rich Megginson 2012-04-16 15:06:47 UTC
1) set up replication with 2 masters - for the replica root, use an unnormalized suffix i.e. use dc=example, dc=com instead of dc=example,dc=com
2) do some updates to either server - look for errors in the errors log like
[01/Feb/2012:20:56:00 -0700] NSMMReplicationPlugin - repl_set_mtn_referrals: could not set referrals for replica dc=example,dc=com: 32

Comment 7 Amita Sharma 2012-05-24 15:22:19 UTC
[root@dhcp201-194 slapd-dhcp201-1942]# grep -i replicaroot /etc/dirsrv/slapd-dhcp201-1942/dse.ldif
nsDS5ReplicaRoot: dc=example,dc=com
nsDS5ReplicaRoot: dc=example,dc=com

Comment 8 Rich Megginson 2012-05-24 16:00:06 UTC
(In reply to comment #7)
> [root@dhcp201-194 slapd-dhcp201-1942]# grep -i replicaroot
> /etc/dirsrv/slapd-dhcp201-1942/dse.ldif
> nsDS5ReplicaRoot: dc=example,dc=com
> nsDS5ReplicaRoot: dc=example,dc=com

Try this:
1) service dirsrv stop
2) edit the dse.ldif - change these to
nsDS5ReplicaRoot: dc=example, dc=com
nsDS5ReplicaRoot: dc=example, dc=com

That is, add a space after the comma

3) service dirsrv start

Comment 9 Rich Megginson 2012-05-24 23:12:26 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: Using replication, with suffixes that have a space in them (e.g. dc=example, dc=com instead of dc=example,dc=com).
Consequence: Directory server error log fills up with errors like this:
NSMMReplicationPlugin - repl_set_mtn_referrals: could not set referrals for replica dc=example,dc=com: 32
Fix: Correctly normalize the DN values used for the suffix so the server does not think they are missing (32).
Result: Replication does not cause server error log to fill with bogus error messages.

Comment 10 Amita Sharma 2012-05-25 07:49:08 UTC
[root@dhcp201-194 ~]# grep -i replicaroot /etc/dirsrv/slapd-dhcp201-1942/dse.ldif
nsDS5ReplicaRoot: dc=example,  dc=com
nsDS5ReplicaRoot: dc=example,  dc=com
[root@dhcp201-194 ~]# grep -i replicaroot /etc/dirsrv/slapd-dhcp201-1943/dse.ldif
nsDS5ReplicaRoot: dc=example,  dc=com
nsDS5ReplicaRoot: dc=example,  dc=com

[root@dhcp201-194 ~]# vim /etc/dirsrv/slapd-dhcp201-1942/dse.ldif
[root@dhcp201-194 ~]# vim /etc/dirsrv/slapd-dhcp201-1943/dse.ldif
[root@dhcp201-194 ~]# grep -i replicaroot /etc/dirsrv/slapd-dhcp201-1942/dse.ldif
nsDS5ReplicaRoot: dc=example,  dc=com
nsDS5ReplicaRoot: dc=example,  dc=com
[root@dhcp201-194 ~]# grep -i replicaroot /etc/dirsrv/slapd-dhcp201-1943/dse.ldif
nsDS5ReplicaRoot: dc=example,  dc=com
nsDS5ReplicaRoot: dc=example,  dc=com
[root@dhcp201-194 ~]# service dirsrv start
Starting dirsrv: 
    dhcp201-194...                                         [  OK  ]
    dhcp201-1942...                                        [  OK  ]
    dhcp201-1943...                                        [  OK  ]
    dhcp201-1944...                                        [  OK  ]
    ldap-localdomain1...                                   [  OK  ]
    ldap-localdomain2...                                   [  OK  ]
[root@dhcp201-194 ~]# tail -f /var/log/dirsrv/slapd-dhcp201-1943/errors
[25/May/2012:12:25:14 +051800] - slapd stopped.
[25/May/2012:12:31:39 +051800] - 389-Directory/1.2.10.2 B2012.144.1937 starting up
[25/May/2012:12:31:39 +051800] - slapd started.  Listening on All Interfaces port 2389 for LDAP requests
[25/May/2012:12:36:59 +051800] - slapd shutting down - signaling operation threads
[25/May/2012:12:36:59 +051800] - slapd shutting down - closing down internal subsystems and plugins
[25/May/2012:12:36:59 +051800] - Waiting for 4 database threads to stop
[25/May/2012:12:37:00 +051800] - All database threads now stopped
[25/May/2012:12:37:00 +051800] - slapd stopped.
[25/May/2012:12:42:35 +051800] - 389-Directory/1.2.10.2 B2012.144.1937 starting up
[25/May/2012:12:42:36 +051800] - slapd started.  Listening on All Interfaces port 2389 for LDAP requests
^C
[root@dhcp201-194 ~]# tail -f /var/log/dirsrv/slapd-dhcp201-1942/errors
[25/May/2012:12:25:12 +051800] - slapd stopped.
[25/May/2012:12:31:38 +051800] - 389-Directory/1.2.10.2 B2012.144.1937 starting up
[25/May/2012:12:31:38 +051800] - slapd started.  Listening on All Interfaces port 1389 for LDAP requests
[25/May/2012:12:36:57 +051800] - slapd shutting down - signaling operation threads
[25/May/2012:12:36:57 +051800] - slapd shutting down - closing down internal subsystems and plugins
[25/May/2012:12:36:58 +051800] - Waiting for 4 database threads to stop
[25/May/2012:12:36:58 +051800] - All database threads now stopped
[25/May/2012:12:36:58 +051800] - slapd stopped.
[25/May/2012:12:42:34 +051800] - 389-Directory/1.2.10.2 B2012.144.1937 starting up
[25/May/2012:12:42:34 +051800] - slapd started.  Listening on All Interfaces port 1389 for LDAP requests
^C
[root@dhcp201-194 ~]# grep -i replicaroot /etc/dirsrv/slapd-dhcp201-1943/dse.ldif
nsDS5ReplicaRoot: dc=example,dc=com
nsDS5ReplicaRoot: dc=example,dc=com


Not sure whats happening here..
After restart its again taking it as dc=example,dc=com..

Comment 11 Rich Megginson 2012-05-25 15:04:22 UTC
Right.  The directory server will normalize the DNs.

Comment 12 Amita Sharma 2012-05-25 15:32:48 UTC
So I shd mark the bug as VERIFIED?
Still can't see the error mentioned in comment#4.

Comment 13 Rich Megginson 2012-05-25 15:40:11 UTC
(In reply to comment #12)
> So I shd mark the bug as VERIFIED?
> Still can't see the error mentioned in comment#4.

I don't understand.  You are trying to verify that you _do not_ see those errors any more.  The server was fixed to _not_ log those errors, and to handle replica root DN normalization correctly.  I guess that wasn't clear enough.

Comment 14 Amita Sharma 2012-05-25 16:32:01 UTC
Marking the bug as VERIFIED.

Comment 15 errata-xmlrpc 2012-06-20 07:13:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0813.html