[Koha-devel] Z39.50 daemon with ElasticSearch

Jason Boyer JBoyer at equinoxOLI.org
Thu Jun 24 20:34:02 CEST 2021


Oops, accidentally hit send too soon.

Also, to keep the regular koha-z3950-responder script from interfering you have to rename the config dir as Zeno did. I picked z3950-srv, but anything will work so long as you rename all of them the same way.

Jason



-- 
Jason Boyer
Senior System Administrator
Equinox Open Library Initiative
JBoyer at equinoxOLI.org
+1 (877) Open-ILS (673-6457)
https://equinoxOLI.org/

> On Jun 24, 2021, at 2:30 PM, Jason Boyer <JBoyer at equinoxOLI.org> wrote:
> 
> I was glad that I remembered this exchange, I was setting up ES and the z3950 responder today and having some trouble. I poked at the script a bit to see what might be the problem but didn’t have time to figure out the issue. I am fairly comfortable with systemd units though, so I put together the attached instanced service so you can create as many z3950 instances as needed on a Debian-packages based system like so:
> 
> systmectl start koha-z3950-responder at instance-name.service <mailto:koha-z3950-responder at instance-name.service>
> systmectl enable koha-z3950-responder at instance-name.service <mailto:koha-z3950-responder at instance-name.service>
> 
> And it should work as intended with koha-z3950-responder --start ...
> 
> Since systemd keeps track of things there’s no need to worry about the -u or -p options
> 
> Jason
> 
> -- 
> Jason Boyer
> Senior System Administrator
> Equinox Open Library Initiative
> JBoyer at equinoxOLI.org <mailto:JBoyer at equinoxOLI.org>
> +1 (877) Open-ILS (673-6457)
> https://equinoxOLI.org/
> 
>> On Dec 15, 2020, at 6:02 PM, Zeno Tajoli <ztajoli at gmail.com <mailto:ztajoli at gmail.com>> wrote:
>> 
>> 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
>> _______________________________________________
>> Koha-devel mailing list
>> Koha-devel at lists.koha-community.org <mailto:Koha-devel at lists.koha-community.org>
>> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel <https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel>
>> website : http://www.koha-community.org/ <http://www.koha-community.org/>
>> git : http://git.koha-community.org/ <http://git.koha-community.org/>
>> bugs : http://bugs.koha-community.org/ <http://bugs.koha-community.org/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210624/fe3bb192/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: koha-z3950-responder at .service
Type: application/octet-stream
Size: 343 bytes
Desc: not available
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210624/fe3bb192/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210624/fe3bb192/attachment-0003.htm>


More information about the Koha-devel mailing list