Bug 40052

Summary: there should be a Zebra restart button in Staff Interface in About Koha when it says it is not running
Product: Koha Reporter: Hamilton Dwight Walker <dwight>
Component: Searching - ZebraAssignee: Bugs List <koha-bugs>
Status: In Discussion --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook
Version: 22.05   
Hardware: PC   
OS: Linux   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Hamilton Dwight Walker 2025-06-02 11:49:59 UTC
When OPAC "search the catalog" was not returning any search results, I logged in at the staff interface, I looked in About Koha and it said Zebra was not running.

Currently I had to Google the command to find how to restart Koha Zebra when it was not running and no OPAC searches were working.

I should be able to press a button near that status called "Restart Zebra" and it should do it for me instead of me fiddling for hours to restart Zebra by hunting through documentation to find the correct command and doing it as root at the command prompt on my Linux server.
Comment 1 Hamilton Dwight Walker 2025-06-02 12:03:05 UTC
at command line to restart Zebra where instancename is name of library:
koha-zebra --start <instancename>
Comment 2 David Cook 2025-06-03 06:12:07 UTC
It's an interesting idea, although I don't think it'll ever happen.

First, I think that koha-zebra does indeed need to be invoked by root, so the web server isn't going to have the permissions to do that.

In theory, we could refactor koha-zebra to work at the instance user level instead of requiring root, but... I don't think anyone would be interested in doing that work.

Overall, Zebra is being phased out in favour of Elasticsearch as well. 

Also, the use of koha-zebra is specific to Koha installed by Debian packages. There's other deployment scenarios where Zebra is managed by other means, so there's no guarantees that the web server would ever be able to manage Zebra.
Comment 3 Hamilton Dwight Walker 2025-06-22 11:26:49 UTC
I created a bash script to restart koha-zebra.

cat restartzebra.sh
koha-zebra --start <instance>
echo "start koha-zebra"