Re: replication: sync_client on master stops after restarting the replica

2015-05-21 Thread Marcus Schopen
Am Donnerstag, den 16.10.2014, 14:57 +0200 schrieb Rudy Gevaert:
 On Tue, Oct 14, 2014 at 10:28:24PM +0200, Marcus Schopen wrote:
  
  Thanks, what a great idea.
  
  Is it this script?
  
  https://github.com/rgevaert/cyrus-ugent/blob/master/src/cyrus-synccheck
  
 
 Hi, yes it is, I forgot I shared it online :)
 
 Rudy

Checked monit rules today and forgot to post what I did last year. Here
is my monit rule on master:


check process sync_client matching /usr/lib/cyrus/bin/sync_client -r
every 2 cycles
   start program = /root/bin/start_cyrus_sync_client
   stop program = /usr/bin/killall sync_client
   if 5 restarts within 10 cycles then timeout


/root/bin/start_cyrus_sync_client:

#!/bin/bash

/bin/su - cyrus -c /usr/lib/cyrus/bin/sync_client -r


Ciao
Marcus



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: replication: sync_client on master stops after restarting the replica

2014-10-14 Thread Marcus Schopen
Hi Rudy,

Am Montag, den 13.10.2014, 10:41 +0200 schrieb Rudy Gevaert:
 
 
 On 09/27/14 10:59, Marcus Schopen wrote:
  Hi,
 
  always when I have to reboot the replica or its cyrus the
  synchronization on master side stops, /var/lib/cyrus/sync/log fills up
  and I don't see a /usr/lib/cyrus/bin/sync_client -r process anymore.
 
  /var/log/mail.err on master when restarting replica:
 
  Sep 27 10:06:28 master cyrus/sync_client[1023]: Error in do_sync():
  bailing out! Bad protocol
  Sep 27 10:06:28 master cyrus/sync_client[1023]: Processing sync log
  file /var/lib/cyrus/sync/log-1023 failed: Bad protocol
 
  When I restart cyrus on master side, synchronization starts again.
 
  Is there another way to get synchronization working again?
 
 I have added this in EVENTS { }
 
 synccheck cmd=/usr/share/cyrus-ugent/cyrus-synccheck -i mail1 -v 
 cyrus-2.4.17 period=10
 
 
 Where /usr/share/cyrus-ugent/cyrus-synccheck is a script that  checks if 
 sync_client is running.  If not, it start it

Thanks, what a great idea.

Is it this script?

https://github.com/rgevaert/cyrus-ugent/blob/master/src/cyrus-synccheck

Ciao!
Marcus



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: replication: sync_client on master stops after restarting the replica

2014-10-13 Thread Rudy Gevaert



On 09/27/14 10:59, Marcus Schopen wrote:
 Hi,

 always when I have to reboot the replica or its cyrus the
 synchronization on master side stops, /var/lib/cyrus/sync/log fills up
 and I don't see a /usr/lib/cyrus/bin/sync_client -r process anymore.

 /var/log/mail.err on master when restarting replica:

 Sep 27 10:06:28 master cyrus/sync_client[1023]: Error in do_sync():
 bailing out! Bad protocol
 Sep 27 10:06:28 master cyrus/sync_client[1023]: Processing sync log
 file /var/lib/cyrus/sync/log-1023 failed: Bad protocol

 When I restart cyrus on master side, synchronization starts again.

 Is there another way to get synchronization working again?

I have added this in EVENTS { }

synccheck   cmd=/usr/share/cyrus-ugent/cyrus-synccheck -i mail1 -v 
cyrus-2.4.17 period=10


Where /usr/share/cyrus-ugent/cyrus-synccheck is a script that  checks if 
sync_client is running.  If not, it start it



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: replication: sync_client on master stops after restarting the replica

2014-10-10 Thread Marcus Schopen
Am Samstag, den 27.09.2014, 10:59 +0200 schrieb Marcus Schopen:
 Hi,
 
 always when I have to reboot the replica or its cyrus the
 synchronization on master side stops, /var/lib/cyrus/sync/log fills up
 and I don't see a /usr/lib/cyrus/bin/sync_client -r process anymore.
 
 /var/log/mail.err on master when restarting replica:
 
 Sep 27 10:06:28 master cyrus/sync_client[1023]: Error in do_sync():
 bailing out! Bad protocol
 Sep 27 10:06:28 master cyrus/sync_client[1023]: Processing sync log
 file /var/lib/cyrus/sync/log-1023 failed: Bad protocol
 
 When I restart cyrus on master side, synchronization starts again.
 
 Is there another way to get synchronization working again?

Andy ideas? For Backup reasons I'd like to stop and start cyrus on
replica side at night, which is a problem if synchronization stops on
master side and I have to restart cyrus on master to get synchronisation
working again. System is Ubuntu 12.04 LTS with cyrus 2.4.12.

Ciao!



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: replication: sync_client on master stops after restarting the replica

2014-10-10 Thread Patrick Boutilier

On 10/10/2014 09:09 AM, Marcus Schopen wrote:

Am Samstag, den 27.09.2014, 10:59 +0200 schrieb Marcus Schopen:

Hi,

always when I have to reboot the replica or its cyrus the
synchronization on master side stops, /var/lib/cyrus/sync/log fills up
and I don't see a /usr/lib/cyrus/bin/sync_client -r process anymore.

/var/log/mail.err on master when restarting replica:

Sep 27 10:06:28 master cyrus/sync_client[1023]: Error in do_sync():
bailing out! Bad protocol
Sep 27 10:06:28 master cyrus/sync_client[1023]: Processing sync log
file /var/lib/cyrus/sync/log-1023 failed: Bad protocol

When I restart cyrus on master side, synchronization starts again.

Is there another way to get synchronization working again?


Andy ideas? For Backup reasons I'd like to stop and start cyrus on
replica side at night, which is a problem if synchronization stops on
master side and I have to restart cyrus on master to get synchronisation
working again. System is Ubuntu 12.04 LTS with cyrus 2.4.12.



Should just have to start sync_client on master, not cyrus itself. That 
is what we do whenever the replica is rebooted/Cyrus stopped/etc..






Ciao!



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus



attachment: boutilpj.vcf
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: replication: sync_client on master stops after restarting the replica

2014-10-10 Thread Marcus Schopen
Hi Patrick,

Am Freitag, den 10.10.2014, 09:13 -0300 schrieb Patrick Boutilier:
 On 10/10/2014 09:09 AM, Marcus Schopen wrote:
  Am Samstag, den 27.09.2014, 10:59 +0200 schrieb Marcus Schopen:
  Hi,
 
  always when I have to reboot the replica or its cyrus the
  synchronization on master side stops, /var/lib/cyrus/sync/log fills up
  and I don't see a /usr/lib/cyrus/bin/sync_client -r process anymore.
 
  /var/log/mail.err on master when restarting replica:
 
  Sep 27 10:06:28 master cyrus/sync_client[1023]: Error in do_sync():
  bailing out! Bad protocol
  Sep 27 10:06:28 master cyrus/sync_client[1023]: Processing sync log
  file /var/lib/cyrus/sync/log-1023 failed: Bad protocol
 
  When I restart cyrus on master side, synchronization starts again.
 
  Is there another way to get synchronization working again?
 
  Andy ideas? For Backup reasons I'd like to stop and start cyrus on
  replica side at night, which is a problem if synchronization stops on
  master side and I have to restart cyrus on master to get synchronisation
  working again. System is Ubuntu 12.04 LTS with cyrus 2.4.12.
 
 
 Should just have to start sync_client on master, not cyrus itself. That 
 is what we do whenever the replica is rebooted/Cyrus stopped/etc..

Thanks for your answer. Okay, I understand. So this is not an unusual
behavior of my setup. When I check processes now I see a
/usr/lib/cyrus/bin/sync_client -r process running as user cyrus. So a
simple

  su - cyrus -c /usr/lib/cyrus/bin/sync_client -r

should start the sync again. Right?

May be monit could help. Otherwise the replica needs shell access via
ssh ... hmmm.

Ciao!



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: replication: sync_client on master stops after restarting the replica

2014-10-10 Thread Patrick Boutilier

On 10/10/2014 09:31 AM, Marcus Schopen wrote:

Hi Patrick,

Am Freitag, den 10.10.2014, 09:13 -0300 schrieb Patrick Boutilier:

On 10/10/2014 09:09 AM, Marcus Schopen wrote:

Am Samstag, den 27.09.2014, 10:59 +0200 schrieb Marcus Schopen:

Hi,

always when I have to reboot the replica or its cyrus the
synchronization on master side stops, /var/lib/cyrus/sync/log fills up
and I don't see a /usr/lib/cyrus/bin/sync_client -r process anymore.

/var/log/mail.err on master when restarting replica:

Sep 27 10:06:28 master cyrus/sync_client[1023]: Error in do_sync():
bailing out! Bad protocol
Sep 27 10:06:28 master cyrus/sync_client[1023]: Processing sync log
file /var/lib/cyrus/sync/log-1023 failed: Bad protocol

When I restart cyrus on master side, synchronization starts again.

Is there another way to get synchronization working again?


Andy ideas? For Backup reasons I'd like to stop and start cyrus on
replica side at night, which is a problem if synchronization stops on
master side and I have to restart cyrus on master to get synchronisation
working again. System is Ubuntu 12.04 LTS with cyrus 2.4.12.



Should just have to start sync_client on master, not cyrus itself. That
is what we do whenever the replica is rebooted/Cyrus stopped/etc..


Thanks for your answer. Okay, I understand. So this is not an unusual
behavior of my setup. When I check processes now I see a
/usr/lib/cyrus/bin/sync_client -r process running as user cyrus. So a
simple

   su - cyrus -c /usr/lib/cyrus/bin/sync_client -r

should start the sync again. Right?



Correct.




May be monit could help. Otherwise the replica needs shell access via
ssh ... hmmm.



Yeah, ssh access with keys would be the easiest way for the replica to 
start sync_client on the master again when Cyrus is started back up on 
the replica. Assuming you are using a script.







Ciao!




attachment: boutilpj.vcf
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

replication: sync_client on master stops after restarting the replica

2014-09-27 Thread Marcus Schopen
Hi,

always when I have to reboot the replica or its cyrus the
synchronization on master side stops, /var/lib/cyrus/sync/log fills up
and I don't see a /usr/lib/cyrus/bin/sync_client -r process anymore.

/var/log/mail.err on master when restarting replica:

Sep 27 10:06:28 master cyrus/sync_client[1023]: Error in do_sync():
bailing out! Bad protocol
Sep 27 10:06:28 master cyrus/sync_client[1023]: Processing sync log
file /var/lib/cyrus/sync/log-1023 failed: Bad protocol

When I restart cyrus on master side, synchronization starts again.

Is there another way to get synchronization working again?

Ciao
Marcus



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus