Bug 12577 - Search is broken after upgrade from 3.14.7 to 3.16.1
Summary: Search is broken after upgrade from 3.14.7 to 3.16.1
Status: RESOLVED DUPLICATE of bug 12584
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: 3.16
Hardware: All All
: P5 - low major
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-15 10:53 UTC by Magnus Enger
Modified: 2015-05-25 11:07 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2014-07-15 10:53:14 UTC
I have a server running several Koha instances with marcflavour = 'normarc' off a standard package install. Last night I upgraded from 3.14.7 to 3.16.1 (changed the apt config from oldstable to squeeze). Now searching both in the public catalogue and the staff client fails with this message:

Error: Can't call method "raw" on an undefined value at /usr/share/koha/lib/C4/Search.pm line 494. 

In the log opac-error.log (not sure they are relevant):

[Tue Jul 15 12:45:47 2014] [error] [client 84.202.33.22] [Tue Jul 15 12:45:47 2014] opac-search.pl: Use of uninitialized value $error in concatenation (.) or string at /usr/share/koha/opac/cgi-bin/opac/opac-search.pl line 538., referer: http://esme.priv.bibkat.no/cgi-bin/koha/opac-search.pl?q=lessig
[Tue Jul 15 12:45:50 2014] [warn] proxy: No protocol handler was valid for the URL /cgi-bin/koha/opac-view.pl. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.

I have tried a full reindex of Zebra, as well as restarting Zebra, but to no avail, alas. 

This might be another manifestation of Bug 9256.
Comment 1 Magnus Enger 2014-07-15 10:55:24 UTC
Sorry, I meant another manifestation of Bug 9864.
Comment 2 Magnus Enger 2014-07-15 12:38:43 UTC
I tried stopping Zebra for one instance and running it on the command line:

$ sudo koha-stop-zebra esme
$ sudo zebrasrv -v none,fatal,warn -f /etc/koha/sites/esme/koha-conf.xml

This revealed one error:
I/O warning : failed to load external entity "/etc/koha/zebradb/normarc-retrieval-info-auth-dom.xml"

And /etc/koha/zebradb/normarc-retrieval-info-auth-dom.xml does indeed not exist.

Doing this does make the error go away, but searching is still not working (after starting Zebra again, and reindexing):
$ sudo ln -s /etc/koha/normarc-retrieval-info-auth-dom.xml /etc/koha/zebradb/normarc-retrieval-info-auth-dom.xml

And since this error is related to authorities it should perhaps not affect a regular bib search anyway, on an instance with no authorities?
Comment 3 Magnus Enger 2014-07-15 20:40:57 UTC
Some more research shows that:

- Instances with NORMARC display the problem, instances with MARC21 do not

- Both instances with DOM and GRS1 indexing display the problem

- Running zebra on the command line with "sudo zebrasrv -v fatal,warn,log -f /etc/koha/sites/esme/koha-conf.xml" shows this when doing a search:

22:38:11-15/07 zebrasrv(1) [session] Session - OK 1 unix:/var/run/koha/esme/bibliosocket 14433
22:38:11-15/07 zebrasrv(1) [request] Auth idPass kohauser -
22:38:11-15/07 zebrasrv(1) [request] Init OK - ID:81 Name:ZOOM-C/YAZ Version:4.0.11 e8ca42e680c5e5a644481e5d0b75a0e57c6d3e92
22:38:11-15/07 zebrasrv(1) [log] dict_lookup_grep: (\x01\x0B)(l(e|\xC3\xA9|\xC3\xA8|\xC3\xAA|\xE1\xBA\xBD|\xC4\x95|\xC4\x99|\xC4\x97|\xC4\x9B|\xC8\x85|\xC8\x87)ss(i|\xC3\xAD|\xC3\xAC|\xC3\xAE|\xE1\xBB\x8B|\xC4\xA9|\xC4\xAD|\xC4\xAF|\xC7\x90|\xC8\x89|\xC8\x8B)g.*)
22:38:11-15/07 zebrasrv(1) [request] Search biblios OK 2 1 1+0 RPN @attrset Bib-1 @attr 1=1016 @attr 4=6 @attr 5=1 lessig
22:38:11-15/07 zebrasrv(1) [request] Present ERROR 239  1 1+1 
22:38:11-15/07 zebrasrv(1) [session] Connection closed by client

Looks like the search is OK, but not the "Present" part. Not sure what "Present ERROR 239" means...
Comment 4 Colin Campbell 2014-07-15 20:56:22 UTC
(In reply to Magnus Enger from comment #3)
> Some more research shows that:
> 
> - Instances with NORMARC display the problem, instances with MARC21 do not
> 
> - Both instances with DOM and GRS1 indexing display the problem
> 
> - Running zebra on the command line with "sudo zebrasrv -v fatal,warn,log -f
> /etc/koha/sites/esme/koha-conf.xml" shows this when doing a search:
> 
> 22:38:11-15/07 zebrasrv(1) [session] Session - OK 1
> unix:/var/run/koha/esme/bibliosocket 14433
> 22:38:11-15/07 zebrasrv(1) [request] Auth idPass kohauser -
> 22:38:11-15/07 zebrasrv(1) [request] Init OK - ID:81 Name:ZOOM-C/YAZ
> Version:4.0.11 e8ca42e680c5e5a644481e5d0b75a0e57c6d3e92
> 22:38:11-15/07 zebrasrv(1) [log] dict_lookup_grep:
> (\x01\x0B)(l(e|\xC3\xA9|\xC3\xA8|\xC3\xAA|\xE1\xBA\xBD|\xC4\x95|\xC4\x99|\xC4
> \x97|\xC4\x9B|\xC8\x85|\xC8\x87)ss(i|\xC3\xAD|\xC3\xAC|\xC3\xAE|\xE1\xBB\x8B|
> \xC4\xA9|\xC4\xAD|\xC4\xAF|\xC7\x90|\xC8\x89|\xC8\x8B)g.*)
> 22:38:11-15/07 zebrasrv(1) [request] Search biblios OK 2 1 1+0 RPN @attrset
> Bib-1 @attr 1=1016 @attr 4=6 @attr 5=1 lessig
> 22:38:11-15/07 zebrasrv(1) [request] Present ERROR 239  1 1+1 
> 22:38:11-15/07 zebrasrv(1) [session] Connection closed by client
> 
> Looks like the search is OK, but not the "Present" part. Not sure what
> "Present ERROR 239" means...


That looks familiar. One thing to check if yaz and zebra have been upgraded from indexdata apt repo and the Perl ZOOM module has been installed from CPAN it probably needs rebuilding against the updated libraries.
Comment 5 Magnus Enger 2014-07-16 12:22:18 UTC
(In reply to Colin Campbell from comment #4)
> That looks familiar. One thing to check if yaz and zebra have been upgraded
> from indexdata apt repo and the Perl ZOOM module has been installed from
> CPAN it probably needs rebuilding against the updated libraries.

I'm pretty sure there are no CPAN'ed modules involved.

$ sudo apt-cache policy libnet-z3950-zoom-perl
libnet-z3950-zoom-perl:
  Installed: 1.26-1
  Candidate: 1.26-1
  Version table:
 *** 1.26-1 0
        500 http://ftp.us.debian.org/debian/ squeeze/main amd64 Packages
        100 /var/lib/dpkg/status

$ yaz-client -V
YAZ version: 4.0.11 e8ca42e680c5e5a644481e5d0b75a0e57c6d3e92

"About Koha" says:

Zebra version: Zebra 2.0.44 (C) 1994-2010, Index Data ApS Zebra is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. SHA1 ID: 419ad759807269fdfa379799a051ed3a551c6541 Using ICU
Comment 6 Magnus Enger 2014-07-16 13:13:17 UTC
Interesting: I created a new NORMARC instance on the same server, and searching works as expected there. So there must be some difference between the configs of the old and the new instance...
Comment 7 Colin Campbell 2014-07-16 13:27:29 UTC
(In reply to Magnus Enger from comment #6)
> Interesting: I created a new NORMARC instance on the same server, and
> searching works as expected there. So there must be some difference between
> the configs of the old and the new instance...

The PRESENT error is, I think, generated if an error occurs formatting the result set. I think if you look at the zebra index with yaz-client you search ok but when you ask to view the returned records thats where the error occurs.
 So in Search.pm it sees there are x records but when it asks for them zebra aborts so you get undefined values.
Comment 8 Magnus Enger 2014-07-16 17:37:26 UTC
(In reply to Colin Campbell from comment #7)
> The PRESENT error is, I think, generated if an error occurs formatting the
> result set. I think if you look at the zebra index with yaz-client you
> search ok but when you ask to view the returned records thats where the
> error occurs.
>  So in Search.pm it sees there are x records but when it asks for them zebra
> aborts so you get undefined values.

Not quite. Searching from yaz-client does work, but so does "show"-ing the records. See http://paste.koha-community.org/103 for an example. But yes, there is something that causes the records not to make it back to the Koha code.
Comment 9 Magnus Enger 2014-07-16 18:42:55 UTC
I was able to fix search by:

- Copying koha-conf.xml from a fresh instance to the old instance (and editing stuff related to instancename and passwords)
- Copying zebra-biblios-dom.cfg from a fresh instance to the old instance (and editing stuff related to instancename)

I think these problems are better pursued as:
Bug 12584 - koha-conf.xml for package installations get out of sync

Thanks to Tomas, Colin, Katrin et al for helping me troubleshoot!

*** This bug has been marked as a duplicate of bug 12584 ***