[Koha] Problem with rebuild_zebra

Bob Ewart bob-ewart at bobsown.com
Sat May 21 00:59:38 NZST 2011


On 05/20/2011 06:04 AM, MJ Ray wrote:
> Bob Ewart wrote:
>> I'm getting:
>>> Subject: Cron<koha at windingcircle>  /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -a -z>/dev/null
>>>
>>> Can't call method "field" on an undefined value at /usr/share/koha/lib/C4/Biblio.pm line 359.
>>
>> every 10 minutes when the cron job is run.
>>
>> The index is not being updated.
>>
>> Any ideas as to how to fix this?
>
> Run it from the command line with -v too (I think that's the option -
> check on the output from "rebuild_zebra.pl -h" ).  It sounds like a
> broken MARC record that has slipped in somewhere :-(
>
> If it works from the command-line, it may be environment or
> permissions for cron need changing somehow, which would need you to
> post your current crontab.
>
> Good luck!

Thanks.

The -v option gave me:
> Zebra configuration information
> ================================
> Zebra biblio directory      = /var/lib/koha/zebradb/biblios
> Zebra authorities directory = /var/lib/koha/zebradb/authorities
> Koha directory              = /usr/share/koha/intranet/cgi-bin
> BIBLIONUMBER in :     999$c
> BIBLIOITEMNUMBER in : 999$d
> ================================
> ====================
> exporting authority
> ====================
>
> Records exported: 0
>
> Records exported: 0
> ====================
> REINDEXING zebra
> ====================
> ====================
> exporting biblio
> ====================
>
> Records exported: 0
> 1.......Can't call method "field" on an undefined value at /usr/share/koha/lib/C4/Biblio.pm line 359.

I did a 'rebuild_zebra.pl -a -b -r' from the command line (as the koha 
user) and it cleared the problem.

I'm wondering if deleting an item and biblio could have caused the 
problem.  I was cataloging a bunch of books and one slipped in that 
shouldn't have been.  I deleted it just before the problem started. I'm 
not sure whether rebuild_zebra ran between the time I added the book and 
when I deleted it.

I will have to try some experiments later today.

-- 
Bob



More information about the Koha mailing list