[Zope] Unstable Zope when started at boot time Linux.....centinel solutions not very acceptable very acceptable

Felipe E. Barousse fbarousse@piensa.com
Sun, 14 May 2000 20:08:37 -0500


This is a multi-part message in MIME format.
--------------6677794067EC999F14541AAD
Content-Type: multipart/alternative;
 boundary="------------724AFEBB8902E7CDBAF62459"


--------------724AFEBB8902E7CDBAF62459
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


I do believe this approach will work to restart crashed Zope but,  I
would expect Zope to work correctly and be very stable when it is
started from one of the rc startup scripts.

Well, at least it is a way to keep the system kind of working with
"minimal" downtime.......

My original idea was to put the start script as an inittab entry.   Also
I got a respone referencing some other utilities to keep Zope "alive"
(i.e. restart it if crashed)

Maybe any of the Zope developers people can give us some illumination as
to know what may be happening with this phenomenom of crashing Zope if
started at boot time.

Kind regards.

Felipe Barousse


> From: Adam Karpierz
>                Date: Sun May 14, 2000 9:26pm
>                Subject: [Zope] Odp: [Zope] strategies for starting zope on redhat
>
>
>                >Hello
>                >
>                >A friend reports he cannot start zope automatically at boot on his new
>                Linux
>                >RedHat installation, but that it works fine when he does it manually from
>                >shell prompt.
>                >
>                >Q1. Does anyone have any similar experience or advice about self-starting
>                >zope?
>                >
>                >Q2. Does anyone have a nice approach to make sure Zope re-starts if it
>                >shutdown remotely for whatever reason?
>                >
>                >I am sorry I do not have more precise details of his problem..
>                >
>                >tia
>                >- Jason
>
>
>                Maybe following way will be helpful for you and others ?.
>
>                You need place .zope_autostart script (attached below) in your home
>                directory
>                (don't forget make this as exetutable :).
>                Also in your crontab file you need place a line (through command:
>                crontab -e)
>                like this:
>
>                0,minutes_between_checks * * * * /home/your_home/.zope_autostart  zope_dir
>                notify_email
>
>                eg:
>                0,30 * * * * /home/jasonic/.zope_autostart  /home/jasonic/Zope
>                jasonic@n...
>
>                For me, works well.
>
>                PS: I'am not good familiar with Linux (ang English lang too...) and you must
>                ask
>                       anyone else if you would have troubles with access to crontab,
>                       advanced Linux configurations etc...
>
>                Regards
>
>                Adam Karpierz
>                karpierz@i...
>
>
>                Filename .zope_autostart
>                ======beg code========
>                #! /bin/sh
>
>                ZOPEDIR="$1"
>                INFOMAIL="$2"
>
>                STARTFILE="$ZOPEDIR/start"
>                STOPFILE="$ZOPEDIR/stop"
>                PIDFILE="$ZOPEDIR/var/Z2.pid"
>                PID1ACTIVE=0
>                PID2ACTIVE=0
>                if [ -x $STARTFILE ]; then
>                  if [ -r $PIDFILE ]; then
>                    PID1=`cut -d" " -f1 $PIDFILE`
>                    PID2=`cut -d" " -f2 $PIDFILE`
>                    if
>                    ps -p $PID1 >/dev/null 2>&1
>                    then
>                      PID1ACTIVE=1
>                    fi
>                    if
>                    ps -p $PID2 >/dev/null 2>&1
>                    then
>                      PID2ACTIVE=1
>                    fi
>                  fi
>                  if [ $PID1ACTIVE -eq 0 -o $PID2ACTIVE -eq 0 ]; then
>                    $STOPFILE >/dev/null 2>&1
>                    sleep 10
>                    $STARTFILE
>                    date | mail -s"Zope restarted" $INFOMAIL >/dev/null 2>&1
>                  fi
>                fi
>                =======end code======
>

--------------724AFEBB8902E7CDBAF62459
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
&nbsp;
<br>I do believe this approach will work to restart crashed Zope but,&nbsp;
I would expect Zope to work correctly and be very stable when it is started
from one of the rc startup scripts.
<p>Well, at least it is a way to keep the system kind of working with "minimal"
downtime.......
<p>My original idea was to put the start script as an inittab entry.&nbsp;&nbsp;
Also I got a respone referencing some other utilities to keep Zope "alive"
(i.e. restart it if crashed)
<p>Maybe any of the Zope developers people can give us some illumination
as to know what may be happening with this phenomenom of crashing Zope
if started at boot time.
<p>Kind regards.
<p>Felipe Barousse
<br>&nbsp;
<blockquote TYPE=CITE>
<pre>From: Adam Karpierz&nbsp;&nbsp;<karpierz@i...>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Date: Sun May 14, 2000 9:26pm&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Subject: [Zope] Odp: [Zope] strategies for starting zope on redhat&nbsp;


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >Hello
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >A friend reports he cannot start zope automatically at boot on his new
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Linux
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >RedHat installation, but that it works fine when he does it manually from
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >shell prompt.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >Q1. Does anyone have any similar experience or advice about self-starting
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >zope?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >Q2. Does anyone have a nice approach to make sure Zope re-starts if it
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >shutdown remotely for whatever reason?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >I am sorry I do not have more precise details of his problem..
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >tia
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; >- Jason


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Maybe following way will be helpful for you and others ?.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; You need place .zope_autostart script (attached below) in your home
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; directory
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (don't forget make this as exetutable :).
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Also in your crontab file you need place a line (through command:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; crontab -e)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; like this:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,minutes_between_checks * * * * /home/your_home/.zope_autostart&nbsp; zope_dir
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; notify_email

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eg:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,30 * * * * /home/jasonic/.zope_autostart&nbsp; /home/jasonic/Zope
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jasonic@n...

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For me, works well.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PS: I'am not good familiar with Linux (ang English lang too...) and you must
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ask
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; anyone else if you would have troubles with access to crontab,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; advanced Linux configurations etc...

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Regards

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Adam Karpierz
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; karpierz@i...


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Filename .zope_autostart
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ======beg code========
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #! /bin/sh

&nbs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p; date | mail -s"Zope restarted" $INFOMAIL >/dev/null 2>&amp;1
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =======end code======</pre>
</blockquote>
</html>

--------------724AFEBB8902E7CDBAF62459--

--------------6677794067EC999F14541AAD
Content-Type: text/x-vcard; charset=us-ascii;
 name="fbarousse.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Felipe  E. Barousse
Content-Disposition: attachment;
 filename="fbarousse.vcf"

begin:vcard 
n:Barousse Boué;Felipe E.
tel;fax:+(52) 5247-0272
tel;work:+(52) 5247-0272
x-mozilla-html:FALSE
url:http://www.piensa.com/
org:Bufete Consultor de México (BCM);PIENSA.COM (Piensa Systems)
version:2.1
email;internet:fbarousse@piensa.com
title:CEO and Director General
adr;quoted-printable:;;Mailing address:=0D=0AAP CAP 336, Polanco=0D=0ACol. Anzures;Mexico City;D.F.;11550;Mexico
note;quoted-printable:Supercomputer clusters systems group=0D=0ATel./ Fax. +(52) 5247-0272
x-mozilla-cpt:;21824
fn:Felipe E. Barousse Boué 
end:vcard

--------------6677794067EC999F14541AAD--