[Koha-bugs] [Bug 17717] process_message_queue.pl: Can't locate Authen/CAS/Client/ Response/Failure.pm
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed May 31 16:13:19 CEST 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17717
Tomás Cohen Arazi <tomascohen at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WORKSFORME
Status|Signed Off |RESOLVED
--- Comment #39 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Ok, I managed to reproduce the conditions that trigger the bug.
GOOD NEWS: It is fixed in master, 16.11 and 16.05 already, as a side effect
from bug 16733.
The problem was in koha-foreach code, that is not using koha-shell but crafting
its own env instead. To reproduce the problem, as a root user run:
root$ echo $PERL5LIB
<empty>
root$ . /usr/share/koha/bin/koha-functions.sh
root$ adjust_paths_dev_install kohadev
root$ echo $PERL5LIB
/home/vagrant/kohaclone
So, if adjust_paths_dev_install is not ran, and the command is run by root,
PERL5LIB is empty, and perl uses the fallback for include (i.e. '.').
This are the conditions in which cron.d/koha-common runs
process_message_queue.pl. This happened in koha-foreach code, before bug 16733.
This is the relevant code in debian/scripts/koha-foreach:
for name in $(koha-list $listopts)
do
# Optionally use alternative paths for a dev install
adjust_paths_dev_install $name
cmd=`echo "$@" | sed -e s/__instancename__/${name}/g`
(
exec 3>&1
sudo -u "$name-koha" \
env PERL5LIB=$PERL5LIB \
KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \
${cmd} 2>&1 >&3 | sed -e "s/^/$name: /" >&2 3>&-
exec 3>&-
) | sed -e "s/^/$name: /"
done
So before the 16733 backport, PERL5LIB was incorrectly set. This script should
definitely run koha-shell -c "${cmd}" $name instead of crafting all the
environment variables.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list