[Koha] after upgrade koha from 3.22 to 19.05 zebra doesn't work in cron

George Mikuchadze gmikuchadze at gmail.com
Fri Oct 29 01:48:43 NZDT 2021


I've successfully upgraded koha from version 3.22.21 to version 19.05.17
(in ubuntu 18.04 server) using only the tarball file because v3.22.21 was
also installed from the tarball. I didn't use any koha repository during
its installation/upgrade and therefore I don't have any "koha-common"
service/package!.
The problem is in zebra, zebra indexer doesn't work in the crontab,
although cron works without any problem. I've koha-zebra-daemon service
(link to the "/usr/share/koha/bin/koha-zebra-ctl.sh" script), which also
works (as I think) because, when I run the command:
# service koha-zebra-daemon status
output is following:
-------------------------------------------------------------------------------------------------------
● koha-zebra-daemon.service - LSB: Zebra server daemon for Koha indexing
   Loaded: loaded (/etc/init.d/koha-zebra-daemon; generated)
   Active: active (running) since Thu 2021-10-28 13:51:55 +04; 2h 26min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 541 ExecStart=/etc/init.d/koha-zebra-daemon start (code=exited,
status=0/SUCCESS)
    Tasks: 2 (limit: 9488)
   CGroup: /system.slice/koha-zebra-daemon.service
           ├─584 daemon --name=koha-zebra-ctl.koha
--errlog=/var/log/koha/koha-zebradaemon.err
--stdout=/var/log/koha/koha-zebradaemon.log
           └─637 /usr/bin/zebrasrv -v none,fatal,warn -f
/etc/koha/koha-conf.xml

Oct 28 13:51:55 ubuntu systemd[1]: Starting LSB: Zebra server daemon for
Koha indexing...
Oct 28 13:51:55 ubuntu koha-zebra-daemon[541]: Starting Zebra Server
Oct 28 13:51:55 ubuntu systemd[1]: Started LSB: Zebra server daemon for
Koha indexing.
------------------------------------------------------------------------------------------------------

I have the following cronjobs:
---------------------------------------------------------------------------------------------------------------------------------------------------------
PERL5LIB=/usr/share/koha/lib
*/5 * * * * KOHA_CONF=/etc/koha/koha-conf.xml
/usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -a -z >/dev
---------------------------------------------------------------------------------------------------------------------------------------------------------
But after adding new biblioitems, they are not searchable.
On the other hand, if I run the command(which is in the cron) in the shell:
$ KOHA_CONF=/etc/koha/koha-conf.xml /usr/share/koha/bin/migration_tools/
rebuild_zebra.pl -b -a -z
the new biblioitems are appearing in the search results.
I have no ideas how to solve the problem. Can anybody help me?


More information about the Koha mailing list