Bug 28215 - software error when updating a record - /cgi-bin/koha/cataloguing/addbiblio.pl
Summary: software error when updating a record - /cgi-bin/koha/cataloguing/addbiblio.pl
Status: RESOLVED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 20.11
Hardware: All Linux
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-24 23:33 UTC by cfhong2000
Modified: 2023-07-01 08:40 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cfhong2000 2021-04-24 23:33:28 UTC
http://hostname:xxx/cgi-bin/koha/cataloguing/addbiblio.pl

Request Method: POST
Status Code: 500 Internal Server Error

Software error:
Unable to perform your search. Please try again.
For help, please send mail to the webmaster ([no address given]), giving this error message and the time and date of the error.
Comment 1 Katrin Fischer 2021-04-25 10:42:18 UTC
Hi, there is already some good information in your report, but it would be great if you could get the full error message out of the server logs, especially the Plack error logs. That would give more information to see what's going wrong there.
Comment 2 Jonathan Druart 2021-04-30 08:23:50 UTC
Lowering severity until it's confirmed.
Comment 3 cfhong2000 2021-06-19 19:13:51 UTC
Here is the log from intranet-error.log

 addbiblio.pl: Use of uninitialized value $biblionumber in concatenation (.) or string at /usr/share/koha/intranet/cgi-bin/cataloguing/addbiblio.pl line 857.: /usr/share/koha/intranet/cgi-bin/cataloguing/addbiblio.pl, referer: http://xxx/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA
Comment 4 cfhong2000 2021-06-19 19:16:44 UTC
Here is the log from intranet-error.log

 addbiblio.pl: Use of uninitialized value $biblionumber in concatenation (.) or string at /usr/share/koha/intranet/cgi-bin/cataloguing/addbiblio.pl line 857.: /usr/share/koha/intranet/cgi-bin/cataloguing/addbiblio.pl, referer: http://xxx/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA
Comment 5 cfhong2000 2021-06-19 20:45:11 UTC
Sat Jun 19 16:34:26.054527 2021] [cgi:error] [pid 9169] [client 1xxx.xxx.xxx:54867] AH01215: [Sat Jun 19 16:34:26 2021] addbiblio.pl: [Request] ** [http://localhost:9200]-[400] [illegal_argument_exception] Fielddata is disabled on text fields by default. Set fielddata=true on [local-number__sort] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead., called from sub Search::Elasticsearch::Role::Client::Direct::__ANON__ at /usr/share/koha/lib/Koha/SearchEngine/Elasticsearch/Search.pm line 96. With vars: {'status_code' => 400,'body' => {'status' => 400,'error' => {'failed_shards' => [{'shard' => 0,'index' => 'koha_acccnlib_authorities','node' => 'XixKhqGwRtinFdkt7uwTWw','reason' => {'reason' => 'Fielddata is disabled on text fields by default. Set fielddata=true on [local-number__sort] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.','type' => 'illegal_argument_exception'}}],'reason' => 'all shards failed','type' => 'search_phase_execution_exception','phase' => 'query','root_cause' => [{'type' => 'illegal_argument_exception','reason' => 'Fielddata is disabled on text fields by default. Set fielddata=true on [local-number__sort] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.'}],'caused_by' => {'type' => 'illegal_argument_exception','reason' => 'Fielddata is disabled on text fields by default. Set fielddata=true on [local-number__sort] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.','caused_by' => {'type' => 'illegal_argument_exception','reason' => 'Fielddata is disabled on text fields by default. Set fielddata=true on [local-number__sort] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.'}},'grouped' => bless( do{\\(my $o = 1)}, 'JSON::PP::Boolean' )}},'request' => {'body' => {'size' => 20,'sort' => [{'local-number__sort' => 'asc'}],'from' => 0,'query' => {'bool' => {'filter' => {'term' => {'authtype.raw' => 'PERSO_NAME'}},'must' => [{'term' => {'match-heading.ci_raw' => "\\x{9ec3}\\x{5049}\\x{5eb7}"}}]}}},'mime_type' => 'application/json','path' => '/koha_acccnlib_authorities/_search','serialize' => 'std','qs' => {},'ignore' => [],'method' => 'GET'}}: /usr/share/koha/intranet/cgi-bin/cataloguing/addbiblio.pl, referer: http://xxx:8080/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=4935&searchid=scs_1624134776827
[Sat Jun 19 16:34:26.054698 2021] [cgi:error] [pid 9169] [client xx.xxx.xx:54867] AH01215: [Sat Jun 19 16:34:26 2021] addbiblio.pl: Unable to perform your search. Please try again.: /usr/share/koha/intranet/cgi-bin/cataloguing/addbiblio.pl, referer: http://xxx:8080/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=4935&searchid=scs_1624134776827
Comment 6 Katrin Fischer 2021-06-20 11:18:20 UTC
It looks like Elasticsearch might be involved here? At the moment I am not able to test with Elasticseach, maybe someone else could give this a go?
Comment 7 Jonathan Druart 2021-06-21 12:24:58 UTC
Which exact version of Koha are you using?

And which version of Elastic?
Comment 8 cfhong2000 2021-06-21 22:47:41 UTC
I am running Koha version 20.11.03 and Elasticsearch version 6.8.9.
Comment 9 Jonathan Druart 2021-06-23 09:32:23 UTC
Did you fully reindex the records?

% koha-elasticsearch --rebuild --delete --biblios --authorities $KOHA_INSTANCE
Comment 10 Katrin Fischer 2023-07-01 08:40:21 UTC
I believe this was probably linked to a setup/installation error.