hi,<br>I have a trouble searching records with z39.50 search.<br>i read and followed what you told.<br>but one problem i am having is that, <br>i am not getting any records in z3950 search<br>and also as u said, the results may not be displayed but they can be found in the 
<br>log, but i am not getting anything in the log...<br>so may be i am missing something or something is wrong that i am not getting.<br>so please write me if you have any idea.<br>(I am using koha2.2.5 and npl template...)
<br><br>thanks and regards.<br>Lalitanand.<br><br><div><span class="gmail_quote">On 8/8/06, <b class="gmail_sendername">Mike D.</b> &lt;<a href="mailto:dalgity@htl.net">dalgity@htl.net</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Over the past day or two I've been setting up Z39.50 servers on my Koha 2.2.5<br>running on OpenBSD 3.9 and ran into several issues which I've been able to<br>resolve so I'm posting here in case someone has similar issues. First two
<br>pertain to running Koha on *BSD but the other two are more general.<br>Mike D.<br><br><br>PROBLEM:<br>attempting to start Z3950 with z3950-daemon-launch.sh results in the following<br>error:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# ./z3950-daemon-launch.sh
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# This account is currently not available.<br><br>CAUSE:<br>OpenBSD's default Apache configuration is more secure than most. By default the<br>www user has no login shell and normally apache is chrooted to /var/www after
<br>it starts. Most cgi scripts require some modification to run in the chroot. I<br>may eventually work on getting Koha running in the chrooted Apache but until<br>then I've just disabled it.<br><br>SOLUTION:<br>Since the www user has no shell and therefore can't run the z3950 I've created
<br>a z3950 user and modified z3950-daemon-options to reflect this.<br># cat z3950-daemon-options<br>#20060806 - changed RunAsUser from www to z3950<br>RunAsUser=z3950<br>KohaZ3950Dir=/var/www/koha/intranet/scripts/z3950daemon
<br>KohaModuleDir=/var/www/koha/intranet/modules<br>LogDir=/var/www/koha/log<br>KohaConf=/etc/koha.conf<br><br><br><br>PROBLEM:<br>attempting to start Z3950 with z3950-daemon-launch.sh results in the following<br>error:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# ./z3950-daemon-launch.sh<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# su: no such login<br>class: /var/www/koha/intranet/scripts/z3950daemon/z3950-daemon-shell.sh<br><br>CAUSE:<br>The syntax for the su command in /koha/intranet/scripts/z3950daemon/z3950-
<br>daemon-launch.sh is invalid for OpenBSD and FreeBSD and quite likely NetBSD.<br><br>For OpenBSD (FreeBSD and NetBSD are similar) the command syntax is:<br>su [-fKLlm] [-a auth-type] [-c login-class] [login [shell arguments]]
<br>also the '-' switch has been deprecated in favour of -l<br><br>SOLUTION:<br>Change the su command in z3950-daemon-launch.sh. So instead of<br>su -c $KohaZ3950Shell - $RunAsUser &amp;<br><br>change it to the following<br>
su -l $RunAsUser -c $KohaZ3950Shell &amp;<br><br>The -c is actually an argument to the shell in this case which means take a<br>command from argument instead of stdin. It should work with sh, csh, tcsh, ksh,<br>and bash shells.
<br><br>I have filed a bug report on this issue which contains the same information as<br>above. See bug #1141 <a href="http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1141">http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1141
</a><br><br><br><br>PROBLEM:<br>The following problems MAY only appear when using the NPL template.<br><br>1) When using the NPL template Z3950 search results from certain servers may<br>not be present in the pop-up &quot;Z3950 Search Results&quot; even though the log
<br>indicates that records were found and retrieved from that server. I<br>specifically had this problem when searching AMICUS.<br><br>2) You may get error messages in the z3950 log file like the following:<br>Can't call method &quot;size&quot; on an undefined value
<br>at /var/www/koha/intranet/scripts/z3950daemon/processz3950queue line 271.<br><br>I would get that error when trying to query the Library of Congress server. You<br>will also notice that log file will be missing entries that normally appear.
<br>The following lines marked with *** should normally appear but don't.<br>24369/32 : Processing isbn=0672305410 at LIBRARY OF CONGRESS <a href="http://z3950.loc.gov:7090">z3950.loc.gov:7090</a><br>Voyager MARC21 (8 forks)
<br>24369/32 : 2 &gt;&gt;<br>24369/32 : creating and 24369/32 : working on results entry 69<br>24369/32 : connected to LIBRARY OF CONGRESS<br>***24369/32 : LIBRARY OF CONGRESS : 1 records found, retrieving them (max 80)<br>
***24369/32 : <a href="http://z3950.loc.gov:7090">z3950.loc.gov:7090</a> search done.<br><br>3) If you are accessing multiple Z3950 servers you may notice in the pop-<br>up &quot;Z3950 Search Results&quot; that one or more seem not to respond. The page will
<br>infinitely display &quot;Still 1 requests to go&quot; or whatever number of servers are<br>not responding. If you notice this, it's most likely related to the #2 symptom<br>above.<br><br>The following threads also discuss similar symptoms:
<br>20060306 <a href="http://thread.gmane.org/gmane.comp.misc.koha/5696/focus=5696">http://thread.gmane.org/gmane.comp.misc.koha/5696/focus=5696</a><br>20051129 <a href="http://thread.gmane.org/gmane.comp.misc.koha/5315/focus=5316">
http://thread.gmane.org/gmane.comp.misc.koha/5315/focus=5316</a><br>20051028 <a href="http://thread.gmane.org/gmane.comp.misc.koha/5211/focus=5219">http://thread.gmane.org/gmane.comp.misc.koha/5211/focus=5219</a><br>20051026 
<a href="http://thread.gmane.org/gmane.comp.misc.koha/5201/focus=5201">http://thread.gmane.org/gmane.comp.misc.koha/5201/focus=5201</a><br>20051006 <a href="http://thread.gmane.org/gmane.comp.misc.koha/5101/focus=5101">http://thread.gmane.org/gmane.comp.misc.koha/5101/focus=5101
</a><br>20050905 <a href="http://thread.gmane.org/gmane.comp.misc.koha/4978/focus=4978">http://thread.gmane.org/gmane.comp.misc.koha/4978/focus=4978</a><br>20050103 <a href="http://thread.gmane.org/gmane.comp.misc.koha/4152/focus=4152">
http://thread.gmane.org/gmane.comp.misc.koha/4152/focus=4152</a><br><br><br>CAUSE:<br>This is a symptom of bug #1051 <a href="http://bugs.koha.org/cgi-">http://bugs.koha.org/cgi-</a><br>bin/bugzilla/show_bug.cgi?id=1051<br>
<br>Basically the MARC flavour option was changed from USMARC to MARC21 but the NPL<br>template wasn't updated. The result is that the remote server isn't informed of<br>your MARC flavour preference. The offending snippets of code are listed below.
<br><br>NPL version of z3950servers.tmpl:<br>&lt;select name=&quot;syntax&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value=&quot;USMARC&quot;&gt;USMARC&lt;/option&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value=&quot;UNIMARC&quot;&gt;UNIMARC&lt;/option&gt;
<br>&lt;/select&gt;<br><br>DEFAULT version of z3950servers.tmpl:<br>&lt;select name=&quot;syntax&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value=&quot;MARC21&quot;&gt;MARC21&lt;/option&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value=&quot;UNIMARC&quot;&gt;UNIMARC&lt;/option&gt;
<br>&lt;/select&gt;<br><br>processz3950queue:<br><br>eval { $conn-&gt;option(preferredRecordSyntax =&gt;<br> Net::Z3950::RecordSyntax::USMARC);} if ($globalsyntax eq &quot;MARC21&quot;);<br>eval { $conn-&gt;option(preferredRecordSyntax =&gt;
<br> Net::Z3950::RecordSyntax::UNIMARC);} if ($globalsyntax eq &quot;UNIMARC&quot;);<br><br>Looking at CVS it appears this bug was introduced into processz3950queue on Mar<br>30 2005. As of Jun 11 2006 MARC21 was switched back to USMARC.
<br><br>SOLUTION:<br>Since the NPL version of z3950servers.tmpl is the odd one out, the easiest<br>thing to do is modify it to be the same as the default version (see code<br>snippets above). It appears the latest code has reverted back to USMARC and you
<br>*SHOULD* also be able to change the default template and processz3950queue to<br>mirror those changes. Alternatively, the next time you upgrade to 2.2.6 or<br>later this problem should be resolved (or at least this specific cause will be).
<br><br><br><br>PROBLEM:<br>When using NPL and a Z3950 search completes the &quot;Z3950 Search Results&quot;<br>refreshes into an Error 404 when attempting to load the page /cgi-<br>bin/koha/z3950/0/<br><br>20060405 <a href="http://article.gmane.org/gmane.comp.misc.koha/5798/match=z3950">
http://article.gmane.org/gmane.comp.misc.koha/5798/match=z3950</a><br>20051026 <a href="http://article.gmane.org/gmane.comp.misc.koha/5201/match=z3950">http://article.gmane.org/gmane.comp.misc.koha/5201/match=z3950</a><br>
20050818 <a href="http://article.gmane.org/gmane.comp.misc.koha/4935/match=z3950">http://article.gmane.org/gmane.comp.misc.koha/4935/match=z3950</a> my own<br>question on this problem last year :)<br><br><br>SOLUTION:<br>
Thomas D. has posted a fix a number of times (thanks again)<br><a href="http://article.gmane.org/gmane.comp.misc.koha/5316/match=z3950">http://article.gmane.org/gmane.comp.misc.koha/5316/match=z3950</a><br><a href="http://thread.gmane.org/gmane.comp.misc.koha/4925/focus=4935">
http://thread.gmane.org/gmane.comp.misc.koha/4925/focus=4935</a><br><br>but since this has been around since at least version 2.2.3 I've opened a bug<br>report. Bug #1143 <a href="http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1143">
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1143</a><br><br>_______________________________________________<br>Koha mailing list<br><a href="mailto:Koha@lists.katipo.co.nz">Koha@lists.katipo.co.nz</a><br><a href="http://lists.katipo.co.nz/mailman/listinfo/koha">
http://lists.katipo.co.nz/mailman/listinfo/koha</a><br></blockquote></div><br><br clear="all"><br>-- <br>&quot;Talk is cheap. Show me the code. Think Open, use Open Source!&quot;<br>Visit &amp; Register at <a href="http://www.ossrc.org.in">
http://www.ossrc.org.in</a>