<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — LDAP Replication Fails]]></title>
		<link>http://www.iredmail.org/forum/topic4434-ldap-replication-fails.html</link>
		<atom:link href="http://www.iredmail.org/forum/feed-rss-topic4434.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in LDAP Replication Fails.]]></description>
		<lastBuildDate>Wed, 06 Feb 2013 17:22:52 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: LDAP Replication Fails]]></title>
			<link>http://www.iredmail.org/forum/post20222.html#p20222</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><div class="quotebox"><blockquote><p>credentials=&lt;Password for Manager&gt;</p></blockquote></div><p>It must be a plain password.</p></blockquote></div><p>Yes.&nbsp; In the above example I tried both, plain and hashed.&nbsp; Plain yields exactly the same error as the replicator user.&nbsp; Just for the sake of clarity, this is the slave log trying to connect to the master using the Manager account with the correct plain text password:</p><div class="codebox"><pre><code>do_syncrep2: rid=101 got search entry without Sync State control</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (tedcox)]]></author>
			<pubDate>Wed, 06 Feb 2013 17:22:52 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post20222.html#p20222</guid>
		</item>
		<item>
			<title><![CDATA[Re: LDAP Replication Fails]]></title>
			<link>http://www.iredmail.org/forum/post20210.html#p20210</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>credentials=&lt;Password for Manager&gt;</p></blockquote></div><p>It must be a plain password.</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Wed, 06 Feb 2013 14:09:16 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post20210.html#p20210</guid>
		</item>
		<item>
			<title><![CDATA[Re: LDAP Replication Fails]]></title>
			<link>http://www.iredmail.org/forum/post20200.html#p20200</link>
			<description><![CDATA[<p>Sorry.&nbsp; I was in a hurry yesterday, and wasn&#039;t very clear. </p><p>I have made *NO* changes to slapd.conf on the master (or any changes to the master at all).</p><p>I edited slapd.conf on the consumer as follows:</p><div class="codebox"><pre><code>binddn=&quot;cn=Manager,dc=mydomain,dc=com&quot;
credentials=&lt;Password for Manager&gt;</code></pre></div><p>I restart the service and check the logs:</p><div class="codebox"><pre><code>Feb  5 18:54:00 ldap-slave slapd[15563]: =&gt;do_syncrep2 rid=101
Feb  5 18:54:00 ldap-slave slapd[15563]: do_syncrep2: rid=101 got search entry without Sync State control
Feb  5 18:54:00 ldap-slave slapd[15563]: connection_get(15)
Feb  5 18:54:00 ldap-slave slapd[15563]: connection_get(15): got connid=0
Feb  5 18:54:00 ldap-slave slapd[15563]: daemon: removing 15
Feb  5 18:54:00 ldap-slave slapd[15563]: daemon: activity on 1 descriptor
Feb  5 18:54:00 ldap-slave slapd[15563]: daemon: activity on:
Feb  5 18:54:00 ldap-slave slapd[15563]: 
Feb  5 18:54:00 ldap-slave slapd[15563]: daemon: epoll: listen=7 active_threads=0 tvp=zero
Feb  5 18:54:00 ldap-slave slapd[15563]: daemon: epoll: listen=8 active_threads=0 tvp=zero
Feb  5 18:54:00 ldap-slave slapd[15563]: daemon: epoll: listen=9 active_threads=0 tvp=zero
Feb  5 18:54:00 ldap-slave slapd[15563]: daemon: epoll: listen=10 active_threads=0 tvp=zero
Feb  5 18:54:00 ldap-slave slapd[15563]: daemon: epoll: listen=11 active_threads=0 tvp=zero
Feb  5 18:54:00 ldap-slave slapd[15563]: daemon: activity on 1 descriptor
Feb  5 18:54:00 ldap-slave slapd[15563]: daemon: activity on:
Feb  5 18:54:00 ldap-slave slapd[15563]: 
Feb  5 18:54:00 ldap-slave slapd[15563]: daemon: epoll: listen=7 active_threads=0 tvp=zero
Feb  5 18:54:00 ldap-slave slapd[15563]: daemon: epoll: listen=8 active_threads=0 tvp=zero
Feb  5 18:54:00 ldap-slave slapd[15563]: do_syncrepl: rid=101 rc -1 retrying (4 retries left)</code></pre></div><p>I thought, perhaps, I was mistaken about how the password should be handled, and it was an authentication problem.&nbsp; So as an experiment, I copied and pasted the hashed LDAP root password from higher up in the slapd.conf.&nbsp; However, that yields an actual connection failure:</p><div class="codebox"><pre><code>Feb  5 18:48:53 ldap-slave slapd[15401]: =&gt;do_syncrepl rid=101
Feb  5 18:48:53 ldap-slave slapd[15401]: daemon: epoll: listen=10 active_threads=0 tvp=zero
Feb  5 18:48:53 ldap-slave slapd[15401]: daemon: epoll: listen=11 active_threads=0 tvp=zero
Feb  5 18:48:54 ldap-slave slapd[15401]: slap_client_connect: URI=ldaps://mail2.mydomain.com DN=&quot;cn=manager,dc=mydomain,dc=com&quot; ldap_sasl_bind_s failed (49)
Feb  5 18:48:54 ldap-slave slapd[15401]: do_syncrepl: rid=101 rc 49 retrying</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (tedcox)]]></author>
			<pubDate>Wed, 06 Feb 2013 01:58:38 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post20200.html#p20200</guid>
		</item>
		<item>
			<title><![CDATA[Re: LDAP Replication Fails]]></title>
			<link>http://www.iredmail.org/forum/post20190.html#p20190</link>
			<description><![CDATA[<p>- What do you mean cn=Manager fail identically to cn=replicator? You don&#039;t need to update ACL in slapd.conf while using cn=Manager, because it has all permissions.<br />- Make sure you have correct bind dn (cn=Manager) and password in replication setting first.</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Tue, 05 Feb 2013 04:58:12 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post20190.html#p20190</guid>
		</item>
		<item>
			<title><![CDATA[Re: LDAP Replication Fails]]></title>
			<link>http://www.iredmail.org/forum/post20186.html#p20186</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>Looks like caused by incorrect ACL setting (permission).<br />Why not use &quot;cn=Manager,dc=mydomain,dc=com&quot; for testing first? So that you can make sure all replication settings are correct, then tune the ACL to make it work with &quot;cn=replicator,dc=mydomain,dc=com&quot; (or use cn=Manager directly).</p></blockquote></div><p>Great suggestion.&nbsp; Sadly, both cn=Manager and cn=vmail fail identically to cn=replicator.&nbsp; I did try using a hashed password (instead of plain text) for Manager in addition to trying plain text, and that yielded a sasl_bind failure.&nbsp; So I know it&#039;s connecting correctly (since I don&#039;t get the bind failure using the plain text passwords).&nbsp; Other suggestions?</p>]]></description>
			<author><![CDATA[null@example.com (tedcox)]]></author>
			<pubDate>Tue, 05 Feb 2013 01:53:09 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post20186.html#p20186</guid>
		</item>
		<item>
			<title><![CDATA[Re: LDAP Replication Fails]]></title>
			<link>http://www.iredmail.org/forum/post20175.html#p20175</link>
			<description><![CDATA[<p>Looks like caused by incorrect ACL setting (permission).<br />Why not use &quot;cn=Manager,dc=mydomain,dc=com&quot; for testing first? So that you can make sure all replication settings are correct, then tune the ACL to make it work with &quot;cn=replicator,dc=mydomain,dc=com&quot; (or use cn=Manager directly).</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 04 Feb 2013 15:37:52 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post20175.html#p20175</guid>
		</item>
		<item>
			<title><![CDATA[LDAP Replication Fails]]></title>
			<link>http://www.iredmail.org/forum/post20156.html#p20156</link>
			<description><![CDATA[<p>==== Required information ====<br />- iRedMail version: 0.8.3<br />- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP<br />- Linux/BSD distribution name and version: CentOS 5.8 (master)/6.3 (slave)<br />- Related log if you&#039;re reporting an issue: <br />==== </p><p>Hello again,</p><p>Now that I have the new backup mail server running nicely, I&#039;m back to trying to get LDAP to replicate.&nbsp; I have searched exhaustively through the OpenLDAP docs, and what can be found online about making LDAP replicate on various distributions, and sadly it looks like there are a lot of variables at work.&nbsp; However, I think I&#039;m very close!&nbsp; I have the machines talking to one another, I just can&#039;t get them to actually sync.</p><p>The master is a CentOS 5.8 i686 machine upgraded from iRedMail 0.7.0 to 0.8.3, the slave is a CentOS 6.3 x64 machine running a clean install of iRedMail 0.8.3.&nbsp; I&#039;m sure I&#039;m just missing something simple here.&nbsp; Thanks for the help!</p><p>Ted</p><p>The error message is:</p><div class="codebox"><pre><code>do_syncrep2: rid=101 got search entry without Sync State control</code></pre></div><p>I know the systems can talk to one another.&nbsp; From the slave I can issue:</p><div class="codebox"><pre><code># ldapsearch -H ldaps://ldap-master.mydomain.com  -x -D cn=replicator,dc=mydomain,dc=com -W 
Enter LDAP Password: 
# extended LDIF
#
# LDAPv3
# base &lt;dc=mydomain,dc=com&gt; (default) with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# mydomain.com
dn: dc=mydomain,dc=com
objectClass: dcObject
objectClass: organization
dc: heroesinc
o: heroesinc

# domains, mydomain.com
dn: o=domains,dc=mydomain,dc=com
objectClass: organization
o: domains

# replicator, mydomain.com
dn: cn=replicator,dc=mydomain,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
objectClass: top
cn: replicator
description: LDAP replicator
userPassword:: &lt;HASH&gt;

# search result
search: 2
result: 0 Success

# numResponses: 4
# numEntries: 3</code></pre></div><p>Here are the important parts of the config files:</p><p>/etc/openldap/slapd.conf (master):</p><div class="codebox"><pre><code>...

# Allow users to change their own passwords and mail forwarding addresses.
access to attrs=&quot;userPassword,mailForwardingAddress&quot;
    by anonymous    auth
    by self         write
    by dn.exact=&quot;cn=vmail,dc=mydomain,dc=com&quot;   read
    by dn.exact=&quot;cn=vmailadmin,dc=mydomain,dc=com&quot;  write
    by dn.base=&quot;cn=replicator,dc=mydomain,dc=com&quot; read
    by users        none
    by *            break

...

database    bdb
suffix      dc=mydomain,dc=com
checkpoint  128 5
directory   /var/lib/ldap/mydomain.com

rootdn      cn=Manager,dc=mydomain,dc=com
rootpw      &lt;PASSWORD HASH&gt;

sizelimit   1000
cachesize   1000

 ### for LDAP replication
 ###
 moduleload syncprov
 index entryCSN,entryUUID eq
 overlay syncprov
 syncprov-checkpoint 100 10
 syncprov-sessionlog 200

...</code></pre></div><p>/etc/openldap/slapd.conf (slave):</p><div class="codebox"><pre><code>database    bdb
suffix      dc=mydomain,dc=com
rootdn      dc=mydomain,dc=com
directory   /var/lib/ldap/mydomain.com
index       objectclass,entryCSN,entryUUID eq

rootdn      cn=Manager,dc=mydomain,dc=com
rootpw      &lt;PASSWORD HASH&gt;

sizelimit   10000
cachesize   10000

syncrepl rid=101
        provider=ldaps://ldap-master.mydomain.com
        type=RefreshandPersist
        interval=00:01:00:00
        retry=&quot;5 5 300 +&quot;
        searchbase=&quot;dc=mydomain,dc=com&quot;
        filter=&quot;(objectClass=*)&quot;
        scope=sub
        attrs=&quot;*,+&quot;
        bindmethod=simple
        tls_cacert=/etc/pki/tls/certs/ldap-master-iRedMail_CA.pem
        binddn=&quot;cn=replicator,dc=mydomain,dc=com&quot;
        credentials=&lt;PASSWORD&gt;</code></pre></div><p>Here are the logs.&nbsp; For simplicity, I&#039;ve deleted repeating messages.&nbsp; They all repeat six times before the next message appears.</p><p>/var/log/openldap.log (master debug -1):</p><div class="codebox"><pre><code>Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; acl_mask: access to entry &quot;mail=tcox@mydomain.com,ou=Aliases,domainName=mydomain.com,o=domains,dc=mydomain,dc=com&quot;, attr &quot;entry&quot; requested 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; acl_mask: to all values by &quot;cn=replicator,dc=mydomain,dc=com&quot;, (=0)  
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= check a_dn_pat: anonymous 
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= check a_dn_pat: self 
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= check a_dn_pat: cn=vmail,dc=mydomain,dc=com 
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= check a_dn_pat: cn=vmailadmin,dc=mydomain,dc=com 
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= check a_dn_pat: mail=[^,]+@$1,o=domainAdmins,dc=mydomain,dc=com$ 
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= check a_dn_pat: mail=[^,]+@$1,ou=Users,domainName=$1,o=domains,dc=mydomain,dc=com$ 
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= check a_dn_pat: users 
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= acl_mask: [7] applying none(=0) (stop) 
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= acl_mask: [7] mask: none(=0) 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; access_allowed: read access denied by none(=0) 
Feb  2 10:42:20 ldap-master slapd[1948]: send_search_entry: conn 10884 access to entry (mail=tcox@mydomain.com,ou=Aliases,domainName=mydomain.com,o=domains,dc=mydomain,dc=com) not allowed 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; access_allowed: search access to &quot;mail=aol@mydomain.com,ou=Aliases,domainName=mydomain.com,o=domains,dc=mydomain,dc=com&quot; &quot;objectClass&quot; requested 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; dnpat: [1] cn=[^,]+,mail=([^,]+)@([^,]+),ou=Users,domainName=([^,]+),o=domains,dc=mydomain,dc=com$ nsub: 3 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; acl_get: [4] attr objectClass 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; acl_mask: access to entry &quot;mail=aol@mydomain.com,ou=Aliases,domainName=mydomain.com,o=domains,dc=mydomain,dc=com&quot;, attr &quot;objectClass&quot; requested 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; acl_mask: to all values by &quot;cn=replicator,dc=mydomain,dc=com&quot;, (=0)  
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= check a_dn_pat: anonymous 
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= check a_dn_pat: self 
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= check a_dn_pat: cn=vmail,dc=mydomain,dc=com 
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= check a_dn_pat: cn=vmailadmin,dc=mydomain,dc=com 
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= check a_dn_pat: users 
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= acl_mask: [5] applying read(=rscxd) (stop) 
Feb  2 10:42:20 ldap-master slapd[1948]: &lt;= acl_mask: [5] mask: read(=rscxd) 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; access_allowed: search access granted by read(=rscxd) 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; access_allowed: read access to &quot;mail=aol@mydomain.com,ou=Aliases,domainName=mydomain.com,o=domains,dc=mydomain,dc=com&quot; &quot;entry&quot; requested 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; dnpat: [1] cn=[^,]+,mail=([^,]+)@([^,]+),ou=Users,domainName=([^,]+),o=domains,dc=mydomain,dc=com$ nsub: 3 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; dn: [7] cn=vmail,dc=mydomain,dc=com 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; dn: [8] cn=vmailadmin,dc=mydomain,dc=com 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; dnpat: [9] domainName=([^,]+),o=domains,dc=mydomain,dc=com$ nsub: 1 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; acl_get: [9] matched 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; acl_get: [9] attr entry 
Feb  2 10:42:20 ldap-master slapd[1948]: =&gt; match[0]: 33 85 
Feb  2 10:42:20 ldap-master slapd[1948]: d
Feb  2 10:42:20 ldap-master slapd[1948]: o
Feb  2 10:42:20 ldap-master slapd[1948]: m
Feb  2 10:42:20 ldap-master slapd[1948]: a
Feb  2 10:42:20 ldap-master slapd[1948]: i
Feb  2 10:42:20 ldap-master slapd[1948]: n
Feb  2 10:42:20 ldap-master slapd[1948]: N
Feb  2 10:42:20 ldap-master slapd[1948]: a
Feb  2 10:42:20 ldap-master slapd[1948]: m
Feb  2 10:42:20 ldap-master slapd[1948]: e
Feb  2 10:42:20 ldap-master slapd[1948]: =</code></pre></div><p>/var/log/openldap.log (slave debug -1):</p><div class="codebox"><pre><code>Feb  2 10:40:23 ldap-slave slapd[23547]: =&gt;do_syncrepl rid=101
Feb  2 10:40:23 ldap-slave slapd[23547]: daemon: epoll: listen=8 active_threads=0 tvp=zero
Feb  2 10:40:23 ldap-slave slapd[23547]: daemon: epoll: listen=9 active_threads=0 tvp=zero
Feb  2 10:40:23 ldap-slave slapd[23547]: daemon: epoll: listen=10 active_threads=0 tvp=zero
Feb  2 10:40:23 ldap-slave slapd[23547]: daemon: epoll: listen=11 active_threads=0 tvp=zero
Feb  2 10:40:24 ldap-slave slapd[23547]: =&gt;do_syncrep2 rid=101
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: added 22r listener=(nil)
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: activity on 1 descriptor
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: activity on:
Feb  2 10:40:24 ldap-slave slapd[23547]:
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: epoll: listen=7 active_threads=0 tvp=zero
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: epoll: listen=8 active_threads=0 tvp=zero
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: epoll: listen=9 active_threads=0 tvp=zero
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: epoll: listen=10 active_threads=0 tvp=zero
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: epoll: listen=11 active_threads=0 tvp=zero
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: activity on 1 descriptor
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: activity on:
Feb  2 10:40:24 ldap-slave slapd[23547]:  22r
Feb  2 10:40:24 ldap-slave slapd[23547]:
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: read active on 22
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: epoll: listen=7 active_threads=0 tvp=zero
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: epoll: listen=8 active_threads=0 tvp=zero
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: epoll: listen=9 active_threads=0 tvp=zero
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: epoll: listen=10 active_threads=0 tvp=zero
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: epoll: listen=11 active_threads=0 tvp=zero
Feb  2 10:40:24 ldap-slave slapd[23547]: connection_get(22)
Feb  2 10:40:24 ldap-slave slapd[23547]: connection_get(22): got connid=0
Feb  2 10:40:24 ldap-slave slapd[23547]: =&gt;do_syncrepl rid=101
Feb  2 10:40:24 ldap-slave slapd[23547]: =&gt;do_syncrep2 rid=101
Feb  2 10:40:24 ldap-slave slapd[23547]: do_syncrep2: rid=101 got search entry without Sync State control
Feb  2 10:40:24 ldap-slave slapd[23547]: connection_get(22)
Feb  2 10:40:24 ldap-slave slapd[23547]: connection_get(22): got connid=0
Feb  2 10:40:24 ldap-slave slapd[23547]: daemon: removing 22</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (tedcox)]]></author>
			<pubDate>Sat, 02 Feb 2013 18:13:38 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post20156.html#p20156</guid>
		</item>
	</channel>
</rss>
