Bug 37170

Summary: Elasticsearch is functioning correctly with indices being rebuilt and searchable, but the "About Koha" page incorrectly shows Elasticsearch as "not running."
Product: Koha Reporter: alexaung <aungmo>
Component: Searching - ElasticsearchAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact:
Severity: critical    
Priority: P5 - low CC: januszop
Version: 24.05   
Hardware: Macintosh   
OS: Other   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description alexaung 2024-06-24 10:17:38 UTC
I am experiencing an issue with the Koha "About Koha" page. Although Elasticsearch is functioning correctly (indices are being rebuilt, and records are searchable), the "About Koha" page displays Elasticsearch status as "not running."

Steps to Reproduce:

Set up Koha with Elasticsearch as the search engine.
Successfully rebuild Elasticsearch indices using the command:

docker exec -it koha koha-elasticsearch --rebuild --verbose -d mylibrary

[436] Checking state of biblios index
[436] Dropping and recreating biblios index
[436] Checking state of authorities index
[436] Dropping and recreating authorities index
[436] Indexing biblios
[436] Committing final records...
[436] Total 1 records indexed
[436] Indexing authorities
[436] Committing final records...
[436] Total 1 records indexed

Perform searches in both OPAC and Staff interfaces, confirming that records are searchable.
Navigate to the "About Koha" page.

Expected Behavior:
The "About Koha" page should display the Elasticsearch version, number of nodes, and status as running.

Actual Behavior:
The "About Koha" page displays:

Elasticsearch: Version: | Nodes: | Status: not running

System Information
Koha version: 24.05.01.000
OS version: Linux 96b981d24116 6.6.31-linuxkit (running on macOS)
Perl version: 5.036000
MySQL version: 10.6.18-MariaDB-ubu2004
Apache version: 2.4.59 (Debian)
Elasticsearch version: 8.13.0 (single-node cluster)
Deployment method: Docker
Base image: debian


Elasticsearch Configuration in koha-conf.xml:

<elasticsearch>
     <server>elasticsearch:9200</server> <!-- may be repeated to include all servers on your cluster -->
     <index_name>koha_mylibrary</index_name> <!-- should be unique amongst all the indices on your cluster. _biblios and _authorities will be appended. -->

     <!-- See https://metacpan.org/pod/Search::Elasticsearch#cxn_pool -->
     <cxn_pool>Static</cxn_pool>
     <!-- See https://metacpan.org/pod/Search::Elasticsearch#trace_to -->
     <!-- <trace_to>Stderr</trace_to> -->
 </elasticsearch>

docker exec -it koha curl -X GET "http://elasticsearch:9200/_cluster/health?pretty"

{
  "cluster_name" : "docker-cluster",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 10,
  "active_shards" : 10,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 10,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 50.0
}
Comment 1 Janusz Kaczmarek 2024-07-30 10:37:15 UTC

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