[Koha-devel] Z39.50 daemon with ElasticSearch

Zeno Tajoli ztajoli at gmail.com
Wed Dec 16 00:02:28 CET 2020


Hi,

I use the suggestion of Fridolin and now I'm a working z39.50 with 
ElasticSearch on Koha 20.11

My SystemD unit  (etc/systemd/system/koha-z39-el.service):
[Unit]
Description=Koha Z39.50 Service

[Service]
Type=simple
User=lib-koha
Environment="KOHA_CONF=/etc/koha/sites/lib/koha-conf.xml" 
"PERL5LIB=/usr/share/koha/lib"
ExecStart=/usr/share/koha/bin/z3950_responder.pl 
--config-dir=/etc/koha/sites/lib/z3950-ES -l /var/log/koha/lib/z3950.log 
-u lib-koha -p /var/run/koha/lib/z3950-responder.pid --debug
	
[Install]
WantedBy=multi-user.target

I add/change those values:
User=<the Unix user related with instance>

ExecStart=/usr/share/koha/bin/z3950_responder.pl

--config-dir=/etc/koha/sites/lib/z3950-ES
#It can't use '-c'; I create a new specific dir for configurations

-l /var/log/koha/lib/z3950.log
#The log file

-u lib-koha
#The user to use

-p /var/run/koha/lib/z3950-responder.pid
#File for save pid

--debug
	
What do you think of the changes and adds ?

Cheers
Zeno Tajoli




Il 15/12/2020 08:51, Fridolin SOMERS ha scritto:
> Hi,
> 
> We at Biblibre use one Koha per machine so whe created a SystemD unit :
> 
> [Unit]
> Description=Koha Z39.50 Service
> 
> [Service]
> Type=simple
> User=koha
> Environment="KOHA_CONF=/home/koha/etc/koha-conf.xml" 
> "PERL5LIB=/home/koha/src"
> ExecStart=/home/koha/src/misc/z3950_responder.pl --debug
> 
> [Install]
> WantedBy=multi-user.target
> 
> Easy peazy
> 
> Le 15/12/2020 à 00:57, Zeno Tajoli a écrit :
>> Hi to,
>> I'm trying to use ElasticSearch everywhere with Koha 20.11
>> I'm working on Debian 10, EleasticSearch 6.8.13, Java openjdk 11 
>> (Debian package)
>>
>> The search on Opac and Intranet is OK.
>>
>> Problems are on z39.50 server.
>> With bug 13937 a z39.50/SRU server is ready also with ES as search 
>> back-end.
>>
>> But now the demonization of the script doesn't work.
>> If i do:
>> sudo koha-z3950-responder --start lib
>> and I do a check with:
>> yaz-client
>> Z> open 127.0.0.1:2100/biblios
>> Connecting...OK.
>> Sent initrequest.
>> Target closed connection
>> Z>
>>
>> The result is 'closed connection', ZOOM error: 1004
>>
>> But if do:
>> sudo koha-z3950-responder --stop lib
>> sudo koha-shell lib
>> /usr/bin/perl /usr/share/koha/bin/z3950_responder.pl -c 
>> /etc/koha/sites/lib/z3950 -l /var/log/koha/lib/z3950.log
>> koha at deb:~$ yaz-client
>> Z> open 127.0.0.1:2100/biblios
>> Connecting...OK.
>> Sent initrequest.
>> Connection accepted by v3 target.
>> ID     : 81
>> Name   : Koha/GFS/YAZ
>> Version: 20.11.00.000/5.30.3 2af59bc45cf4508d5c84f350ee99804c4354b3b3
>> Options: search present triggerResourceCtrl namedResultSets
>> Elapsed: 0.012131
>> Z> f css3
>> Sent searchRequest.
>> Received SearchResponse.
>> Search was a success.
>> Number of hits: 1, setno 1
>> records returned: 0
>> Elapsed: 0.915224
>> Z> show 1
>> Sent presentRequest (1+1).
>> Records: 1
>> []Record type: USmarc
>> 00357nam a22001217a 4500
>> 005 20201208204443.0
>> 008 201208b           ||||| |||| 00| 0 eng d
>> 040    $c IFLA
>> 100    $a Tajoli, Zeno
>> 245    $a Node.js e CSS3
>> ...
>>
>> So the script 'z3950_responder.pl' is working, the transformation into 
>> daemon not.
>> Do you have any suggestion/check to fix this situation ?
>>
>> Cheers
>> Zeno Tajoli
>>
>>
> 

-- 
Zeno Tajoli
System Librarian


More information about the Koha-devel mailing list