So.....if a guy *was* going to add a zebra load line of "koha-start-zebra <instance>" to a cron job..... and try to get said job to run daily @ 7:55AM
Any suggestions of where/how/what to accomplish this ?? Is there an existing cron.daily (in the etc dir ?) that I should use.....or does Koha have it's own crontab/cron settings ? On Mon, Aug 22, 2016 at 9:19 AM, Mark Tompsett <[email protected]> wrote: > Greetings, > > If you were going to supplement your issues with a cron job, 6:00am > wouldn't > fix your problem for a whole day. Since logrotate runs at around 7:35AM, it > would make more sense to trigger something like around 7:55AM. Sure it's 20 > minutes of index-less-ness, but you can be assured it will be there. > > Trying to start zebra again with the appropriate scripts will not cause a > hiccup. Though, you'll want to redirect output to /dev/null, so you don't > get flooded with cronjob emails. > > GPML, > Mark Tompsett > > -----Original Message----- > From: Scott Owen > Sent: Monday, August 22, 2016 8:27 AM > To: koha > Subject: Re: [Koha] search quits working > > Hi all, > > I still seem to be having some issues with logrotate and the zebra service > starting up.... > > I have tried both of the options discussed in bug # > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16885 > > (modify postrotate, and modify koha-stop-zebra) > > In my case, neither (or both) of them seems to be a "reliable" fix. > > Is there any way I could kludge together some sort of CRON job to reload > the zerbra service daily ?? (at say 6:00AM) or would this be a bad thing to > do ..... ie: if zebra IS running, will trying to load it again cause a > major hiccup ?? > > any other ideas on this ?? With students returning soon, I'd really like to > get this off my "to-do" list. :-) > > Thanks, > > -S > > > > > > > > > > > > On Tue, Aug 9, 2016 at 11:45 AM, Scott Owen <[email protected]> wrote: > > > Still no joy on this. > > > > Zebra still seems to not reload correctly. > > > > my /usr/sbin/koha-stop-zebra file looks like the following: > > > > > > > > ------------------------------------------------------------ > > ---------------------------------------------------- > > #!/bin/sh > > # > > # koha-stop-zebra - Stop Zebra for named Koha instances > > # Copyright 2010 Catalyst IT, Ltd > > # > > # This program is free software: you can redistribute it and/or modify > > # it under the terms of the GNU General Public License as published by > > # the Free Software Foundation, either version 3 of the License, or > > # (at your option) any later version. > > # > > # This program is distributed in the hope that it will be useful, > > # but WITHOUT ANY WARRANTY; without even the implied warranty of > > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > # GNU General Public License for more details. > > # > > # You should have received a copy of the GNU General Public License > > # along with this program. If not, see <http://www.gnu.org/licenses/>. > > > > set -e > > > > # include helper functions > > if [ -f "/usr/share/koha/bin/koha-functions.sh" ]; then > > . "/usr/share/koha/bin/koha-functions.sh" > > else > > echo "Error: /usr/share/koha/bin/koha-functions.sh not present." > 1>&2 > > exit 1 > > fi > > > > stop_zebra_instance() > > { > > local instancename=$1 > > > > local PIDFILE="/var/run/koha/${instancename}/${instancename}- > > koha-zebra.pid" > > echo "Stopping Zebra server for $instancename" > > > > if start-stop-daemon --pidfile ${PIDFILE} --stop --quiet > > --retry=TERM/30/KILL/5; then > > return 0; > > else > > return 1; > > fi > > > > } > > > > usage() > > { > > local scriptname=$0 > > cat <<EOF > > Stops Zebra for Koha instances. > > > > Usage: $scriptname instancename1 instancename2... > > > > EOF > > } > > > > # Parse command line. > > #[ $# -ge 1 ] || ( usage ; die "Missing instance name..." ) > > > > # Loop through the instance names > > for name in "$@" > > do > > if is_instance $name ; then > > if is_zebra_running $name; then > > if ! stop_zebra_instance $name; then > > warn "Something went wrong stopping Zebra for $name." > > fi > > else > > warn "Zebra already stopped for instance $name." > > fi > > else > > warn "Unknown instance $name." > > fi > > done > > > > exit 0 > > ------------------------------------------------------------ > > ------------------------------------------------------ > > > > > > > > > > > > > > > > > > > > On Mon, Aug 8, 2016 at 8:58 AM, Scott Owen <[email protected]> wrote: > > > >> OK...I tried this, and it seems to have made no difference ? > >> > >> I'm rebooting the Koha server now, to make sure I have a clean > >> start....I'll try letting it sit for a day or two and see how it goes. > >> > >> (Maybe after I made the file changes the system needs a bounce ?) > >> > >> -S > >> > >> > >> On Sat, Aug 6, 2016 at 8:03 AM, Mark Tompsett <[email protected]> > >> wrote: > >> > >>> Greetings, > >>> > >>> And now for the off-list, WRONG way of doing it, because you don’t want > >>> to limp along. > >>> > >>> $ sudo cp /usr/sbin/koha-stop-zebra /usr/sbin/koha-stop-zebra.Help > >>> MeItMessedUp > >>> $ sudo nano /usr/sbin/koha-stop-zebra > >>> > >>> Now your goal is to make the stop_zebra_instance function look exactly > >>> like the patch lines. > >>> > >>> stop_zebra_instance() > >>> { > >>> local instancename=$1 > >>> > >>> local PIDFILE="/var/run/koha/${instancename}/${instancename}-koha- > >>> zebra.pid" > >>> echo "Stopping Zebra server for $instancename" > >>> if start-stop-daemon --pidfile ${PIDFILE} --stop --quiet > >>> --retry=TERM/30/KILL/5; then > >>> return 0; > >>> else > >>> return 1; > >>> fi > >>> } > >>> > >>> Sorry the message sent too early. Hope this helps. > >>> For the record, I’m physically in Toronto, Ontario, Canada, even though > >>> the company is in the Philippines. > >>> > >>> GPML, > >>> ------------------------------ > >>> [image: Tulong Aklatan logo] <http://www.tulongaklatan.ph> *Mark > >>> Tompsett* > >>> Co-founder & Chief Technical Officer > >>> [email protected] > >>> *Tamayao's Library Hosting Services* > >>> 3067 Tolentino St., Pinagkaisahan, Makati City, NCR, Fourth District > >>> www.tulongaklatan.ph > >>> > >> > >> > > > _______________________________________________ > Koha mailing list http://koha-community.org > [email protected] > https://lists.katipo.co.nz/mailman/listinfo/koha > > _______________________________________________ Koha mailing list http://koha-community.org [email protected] https://lists.katipo.co.nz/mailman/listinfo/koha

