Over the past day or two I've been setting up Z39.50 servers on my Koha 2.2.5 running on OpenBSD 3.9 and ran into several issues which I've been able to resolve so I'm posting here in case someone has similar issues. First two pertain to running Koha on *BSD but the other two are more general. Mike D. PROBLEM: attempting to start Z3950 with z3950-daemon-launch.sh results in the following error: # ./z3950-daemon-launch.sh # This account is currently not available. CAUSE: OpenBSD's default Apache configuration is more secure than most. By default the www user has no login shell and normally apache is chrooted to /var/www after it starts. Most cgi scripts require some modification to run in the chroot. I may eventually work on getting Koha running in the chrooted Apache but until then I've just disabled it. SOLUTION: Since the www user has no shell and therefore can't run the z3950 I've created a z3950 user and modified z3950-daemon-options to reflect this. # cat z3950-daemon-options #20060806 - changed RunAsUser from www to z3950 RunAsUser=z3950 KohaZ3950Dir=/var/www/koha/intranet/scripts/z3950daemon KohaModuleDir=/var/www/koha/intranet/modules LogDir=/var/www/koha/log KohaConf=/etc/koha.conf PROBLEM: attempting to start Z3950 with z3950-daemon-launch.sh results in the following error: # ./z3950-daemon-launch.sh # su: no such login class: /var/www/koha/intranet/scripts/z3950daemon/z3950-daemon-shell.sh CAUSE: The syntax for the su command in /koha/intranet/scripts/z3950daemon/z3950- daemon-launch.sh is invalid for OpenBSD and FreeBSD and quite likely NetBSD. For OpenBSD (FreeBSD and NetBSD are similar) the command syntax is: su [-fKLlm] [-a auth-type] [-c login-class] [login [shell arguments]] also the '-' switch has been deprecated in favour of -l SOLUTION: Change the su command in z3950-daemon-launch.sh. So instead of su -c $KohaZ3950Shell - $RunAsUser & change it to the following su -l $RunAsUser -c $KohaZ3950Shell & The -c is actually an argument to the shell in this case which means take a command from argument instead of stdin. It should work with sh, csh, tcsh, ksh, and bash shells. I have filed a bug report on this issue which contains the same information as above. See bug #1141 http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1141 PROBLEM: The following problems MAY only appear when using the NPL template. 1) When using the NPL template Z3950 search results from certain servers may not be present in the pop-up "Z3950 Search Results" even though the log indicates that records were found and retrieved from that server. I specifically had this problem when searching AMICUS. 2) You may get error messages in the z3950 log file like the following: Can't call method "size" on an undefined value at /var/www/koha/intranet/scripts/z3950daemon/processz3950queue line 271. I would get that error when trying to query the Library of Congress server. You will also notice that log file will be missing entries that normally appear. The following lines marked with *** should normally appear but don't. 24369/32 : Processing isbn=0672305410 at LIBRARY OF CONGRESS z3950.loc.gov:7090 Voyager MARC21 (8 forks) 24369/32 : 2 >> 24369/32 : creating and 24369/32 : working on results entry 69 24369/32 : connected to LIBRARY OF CONGRESS ***24369/32 : LIBRARY OF CONGRESS : 1 records found, retrieving them (max 80) ***24369/32 : z3950.loc.gov:7090 search done. 3) If you are accessing multiple Z3950 servers you may notice in the pop- up "Z3950 Search Results" that one or more seem not to respond. The page will infinitely display "Still 1 requests to go" or whatever number of servers are not responding. If you notice this, it's most likely related to the #2 symptom above. The following threads also discuss similar symptoms: 20060306 http://thread.gmane.org/gmane.comp.misc.koha/5696/focus=5696 20051129 http://thread.gmane.org/gmane.comp.misc.koha/5315/focus=5316 20051028 http://thread.gmane.org/gmane.comp.misc.koha/5211/focus=5219 20051026 http://thread.gmane.org/gmane.comp.misc.koha/5201/focus=5201 20051006 http://thread.gmane.org/gmane.comp.misc.koha/5101/focus=5101 20050905 http://thread.gmane.org/gmane.comp.misc.koha/4978/focus=4978 20050103 http://thread.gmane.org/gmane.comp.misc.koha/4152/focus=4152 CAUSE: This is a symptom of bug #1051 http://bugs.koha.org/cgi- bin/bugzilla/show_bug.cgi?id=1051 Basically the MARC flavour option was changed from USMARC to MARC21 but the NPL template wasn't updated. The result is that the remote server isn't informed of your MARC flavour preference. The offending snippets of code are listed below. NPL version of z3950servers.tmpl: <select name="syntax"> <option value="USMARC">USMARC</option> <option value="UNIMARC">UNIMARC</option> </select> DEFAULT version of z3950servers.tmpl: <select name="syntax"> <option value="MARC21">MARC21</option> <option value="UNIMARC">UNIMARC</option> </select> processz3950queue: eval { $conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::USMARC);} if ($globalsyntax eq "MARC21"); eval { $conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::UNIMARC);} if ($globalsyntax eq "UNIMARC"); Looking at CVS it appears this bug was introduced into processz3950queue on Mar 30 2005. As of Jun 11 2006 MARC21 was switched back to USMARC. SOLUTION: Since the NPL version of z3950servers.tmpl is the odd one out, the easiest thing to do is modify it to be the same as the default version (see code snippets above). It appears the latest code has reverted back to USMARC and you *SHOULD* also be able to change the default template and processz3950queue to mirror those changes. Alternatively, the next time you upgrade to 2.2.6 or later this problem should be resolved (or at least this specific cause will be). PROBLEM: When using NPL and a Z3950 search completes the "Z3950 Search Results" refreshes into an Error 404 when attempting to load the page /cgi- bin/koha/z3950/0/ 20060405 http://article.gmane.org/gmane.comp.misc.koha/5798/match=z3950 20051026 http://article.gmane.org/gmane.comp.misc.koha/5201/match=z3950 20050818 http://article.gmane.org/gmane.comp.misc.koha/4935/match=z3950 my own question on this problem last year :) SOLUTION: Thomas D. has posted a fix a number of times (thanks again) http://article.gmane.org/gmane.comp.misc.koha/5316/match=z3950 http://thread.gmane.org/gmane.comp.misc.koha/4925/focus=4935 but since this has been around since at least version 2.2.3 I've opened a bug report. Bug #1143 http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1143
hi, I have a trouble searching records with z39.50 search. i read and followed what you told. but one problem i am having is that, i am not getting any records in z3950 search and also as u said, the results may not be displayed but they can be found in the log, but i am not getting anything in the log... so may be i am missing something or something is wrong that i am not getting. so please write me if you have any idea. (I am using koha2.2.5 and npl template...) thanks and regards. Lalitanand. On 8/8/06, Mike D. <dalgity@htl.net> wrote:
Over the past day or two I've been setting up Z39.50 servers on my Koha 2.2.5 running on OpenBSD 3.9 and ran into several issues which I've been able to resolve so I'm posting here in case someone has similar issues. First two pertain to running Koha on *BSD but the other two are more general. Mike D.
PROBLEM: attempting to start Z3950 with z3950-daemon-launch.sh results in the following error: # ./z3950-daemon-launch.sh # This account is currently not available.
CAUSE: OpenBSD's default Apache configuration is more secure than most. By default the www user has no login shell and normally apache is chrooted to /var/www after it starts. Most cgi scripts require some modification to run in the chroot. I may eventually work on getting Koha running in the chrooted Apache but until then I've just disabled it.
SOLUTION: Since the www user has no shell and therefore can't run the z3950 I've created a z3950 user and modified z3950-daemon-options to reflect this. # cat z3950-daemon-options #20060806 - changed RunAsUser from www to z3950 RunAsUser=z3950 KohaZ3950Dir=/var/www/koha/intranet/scripts/z3950daemon KohaModuleDir=/var/www/koha/intranet/modules LogDir=/var/www/koha/log KohaConf=/etc/koha.conf
PROBLEM: attempting to start Z3950 with z3950-daemon-launch.sh results in the following error: # ./z3950-daemon-launch.sh # su: no such login class: /var/www/koha/intranet/scripts/z3950daemon/z3950-daemon-shell.sh
CAUSE: The syntax for the su command in /koha/intranet/scripts/z3950daemon/z3950- daemon-launch.sh is invalid for OpenBSD and FreeBSD and quite likely NetBSD.
For OpenBSD (FreeBSD and NetBSD are similar) the command syntax is: su [-fKLlm] [-a auth-type] [-c login-class] [login [shell arguments]] also the '-' switch has been deprecated in favour of -l
SOLUTION: Change the su command in z3950-daemon-launch.sh. So instead of su -c $KohaZ3950Shell - $RunAsUser &
change it to the following su -l $RunAsUser -c $KohaZ3950Shell &
The -c is actually an argument to the shell in this case which means take a command from argument instead of stdin. It should work with sh, csh, tcsh, ksh, and bash shells.
I have filed a bug report on this issue which contains the same information as above. See bug #1141 http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1141
PROBLEM: The following problems MAY only appear when using the NPL template.
1) When using the NPL template Z3950 search results from certain servers may not be present in the pop-up "Z3950 Search Results" even though the log indicates that records were found and retrieved from that server. I specifically had this problem when searching AMICUS.
2) You may get error messages in the z3950 log file like the following: Can't call method "size" on an undefined value at /var/www/koha/intranet/scripts/z3950daemon/processz3950queue line 271.
I would get that error when trying to query the Library of Congress server. You will also notice that log file will be missing entries that normally appear. The following lines marked with *** should normally appear but don't. 24369/32 : Processing isbn=0672305410 at LIBRARY OF CONGRESS z3950.loc.gov:7090 Voyager MARC21 (8 forks) 24369/32 : 2 >> 24369/32 : creating and 24369/32 : working on results entry 69 24369/32 : connected to LIBRARY OF CONGRESS ***24369/32 : LIBRARY OF CONGRESS : 1 records found, retrieving them (max 80) ***24369/32 : z3950.loc.gov:7090 search done.
3) If you are accessing multiple Z3950 servers you may notice in the pop- up "Z3950 Search Results" that one or more seem not to respond. The page will infinitely display "Still 1 requests to go" or whatever number of servers are not responding. If you notice this, it's most likely related to the #2 symptom above.
The following threads also discuss similar symptoms: 20060306 http://thread.gmane.org/gmane.comp.misc.koha/5696/focus=5696 20051129 http://thread.gmane.org/gmane.comp.misc.koha/5315/focus=5316 20051028 http://thread.gmane.org/gmane.comp.misc.koha/5211/focus=5219 20051026 http://thread.gmane.org/gmane.comp.misc.koha/5201/focus=5201 20051006 http://thread.gmane.org/gmane.comp.misc.koha/5101/focus=5101 20050905 http://thread.gmane.org/gmane.comp.misc.koha/4978/focus=4978 20050103 http://thread.gmane.org/gmane.comp.misc.koha/4152/focus=4152
CAUSE: This is a symptom of bug #1051 http://bugs.koha.org/cgi- bin/bugzilla/show_bug.cgi?id=1051
Basically the MARC flavour option was changed from USMARC to MARC21 but the NPL template wasn't updated. The result is that the remote server isn't informed of your MARC flavour preference. The offending snippets of code are listed below.
NPL version of z3950servers.tmpl: <select name="syntax"> <option value="USMARC">USMARC</option> <option value="UNIMARC">UNIMARC</option> </select>
DEFAULT version of z3950servers.tmpl: <select name="syntax"> <option value="MARC21">MARC21</option> <option value="UNIMARC">UNIMARC</option> </select>
processz3950queue:
eval { $conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::USMARC);} if ($globalsyntax eq "MARC21"); eval { $conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::UNIMARC);} if ($globalsyntax eq "UNIMARC");
Looking at CVS it appears this bug was introduced into processz3950queue on Mar 30 2005. As of Jun 11 2006 MARC21 was switched back to USMARC.
SOLUTION: Since the NPL version of z3950servers.tmpl is the odd one out, the easiest thing to do is modify it to be the same as the default version (see code snippets above). It appears the latest code has reverted back to USMARC and you *SHOULD* also be able to change the default template and processz3950queue to mirror those changes. Alternatively, the next time you upgrade to 2.2.6 or later this problem should be resolved (or at least this specific cause will be).
PROBLEM: When using NPL and a Z3950 search completes the "Z3950 Search Results" refreshes into an Error 404 when attempting to load the page /cgi- bin/koha/z3950/0/
20060405 http://article.gmane.org/gmane.comp.misc.koha/5798/match=z3950 20051026 http://article.gmane.org/gmane.comp.misc.koha/5201/match=z3950 20050818 http://article.gmane.org/gmane.comp.misc.koha/4935/match=z3950 my own question on this problem last year :)
SOLUTION: Thomas D. has posted a fix a number of times (thanks again) http://article.gmane.org/gmane.comp.misc.koha/5316/match=z3950 http://thread.gmane.org/gmane.comp.misc.koha/4925/focus=4935
but since this has been around since at least version 2.2.3 I've opened a bug report. Bug #1143 http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1143
_______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
-- "Talk is cheap. Show me the code. Think Open, use Open Source!" Visit & Register at http://www.ossrc.org.in
"lalitanand dandge" <dandgelb@gmail.com>
i am not getting any records in z3950 search and also as u said, the results may not be displayed but they can be found in the log, but i am not getting anything in the log... [...] (I am using koha2.2.5 and npl template...)
2.2.5 users with fast z39.50 connections may need to make the change described in http://cvs.savannah.nongnu.org/viewcvs/koha/z3950/search.pl?root=koha&r1=1.3.2.7&r2=1.3.2.8 However, if there's nothing in the z3950-daemon-*.log, then you may need to make sure that the search daemon is running. The installer does not set that up yet, as there were too many variations of how to do it. Now it seems that z3950 searching is common, popular and one of koha's killer features, I guess that needs to change soon. Hope that helps, -- MJ Ray - see http://mjr.towers.org.uk/email.html North End, Lynn, Norfolk, England Work: http://www.ttllp.co.uk/ IRC/Jabber/SIP: on request
lalitanand dandge <dandgelb@...> writes:
hi,I have a trouble searching records with z39.50 search.i read and followed
what you told.but one problem i am having is that, i am not getting any records in z3950 searchand also as u said, the results may not be displayed but they can be found in the
log, but i am not getting anything in the log...so may be i am missing something or something is wrong that i am not getting.so please write me if you have any idea.(I am using koha2.2.5 and npl template...) thanks and regards.Lalitanand.
Hi, Since you say you are getting nothing in the log I would check to make sure you have the Z3950 client running. Try the command ps -a | grep z3950 You should see something like this: 22583 p0 I 1:03.75 /usr/bin/perl /var/www/koha/intranet/scripts/z3950daemon/processz3950que ue /var/www/koha/log If you don't then Z3950 hasn't been started. If the Z3950 client has started then in /koha/log you should see a log file in the following format: z3950-daemon-YYYYMMDD-HHMM.log If you don't then you likely have a file permissions problem and it can't create the log file Mike D.
hi i too have the same problem. my ps output is this [root@centrallib log]# ps -ef | grep z39 root 5275 1 0 09:56 pts/1 00:00:00 su -c /usr/local/koha/intranet/scripts/z3950daemon/z3950-daemon-shell.sh - apache 5276 5275 0 09:56 pts/1 00:00:00 /usr/bin/perl /usr/local/koha/intranet/scripts/z3950daemon/processz3950queue /usr/local/koha/log root 5403 5128 0 10:04 pts/1 00:00:00 grep z39 [root@centrallib log]# it does create the log file on the format specified but there is only an empty file generated permissions for the log directory is 777. -- Regards Mohamed Imran K R
Mohamed Imran K R <mohamedimran.kr@...> writes:
hi i too have the same problem. my ps output is this[root <at> centrallib
log]# ps -ef | grep z39root 5275 1 0 09:56 pts/1 00:00:00 su - c /usr/local/koha/intranet/scripts/z3950daemon/z3950-daemon-shell.sh
-apache 5276 5275 0 09:56 pts/1 00:00:00 /usr/bin/perl /usr/local/koha/intranet/scripts/z3950daemon/processz3950 queue /usr/local/koha/logroot 5403 5128 0 10:04 pts/1 00:00:00 grep z39[root <at> centrallib log]#it does create the log file on the format specified but there is only an empty file generated permissions for the log directory is 777. -- RegardsMohamed Imran K R
_______________________________________________ Koha mailing list Koha@... http://lists.katipo.co.nz/mailman/listinfo/koha
Good, looks like processz3950queue is running. Your log directory permissions will work but are maybe a little loose. The default permissions on my log directory are drwxrwx--- 2 root www 1024 Aug 6 21:31 log What about the file permissions? Mine look like -rw-r--r-- 1 z3950 www 13891 Aug 7 21:34 z3950-daemon-20060806-2131.log As long as you have one Z3950 server setup you should be seeing something in the log as soon as you hit the "z39.50 Search" button. Mike D.
NPL version of z3950servers.tmpl: <select name="syntax"> <option value="USMARC">USMARC</option> <option value="UNIMARC">UNIMARC<> /option> </select>
processz3950queue:
eval { $conn->option(preferredRecordS> yntax => Net::Z3950::RecordSyntax::USMARC);} if ($globalsyntax eq "MARC21"); eval { $conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::UNIMARC);} if ($globalsyntax eq "UNIMARC");
Hi, I problem is still there. I changed what you specified in NPL template. I did not get what changes need to be done in processz3950queue (i trried changing USMARC with MARC21 but it resulted into errors), Another thing i wanted to tell you that, my z3950 daemon is running, and I am also getting the log file with the name you said. my $ps -a | grep z3950 gives result... 16479 pts/0 00:00:00 processz3950que and, i am getting the log file named, z3950-daemon-20060809-0959.log but it is blank. [:(] thanks and regards Lalitanand. On 8/8/06, Mike D. <dalgity@htl.net> wrote: lalitanand dandge <dandgelb@...> writes:
hi,I have a trouble searching records with z39.50 search.i read and
followed what you told.but one problem i am having is that, i am not getting any records in z3950 searchand also as u said, the results may not be displayed but they can be found in the
log, but i am not getting anything in the log...so may be i am missing something or something is wrong that i am not getting.so please write me if you have any idea.(I am using koha2.2.5 and npl template...) thanks and regards.Lalitanand.
Hi, Since you say you are getting nothing in the log I would check to make sure you have the Z3950 client running. Try the command ps -a | grep z3950 You should see something like this: 22583 p0 I 1:03.75 /usr/bin/perl /var/www/koha/intranet/scripts/z3950daemon/processz3950que ue /var/www/koha/log If you don't then Z3950 hasn't been started.
If the Z3950 client has started then in /koha/log you should see a log file in the following format: z3950-daemon-YYYYMMDD-HHMM.log If you don't then you likely have a file permissions problem and it can't create the log file
Mike D.
_______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
-- "Talk is cheap. Show me the code. Think Open, use Open Source!" Visit & Register at http://www.ossrc.org.in
Good, looks like you've got the Z3950 daemon running. For processz3950queue, don't change this part: (preferredRecordSyntax => Net::Z3950::RecordSyntax::USMARC). You only need to change the MARC flavour in this little section ($globalsyntax eq "MARC21") if you're going to mirror the changes in CVS and revert back to USMARC for both processz3950queue and the DEFAULT version of z3950servers.tmpl. I didn't change processz3950queue or the DEFAULT version of z3950servers.tmpl because I didn't know if there was any other location this variable is used. I only changed the NPL version of z3950servers.tmpl (USMARC -> MARC21) to match the DEFAULT one. One thing I did fail to mention is that after making changes to the z3950servers.tmpl file you need to go to the Z39.50 Servers Administration page and then edit each one of your servers to update the MARC Syntax setting. Mike D.
participants (4)
-
lalitanand dandge -
Mike D. -
mjr@phonecoop.coop -
Mohamed Imran K R