[Koha] Unable to find newly added books by barcode

Barton Chittenden barton at bywatersolutions.com
Wed Jul 5 03:47:12 NZST 2017


Tim,

You've made most of the logical choices in trouble-shooting. I'm going to
suggest a few illogical ones, just to cover the bases.

1) Restart memcache
2) Check the zebraqueue to make sure the indexing daemon is running. See
https://wiki.koha-community.org/wiki/SQL_Reports_Library#Titles_with_changes_still_pending_in_zebraqueue
.
3) Do a full re-index in verbose mode. Make sure that the re-index
completes, and check the log file from the re-index for errors.
4) What size art the marcxml records? (Records larger than 1024K won't
index correctly)
5) Edit koha_conf.xml.

Right below

 <!-- <zebra_loglevels>none,fatal,warn</zebra_loglevels> -->

add

 <zebra_loglevels>none,fatal,warn,request</zebra_loglevels>

Restart apache, memcache,

sudo koha-zebra-stop <INSTANCE NAME>
sudo koha-zebra-start <INSTANCE NAME>
ps aux | grep zebrasrv

Make sure that all of the processes have log levels none,fatal,warn,request

Run the failing barcode searches

The output will be in /var/log/koha/<INSTANCE NAME>/zebra-output.log

Grep for your barcode.... you'll see a line that has something like

.... @or @or @or ...

This is the PQF query generated by Koha, you can paste the line (starting
with the first @or) into yaz-client.

z> f @or @or @or ...

That may give you useful information.

On Mon, Jul 3, 2017 at 2:14 PM, Tim Young <Tim.Young at lightsys.org> wrote:

> I have continued my troubleshooting, and I am still befuddled.
>
> I can search for the new books by title, but not by barcode, so the books
> are being indexed.
>
> I did an sql dump, and grepped through the resulting sql.  The item
> records seem to be there for both, with the barcode in the correct spot.
> The MARC information does have a barcode entry; the MARC records do look a
> fair bit different, but that could just be how they are being stored.
>
> So I switched over to yaz-client.  When searching from the yaz-client
> command-line, I connect up and can successfully find both records:
>
> Z>*f R0029278*
> Sent searchRequest.
> Received SearchResponse.
> *Search was a success.*
> Number of hits: 1, setno 2
> SearchResult-1: term=R0029278 cnt=1
> records returned: 0
> Elapsed: 0.003077
> Z> *f R00030552*
> Sent searchRequest.
> Received SearchResponse.
> *Search was a success.*
> Number of hits: 1, setno 3
> SearchResult-1: term=R00030552 cnt=1
> records returned: 0
> Elapsed: 0.000521
>
> (and if I do a "show 1" it retrieves the record I was expecting. I just
> did not think I needed to put that level of dump into this.  But, if
> someone thinks the content of the record will help, I can do that.
>
>
> So, I ran the zebrasrv in debug mode, and I can see my requests come and
> go, with the one working and the other one not working. So I am befuddled.
>
> The Not working entry:
>
> 20:53:50-03/07 [zebraapi] zebra_chdir
> 20:53:50-03/07 [zebraapi] zebra_chdir
> 20:53:58-03/07 [sessiondetail] Connect from unix:/var/run/koha/zebradb/bib
> liosocket
> 20:53:58-03/07 [requestdetail] Got initRequest
> 20:53:58-03/07 [requestdetail] Id:        81
> 20:53:58-03/07 [requestdetail] Name:      ZOOM-C/YAZ
> 20:53:58-03/07 [requestdetail] Version:   4.2.30
> 98864b44c654645bc16b2c54f822dc2e45a93031
> 20:53:58-03/07 [requestdetail] peer unix:/var/run/koha/zebradb/bib
> liosocket
> 20:53:58-03/07 [requestdetail] Config: /etc/koha/zebradb/zebra-biblio
> s-dom.cfg
> 20:53:58-03/07 [zebraapi] zebra_open
> 20:53:58-03/07 [requestdetail] Negotiated to v3: srch prst
> extendedServices namedresults scan sort
> 20:53:58-03/07 [requestdetail] Got SearchRequest.
> 20:53:58-03/07 [requestdetail] ResultSet '1'
> 20:53:58-03/07 [requestdetail] Database 'biblios'
> 20:53:58-03/07 [requestdetail]  term 'R00030552' (general)
> 20:53:58-03/07 [requestdetail]    use (1=1016)
> 20:53:58-03/07 [requestdetail]    structure=Word list (4=6)
> 20:53:58-03/07 [requestdetail]    truncation=Right (5=1)
> 20:53:58-03/07 [zebraapi] zebra_select_databases n=1 [0]=biblios
> 20:53:58-03/07 [zebraapi] zebra_search_rpn
> 20:53:58-03/07 [zebraapi] zebra_begin_trans rw=0
> 20:53:58-03/07 [zebraapi] zebra_get_state
> 20:53:58-03/07 [zebraapi] zebra_get_resource sortmax:1000
> 20:53:58-03/07 [zebraapi] zebra_end_trans
> 20:53:58-03/07 [zebraapi] zebra_end_transaction
> 20:53:58-03/07 [requestdetail] resultCount: 0
> 20:53:58-03/07 [warn] ir_session (exception)
> 20:53:58-03/07 [zebraapi] zebra_close
>
> A working entry
> 20:53:58-03/07 [zebraapi] zebra_chdir
> 20:54:13-03/07 [sessiondetail] Connect from unix:/var/run/koha/zebradb/bib
> liosocket
> 20:54:13-03/07 [requestdetail] Got initRequest
> 20:54:13-03/07 [requestdetail] Id:        81
> 20:54:13-03/07 [requestdetail] Name:      ZOOM-C/YAZ
> 20:54:13-03/07 [requestdetail] Version:   4.2.30
> 98864b44c654645bc16b2c54f822dc2e45a93031
> 20:54:13-03/07 [requestdetail] peer unix:/var/run/koha/zebradb/bib
> liosocket
> 20:54:13-03/07 [requestdetail] Config: /etc/koha/zebradb/zebra-biblio
> s-dom.cfg
> 20:54:13-03/07 [zebraapi] zebra_open
> 20:54:13-03/07 [requestdetail] Negotiated to v3: srch prst
> extendedServices namedresults scan sort
> 20:54:13-03/07 [requestdetail] Got SearchRequest.
> 20:54:13-03/07 [requestdetail] ResultSet '1'
> 20:54:13-03/07 [requestdetail] Database 'biblios'
> 20:54:13-03/07 [requestdetail]  term 'R0029278' (general)
> 20:54:13-03/07 [requestdetail]    use (1=1016)
> 20:54:13-03/07 [requestdetail]    structure=Word list (4=6)
> 20:54:13-03/07 [requestdetail]    truncation=Right (5=1)
> 20:54:13-03/07 [zebraapi] zebra_select_databases n=1 [0]=biblios
> 20:54:13-03/07 [zebraapi] zebra_search_rpn
> 20:54:13-03/07 [zebraapi] zebra_begin_trans rw=0
> 20:54:13-03/07 [zebraapi] zebra_get_state
> 20:54:13-03/07 [zebraapi] zebra_get_resource sortmax:1000
> 20:54:13-03/07 [zebraapi] zebra_end_trans
> 20:54:13-03/07 [zebraapi] zebra_end_transaction
> 20:54:13-03/07 [requestdetail] resultCount: 1
> 20:54:13-03/07 [requestdetail] Got PresentRequest.
> 20:54:13-03/07 [requestdetail] Request to pack 1+1 1
> 20:54:13-03/07 [requestdetail] pms=1048576, mrs=1048576
> 20:54:13-03/07 [zebraapi] zebra_records_retrieve n=1
> 20:54:13-03/07 [zebraapi] zebra_begin_trans rw=0
> 20:54:13-03/07 [zebraapi] zebra_get_state
> 20:54:13-03/07 [zebraapi] zebra_end_trans
> 20:54:13-03/07 [zebraapi] zebra_end_transaction
> 20:54:13-03/07 [requestdetail] Got PresentRequest.
> 20:54:13-03/07 [requestdetail] Request to pack 1+1 1
> 20:54:13-03/07 [requestdetail] pms=1048576, mrs=1048576
> 20:54:13-03/07 [zebraapi] zebra_records_retrieve n=1
> 20:54:13-03/07 [zebraapi] zebra_begin_trans rw=0
> 20:54:13-03/07 [zebraapi] zebra_get_state
> 20:54:13-03/07 [zebraapi] zebra_end_trans
> 20:54:13-03/07 [zebraapi] zebra_end_transaction
> 20:54:13-03/07 [requestdetail] [25] Specified element set name not valid
> for specified database
> 20:54:13-03/07 [requestdetail] Got PresentRequest.
> 20:54:13-03/07 [requestdetail] Request to pack 1+1 1
> 20:54:13-03/07 [requestdetail] pms=1048576, mrs=1048576
> 20:54:13-03/07 [zebraapi] zebra_records_retrieve n=1
> 20:54:13-03/07 [zebraapi] zebra_begin_trans rw=0
> 20:54:13-03/07 [zebraapi] zebra_get_state
> 20:54:13-03/07 [zebraapi] zebra_end_trans
> 20:54:13-03/07 [zebraapi] zebra_end_transaction
> 20:54:13-03/07 [requestdetail] [25] Specified element set name not valid
> for specified database
> 20:54:13-03/07 [requestdetail] Got PresentRequest.
> 20:54:13-03/07 [requestdetail] Request to pack 1+1 1
> 20:54:13-03/07 [requestdetail] pms=1048576, mrs=1048576
> 20:54:13-03/07 [zebraapi] zebra_records_retrieve n=1
> 20:54:13-03/07 [zebraapi] zebra_begin_trans rw=0
> 20:54:13-03/07 [zebraapi] zebra_get_state
> 20:54:13-03/07 [zebraapi] zebra_end_trans
> 20:54:13-03/07 [zebraapi] zebra_end_transaction
> 20:54:13-03/07 [requestdetail] [25] Specified element set name not valid
> for specified database
> 20:54:13-03/07 [requestdetail] Got PresentRequest.
> 20:54:13-03/07 [requestdetail] Request to pack 1+1 1
> 20:54:13-03/07 [requestdetail] pms=1048576, mrs=1048576
> 20:54:13-03/07 [zebraapi] zebra_records_retrieve n=1
> 20:54:13-03/07 [zebraapi] zebra_begin_trans rw=0
> 20:54:13-03/07 [zebraapi] zebra_get_state
> 20:54:13-03/07 [zebraapi] zebra_end_trans
> 20:54:13-03/07 [zebraapi] zebra_end_transaction
> 20:54:13-03/07 [requestdetail] [25] Specified element set name not valid
> for specified database
> 20:54:13-03/07 [requestdetail] Got PresentRequest.
> 20:54:13-03/07 [requestdetail] Request to pack 1+1 1
> 20:54:13-03/07 [requestdetail] pms=1048576, mrs=1048576
> 20:54:13-03/07 [zebraapi] zebra_records_retrieve n=1
> 20:54:13-03/07 [zebraapi] zebra_begin_trans rw=0
> 20:54:13-03/07 [zebraapi] zebra_get_state
> 20:54:13-03/07 [zebraapi] zebra_end_trans
> 20:54:13-03/07 [zebraapi] zebra_end_transaction
> 20:54:13-03/07 [requestdetail] [25] Specified element set name not valid
> for specified database
> 20:54:13-03/07 [requestdetail] Got PresentRequest.
> 20:54:13-03/07 [requestdetail] Request to pack 1+1 1
> 20:54:13-03/07 [requestdetail] pms=1048576, mrs=1048576
> 20:54:13-03/07 [zebraapi] zebra_records_retrieve n=1
> 20:54:13-03/07 [zebraapi] zebra_begin_trans rw=0
> 20:54:13-03/07 [zebraapi] zebra_get_state
> 20:54:13-03/07 [zebraapi] zebra_end_trans
> 20:54:13-03/07 [zebraapi] zebra_end_transaction
> 20:54:13-03/07 [requestdetail] [25] Specified element set name not valid
> for specified database
> 20:54:13-03/07 [requestdetail] Got PresentRequest.
> 20:54:13-03/07 [requestdetail] Request to pack 1+1 1
> 20:54:13-03/07 [requestdetail] pms=1048576, mrs=1048576
> 20:54:13-03/07 [zebraapi] zebra_records_retrieve n=1
> 20:54:13-03/07 [zebraapi] zebra_begin_trans rw=0
> 20:54:13-03/07 [zebraapi] zebra_get_state
> 20:54:13-03/07 [zebraapi] zebra_end_trans
> 20:54:13-03/07 [zebraapi] zebra_end_transaction
> 20:54:13-03/07 [requestdetail] [25] Specified element set name not valid
> for specified database
> 20:54:14-03/07 [warn] ir_session (exception)
> 20:54:14-03/07 [zebraapi] zebra_close
>
> - - -
>
> I was wondering if I somehow managed to get multiple versions of zebrasrv
> running; I did migrate from a tarball to a package version.  My initial
> version did not use the etc/sites/[site]/file system.  But a ps only shows
> the one zebrasrv running.
>
> Any thoughts?
>
>     - Tim
>
>
>
> On 6/30/2017 4:15 PM, Tim Young wrote:
>
>> We recently upgraded from 3.x to 17.x.
>> All our old books can be searched for, and found by barcode.  But newly
>> added books cannot be found by barcode.
>>
>> Even if I do an advanced search and select barcode, I cannot find the new
>> records.  Searching for an old record, for books entered before our
>> upgrade, we can find them by barcode.
>>
>> But, if I am logged in as a librarian, and do an advanced search by
>> author,  I can pull up the book.  Clicking on the book shows me my
>> holdings, and the correct book along with its barcode is listed.  I can
>> click on that particular barcode and see the item.
>>
>> I am hoping that this is just a difference in how things are done from
>> the old to the new, and by checking on the right option we can search by
>> barcode?
>>
>>     - Tim Young
>> _______________________________________________
>> Koha mailing list  http://koha-community.org
>> Koha at lists.katipo.co.nz
>> https://lists.katipo.co.nz/mailman/listinfo/koha
>>
>
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
>


More information about the Koha mailing list