koha-z3950-responder can't locate perl5db.pl
I've done a fresh install of Koha 25.05 on Ubuntu 24.04 server. I'm now trying to get the z3950-responder to start so that I can have Z39.50 server that puts out a 952$k with the item status. In the past I installed my own cobbled-together z3950 responder server to do this, but I'd like to do it without custom cruft. So I did the expected things: koha-z3950-responder --enable INSTANCE Edit /etc/koha/sites/INSTANCE/z3950/config.xml, and uncomment this line: <z3950_responder_options>\-\-add-item-status k -t 5</z3950_responder_options> Then start the responder: koha-z3950-responder --start --debugger INSTANCE I get this error: * Starting Z39.50/SRU daemon for rpl Can't locate /perl5db.pl. BEGIN failed--compilation aborted. I see the missing file here: /usr/share/perl/5.38.2/perl5db.pl I also tried this within a koha-shell INSTANCE and got the same error. Do I need to fiddle with the PERL5LIB environment variable? What am I doing wrong? -- By trying very hard to improve things, I am often able to make them much worse. --Ashleigh Brilliant
Excerpts from Mark Alexander's message of 2025-09-25 02:37:17 UTC:
* Starting Z39.50/SRU daemon for rpl Can't locate /perl5db.pl. BEGIN failed--compilation aborted.
I'm sorry, this was my mistake. I shouldn't have used the --debugger flag. The real problem (and the reason I thought I should use --debugger) was that the z3950 responder fails to start. Here's what it says in /var/log/koha/INSTANCE/z3950.log: 19:43:10-24/09 [fatal] Failed to listen on \-\-add-item-status So clearly the options aren't getting passed to the server correctly. I don't see anything in Bugzilla about this, so I guess I have to delve into the Perl code. -- Why does trouble always come at the wrong time? --Ashleigh Brilliant
Excerpts from Mark Alexander's message of 2025-09-25 02:37:17 UTC:
<z3950_responder_options>\-\-add-item-status k -t 5</z3950_responder_options>
I'm a double idiot. I neglected to remove the backslashes from this line. Things like this remind me of why I dislike XML as a user-editable config language, but we're stuck with it in Koha. For fun, I modified the koha-z3950-responder script to remove the backslashes with sed, to guard against stupid mistakes like mine, but I don't know if this would be a good idea in the long run. There's probably some reason why somebody might want to pass backslashes to the underlying Perl script (z3950_responder.pl). Z950_ADDITIONAL_OPTS="$( xmlstarlet sel -t -v 'yazgfs/config/z3950_responder_options' "$CONFIGDIR/config.xml" | sed -e 's/\\//g' || true )" -- Fundamentally, there may be no basis for anything. --Ashleigh Brilliant
participants (2)
-
Bloovis -
Mark Alexander