How to chage the ServerID in MMR setup.: Difference between revisions

(Created page with "=Object with that id already exists= <hr> {{KB|{{WIP}}|{{ZCS 8.8.15}}|{{ZCS 9.0.0}}}} <hr> __FORCETOC__ ====Problem==== In MMR setup both ldap not in sync due to ServerID ar...")
 
No edit summary
Line 1: Line 1:
=Object with that id already exists=  
=How to change the ServerID in MMR setup=  
<hr>
<hr>
{{KB|{{WIP}}|{{ZCS 8.8.15}}|{{ZCS 9.0.0}}}}
{{KB|{{WIP}}|{{ZCS 8.8.15}}|{{ZCS 9.0.0}}}}
Line 6: Line 6:
====Problem====
====Problem====
In MMR setup both ldap not in sync due to ServerID are same for the both servers.
In MMR setup both ldap not in sync due to ServerID are same for the both servers.
 
[zimbra@ldap2 ~]$ /opt/zimbra/libexec/zmreplchk
 
Master: ldap://master2.domain.com:389 ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31 CSNs:
:<pre>[zimbra@ldap2 ~]$ /opt/zimbra/libexec/zmreplchk
20221013134129.954789Z#000000#001#000000
Master: ldap://master2.domain.com:389 ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31 CSNs:
Master: ldap://master1.domain.com:389ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31 CSNs:
20221013134129.954789Z#000000#001#000000
20200909225502.112266Z#000000#002#000000
Master: ldap://master1.domain.com:389ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31 CSNs:
[zimbra@ldap1 ~]$ /opt/zimbra/libexec/zmreplchk
20200909225502.112266Z#000000#002#000000
Master: ldap://master1.domain.com:389  ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31s behind CSNs:
 
20221013134129.954789Z#000000#001#000000
[zimbra@ldap1 ~]$ /opt/zimbra/libexec/zmreplchk
Master: ldap://master2.domain.com:389 ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31s behind CSNs:
Master: ldap://master1.domain.com:389  ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31s behind CSNs:
20200909225502.112266Z#000000#002#000000
20221013134129.954789Z#000000#001#000000
Master: ldap://master2.domain.com:389 ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31s behind CSNs:
20200909225502.112266Z#000000#002#000000;<pre>


====Solution====
====Solution====
Line 25: Line 22:
'''Step 1:'''
'''Step 1:'''
Take the backup of main database and configuration database manually from LDAP1.  
Take the backup of main database and configuration database manually from LDAP1.  
:<pre>/opt/zimbra/libexec/zmslapcat /tmp
/opt/zimbra/libexec/zmslapcat /tmp
/opt/zimbra/libexec/zmslapcat -c /tmp;<pre>
/opt/zimbra/libexec/zmslapcat -c /tmp


'''Step 2:'''
'''Step 2:'''
Line 33: Line 30:
'''Step 3:'''
'''Step 3:'''
Reimport the configuration database and main database on LDAP1 server.
Reimport the configuration database and main database on LDAP1 server.
:<pre>cd /opt/zimbra/data/ldap
cd /opt/zimbra/data/ldap
mv mdb mdb.old
mv mdb mdb.old
mv config config.bak
mv config config.bak
mkdir -p mdb/db  
mkdir -p mdb/db  
mkdir config   
mkdir config   
/opt/zimbra/libexec/zmslapadd -c /tmp/ldap-config.bak
/opt/zimbra/libexec/zmslapadd -c /tmp/ldap-config.bak
/opt/zimbra/libexec/zmslapadd /tmp/ldap.bak
/opt/zimbra/libexec/zmslapadd /tmp/ldap.bak
mv accesslog accesslog.old                #On both Master LDAP server
mv accesslog accesslog.old                #On both Master LDAP server
mkdir -p accesslog/db                    #On both Matesr LDAP server ;<pre>
mkdir -p accesslog/db                    #On both Matesr LDAP server  


'''Step 4:'''
'''Step 4:'''
Restart the services.
Restart the services.
:<pre>zmcontrol restart ;<pre>
zmcontrol restart


'''Step 5:'''
'''Step 5:'''
Now again check both ladp are in sync.
Now again check both ladps are in sync.


:<pre>[zimbra@ldap2 ~]$ /opt/zimbra/libexec/zmreplchk
[zimbra@ldap2 ~]$ /opt/zimbra/libexec/zmreplchk
Master: ldap://master1.domain.com:389 ServerID: 1 Code: 0 Status: In Sync CSNs:
Master: ldap://master1.domain.com:389 ServerID: 1 Code: 0 Status: In Sync CSNs:
20221013134129.954789Z#000000#001#000000
20221013134129.954789Z#000000#001#000000
20200909225502.112266Z#000000#002#000000
20200909225502.112266Z#000000#002#000000
Master: ldap://master2.domain.com:389 ServerID: 2 Code: 0 Status: In Sync CSNs:
Master: ldap://master2.domain.com:389 ServerID: 2 Code: 0 Status: In Sync CSNs:
20221013134129.954789Z#000000#001#000000
20221013134129.954789Z#000000#001#000000
20200909225502.112266Z#000000#002#000000
20200909225502.112266Z#000000#002#000000
 
[zimbra@ldap1 ~]$ /opt/zimbra/libexec/zmreplchk
[zimbra@ldap1 ~]$ /opt/zimbra/libexec/zmreplchk
Master: ldap://master1.domain.com:389 ServerID: 1 Code: 0 Status: In Sync CSNs:
Master: ldap://master1.domain.com:389 ServerID: 1 Code: 0 Status: In Sync CSNs:
20221013134129.954789Z#000000#001#000000
20221013134129.954789Z#000000#001#000000
20200909225502.112266Z#000000#002#000000
20200909225502.112266Z#000000#002#000000
Master: ldap://master2.domain.com:389 ServerID: 2 Code: 0 Status: In Sync CSNs:
Master: ldap://master2.domain.com:389 ServerID: 2 Code: 0 Status: In Sync CSNs:
20221013134129.954789Z#000000#001#000000
20221013134129.954789Z#000000#001#000000
20200909225502.112266Z#000000#002#000000
20200909225502.112266Z#000000#002#000000;<pre>


{{SubmittedBy|Aditya Shrivastava}}
{{SubmittedBy|Aditya Shrivastava}}
{{Article Footer|ZCS 8.8.15, ZCS 9.0.0|2022-06-08}}
{{Article Footer|ZCS 8.8.15, ZCS 9.0.0|2022-06-08}}

Revision as of 20:32, 16 October 2022

How to change the ServerID in MMR setup


   KB 24480        Last updated on 2022-10-16  




0.00
(0 votes)

Problem

In MMR setup both ldap not in sync due to ServerID are same for the both servers.

[zimbra@ldap2 ~]$ /opt/zimbra/libexec/zmreplchk
Master: ldap://master2.domain.com:389 ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31 CSNs:
20221013134129.954789Z#000000#001#000000
Master: ldap://master1.domain.com:389ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31 CSNs:
20200909225502.112266Z#000000#002#000000
[zimbra@ldap1 ~]$ /opt/zimbra/libexec/zmreplchk
Master: ldap://master1.domain.com:389  ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31s behind CSNs:
20221013134129.954789Z#000000#001#000000
Master: ldap://master2.domain.com:389 ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31s behind CSNs:
20200909225502.112266Z#000000#002#000000

Solution

Need to manually change the for parameter olcserverid and reimport the config.back file to make the id different.

Step 1: Take the backup of main database and configuration database manually from LDAP1.

/opt/zimbra/libexec/zmslapcat /tmp
/opt/zimbra/libexec/zmslapcat -c /tmp

Step 2: Make the change in "/opt/zimbra/data/ldap/config/cn=config.ldif" file, Set different ID (1) for the olcserverid parameter.

Step 3: Reimport the configuration database and main database on LDAP1 server.

cd /opt/zimbra/data/ldap
mv mdb mdb.old
mv config config.bak
mkdir -p mdb/db 
mkdir config  
/opt/zimbra/libexec/zmslapadd -c /tmp/ldap-config.bak
/opt/zimbra/libexec/zmslapadd /tmp/ldap.bak
mv accesslog accesslog.old                #On both Master LDAP server
mkdir -p accesslog/db                     #On both Matesr LDAP server 

Step 4: Restart the services.

zmcontrol restart

Step 5: Now again check both ladps are in sync.

[zimbra@ldap2 ~]$ /opt/zimbra/libexec/zmreplchk
Master: ldap://master1.domain.com:389 ServerID: 1 Code: 0 Status: In Sync CSNs:
20221013134129.954789Z#000000#001#000000
20200909225502.112266Z#000000#002#000000
Master: ldap://master2.domain.com:389 ServerID: 2 Code: 0 Status: In Sync CSNs:
20221013134129.954789Z#000000#001#000000
20200909225502.112266Z#000000#002#000000
[zimbra@ldap1 ~]$ /opt/zimbra/libexec/zmreplchk
Master: ldap://master1.domain.com:389 ServerID: 1 Code: 0 Status: In Sync CSNs:
20221013134129.954789Z#000000#001#000000
20200909225502.112266Z#000000#002#000000
Master: ldap://master2.domain.com:389 ServerID: 2 Code: 0 Status: In Sync CSNs:
20221013134129.954789Z#000000#001#000000
20200909225502.112266Z#000000#002#000000
Submitted by: Aditya Shrivastava
Verified Against: ZCS 8.8.15, ZCS 9.0.0 Date Created: 2022-06-08
Article ID: https://wiki.zimbra.com/index.php?title=How_to_chage_the_ServerID_in_MMR_setup. Date Modified: 2022-10-16



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Jump to: navigation, search