[OPEN-ILS-DEV] Adding Z39.50 host

Bill Ott bott at grpl.org
Wed Jan 30 14:20:22 EST 2008


Has anyone else added additional Z39.50 hosts to search?

I thought this would be a simple matter of adding the host into the 
opensrf.xml <z3950> section.  However, the few I've tried have failed.  
Am I missing something?



My osrfsys.log, it looks like the initial search completes, in this case 
returning 2 hits

open-ils.auth 2008-01-30 14:08:15 
[INFO:29368:oils_event.c:11:1201717980294124] Creating new event: SUCCESS
open-ils.auth 2008-01-30 14:08:15 
[INFO:29368:osrf_app_session.c:522:1201717980294124] [open-ils.auth] 
sent 762 bytes of data to 
osrf at blade8.grpl.org/open-ils.search_drone_at_blade8.grpl.org_29335
open-ils.auth 2008-01-30 14:08:15 
[INFO:29368:osrf_stack.c:103:1201717980294124] Message processing 
duration 0.001082
[2008-1-30 14:8:15] open-ils.search 
[INFO:29335:Client.pm:275:1201717980294124] timed_read() read 1024 bytes 
of data
[2008-1-30 14:8:15] open-ils.search 
[INFO:29335:Client.pm:275:1201717980294124] timed_read() read 425 bytes 
of data
[2008-1-30 14:8:15] open-ils.search 
[INFO:29335:Editor.pm:71:1201717980294124] editor[0|1] checking perms 
user=1, org=4, perm=REMOTE_Z3950_QUERY
[2008-1-30 14:8:15] open-ils.search 
[INFO:29335:Editor.pm:71:1201717980294124] editor[0|1] request 
open-ils.storage.permission.user_has_perm : [1,"REMOTE_Z3950_QUERY",4]
[2008-1-30 14:8:15] open-ils.search 
[INFO:29335:AppSession.pm:501:1201717980294124] AppSession sending 
REQUEST to router at blade8.grpl.org/open-ils.storage with threadTrace [1]
[2008-1-30 14:8:15] -e [INFO:29380:Client.pm:275:] timed_read() read 685 
bytes of data
[2008-1-30 14:8:15] open-ils.storage 
[INFO:29408:Application.pm:101:1201717980294124] CALL: 
open-ils.storage.permission.user_has_perm [1, REMOTE_Z3950_QUERY, 4]
[2008-1-30 14:8:15] open-ils.storage 
[INFO:29408:AppSession.pm:501:1201717980294124] AppSession sending 
RESULT to 
osrf at blade8.grpl.org/open-ils.search_drone_at_blade8.grpl.org_29335 with 
threadTrace [1]
[2008-1-30 14:8:15] open-ils.storage 
[INFO:29408:AppSession.pm:501:1201717980294124] AppSession sending 
STATUS to 
osrf at blade8.grpl.org/open-ils.search_drone_at_blade8.grpl.org_29335 with 
threadTrace [1]
[2008-1-30 14:8:15] open-ils.search 
[INFO:29335:Client.pm:275:1201717980294124] timed_read() read 767 bytes 
of data
[2008-1-30 14:8:16] open-ils.search 
[INFO:29335:Z3950.pm:184:1201717980294124] z3950: query => @attr 1=4 
@attr 4=6 "learning perl"
[2008-1-30 14:8:16] open-ils.search 
[INFO:29335:Z3950.pm:196:1201717980294124] z3950: search [@attr 1=4 
@attr 4=6 "learning perl" ] took 0 seconds
[2008-1-30 14:8:16] open-ils.search 
[INFO:29335:Z3950.pm:220:1201717980294124] z3950: search returned 2 hits
[2008-1-30 14:8:16] open-ils.search 
[INFO:29335:Z3950.pm:234:1201717980294124] z3950: fetching record 0
[2008-1-30 14:8:16] open-ils.search 
[INFO:29335:AppSession.pm:501:1201717980294124] AppSession sending 
STATUS to osrf at blade8.grpl.org/1201717980__1201717980.285581_29412 with 
threadTrace [1]



 From my gateway.log.  It looks like this is actually an error while 
trying to report an error.


osrf_json_gw 2008-01-30 14:08:15 
[INFO:29412:osrf_app_session.c:522:1201717980294124] [open-ils.search] 
sent 327 bytes of data to router at blade8.grpl.org/open-ils.search
osrf_json_gw 2008-01-30 14:08:15 
[ACT:29412:osrf_json_gateway.c:220:1201717980294124] [172.16.64.51] 
[4b7ca1875d6df6a93a5bc6c91229ae63] open-ils.search 
open-ils.search.z3950.search_class "4b7ca1875d6df6a93a5bc6c91229ae63", 
{"service":"usc","username":"","password":"","limit":10,"offset":0,"search":{"title":"learning 
perl"}}
osrf_json_gw 2008-01-30 14:08:15 
[INFO:29412:osrf_json_gateway.c:220:1201717980294124] [172.16.64.51] 
[4b7ca1875d6df6a93a5bc6c91229ae63] open-ils.search 
open-ils.search.z3950.search_class "4b7ca1875d6df6a93a5bc6c91229ae63", 
{"service":"usc","username":"","password":"","limit":10,"offset":0,"search":{"title":"learning 
perl"}}
osrf_json_gw 2008-01-30 14:08:16 
[WARN:29412:osrf_stack.c:182:1201717980294124] The stack doesn't know 
what to do with the provided message code: 500, name 
osrfMethodException. Passing UP.
osrf_json_gw 2008-01-30 14:08:16 
[INFO:29412:osrf_stack.c:103:1201717980294124] Message processing 
duration 0.000084
osrf_json_gw 2008-01-30 14:08:16 [ERR 
:29412:osrf_json_gateway.c:262:1201717980294124] Gateway received 
error:  *** Call to [open-ils.search.z3950.search_class] failed for 
session [1201720095.501727.120172009529412], thread trace [1]:
Can't locate object method "throw" via package "ZOOM::Exception" at 
/usr/share/perl5/Error.pm line 397.
        (in cleanup) Can't locate object method "DESTROY" via package 
"ZOOM::Connection" at /openils/lib/perl5/OpenILS/Utils/ZClient.pm line 56.
        (in cleanup) Can't locate object method "DESTROY" via package 
"ZOOM::ResultSet" at /openils/lib/perl5/OpenILS/Utils/ZClient.pm line 93.

osrf_json_gw 2008-01-30 14:08:16 
[INFO:29412:osrf_json_gateway.c:327:1201717980294124] Completed 
processing service=open-ils.search, 
method=open-ils.search.z3950.search_class



So, I threw the following at the perl debugger, and sure enough, I get 
two records.

use ZOOM;

$host='library.usc.edu';
$port='2200';
$db='unicorn';

$conn = new ZOOM::Connection($host, $port,
                                  databaseName => "$db");
$conn->option(preferredRecordSyntax => "usmarc");
$rs = $conn->search_pqf('@attr 1=4 @attr 4=6 "learning perl"');
$n = $rs->size();
print $rs->record(0)->render();







More information about the Open-ils-dev mailing list