replication sync_client dying cyrus-imap 2.3.0

Patrick Radtke phr2101 at columbia.edu
Tue Dec 20 13:04:03 EST 2005


Easiest way is

as the cyrus user run,
sync_client -r


We have an init.d script to start sync_client back up, and another  
perl script that connects to cyrus and makes a sync log file of all  
the accounts on the machine. We then feed the log file to sync_client  
to process.

Lastly, we have a sanity check script that compares user quota usage  
on the primary machine and the replica. This way we can easily spot  
any discrepancies and fix them.


I've attached the scripts in case anyone wants them as a starting  
pont (they contain some columbia specific stuff) and probably need  
some editing to work on your system.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: sync_client
Type: application/octet-stream
Size: 1169 bytes
Desc: not available
Url : https://lists.andrew.cmu.edu/mailman/private/info-cyrus/attachments/20051220/5ee5823b/sync_client.obj
-------------- next part --------------


List mailboxes is loosely based on the imapcreate.pl script
-------------- next part --------------
A non-text attachment was scrubbed...
Name: listmailboxes.pl
Type: text/x-perl-script
Size: 2264 bytes
Desc: not available
Url : https://lists.andrew.cmu.edu/mailman/private/info-cyrus/attachments/20051220/5ee5823b/listmailboxes.bin
-------------- next part --------------



Cyrus_sync_check ssh's into our primary machines and into the  
replicas and calls 'cyr_quota'. It then diffs the output of the  
primary and the replica and pipes it to awk to make the output pretty.

It uses a columbia specific tool called 'ourhosts', and relies on the  
fact that our replica machines have the same name as the primaries  
but with a 2 stuck on the end.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cyrus_sync_check
Type: application/octet-stream
Size: 670 bytes
Desc: not available
Url : https://lists.andrew.cmu.edu/mailman/private/info-cyrus/attachments/20051220/5ee5823b/cyrus_sync_check.obj
-------------- next part --------------



-Patrick

On Dec 20, 2005, at 10:03 AM, Patrice wrote:

> ok, I understand better now,  thank you !
>
> what would be the best way to restart it ?
> stop/start cyrus   or  another command ?
>
> thanks
>
> Patrice
>
>
> Patrick H Radtke wrote:
>
>
>> If sync_client cannot contact the replica server (or if there is  
>> some other error that it can't recover from) then it 'bails out'  
>> and stops running.
>>
>> I guess the idea being that sync_client can't do aynthing until  
>> you fix the problem.
>>
>> We run monitoring software that lets us know if sync_client dies,  
>> and attempts to restart it for us.
>>
>>
>> -Patrick
>>
>>
>>
>>
>>
>>
>> On Tue, 20 Dec 2005, Patrice wrote:
>>
>>
>>> Hi,
>>>
>>> yesterday evening my replication was working on my test system.
>>> I unplugged network and came back today , plugged it again.
>>>
>>> I tried to send an email but this one wasn't replicated on the  
>>> replica. (I waited a few minutes and my sync_repeat_interval is 60)
>>>
>>> I made a "ps aux" and saw that the 2 processes sync_client where  
>>> not existing
>>> that was the cause of no replication.
>>>
>>> my authentication is made via saslauthd on another server on  
>>> openldap
>>>
>>>
>>> if authentication cannot be made, it seems that sync_client  die
>>>
>>> I launched by hand:
>>> su - cyrus -c "/cyrus-imap/bin/sync_client -r"
>>> --> sync ok
>>> and now  2 processes sync_client now are running.
>>>
>>> here is my config for replication:
>>>
>>> sync_host: 192.168.1.2
>>> sync_authname: cyrus
>>> sync_password: xxxxxxxxxx
>>> sync_machineid: 1
>>> sync_log: yes
>>> sync_repeat_interval: 60
>>>
>>>
>>>
>>> and ideas about this behavior ?
>>>
>>> thanks in advance
>>>
>>> Patrice
>>>
>>>
>>>
>>>
>>> ----
>>> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
>>> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
>>> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>>>
>>>
>>>
>>
>>
>>
>
>
>
>



More information about the Info-cyrus mailing list