El 22/08/16 a las 14:27, Scott Owen escribió:
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
I'm having problems with modified koha-stop-zebra too. I've added option --remove-pid-file too but without success. In my case, it seems there are a zebra shutdown at prerotate, and (strange) other in postrotate (or after finish logrotate for koha), maybe logrotate for apache?
(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 <sowen@edzone.net> 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 <sowen@edzone.net> 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 <mtompset@hotmail.com> 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 mark.tompsett@tulongaklatan.ph *Tamayao's Library Hosting Services* 3067 Tolentino St., Pinagkaisahan, Makati City, NCR, Fourth District www.tulongaklatan.ph
_______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha