IRC log for #koha, 2006-02-28

All times shown according to UTC.

Time S Nick Message
19:14 Jo Chris: can you check our servers; Koha is grinding to slow halt here for some reason
20:42 chris yep
20:42 chris sorta anyway
20:42 russ hi kados
20:43 russ looks like the list was busy over the weekend - "the weekend warriors"
20:44 kados hehe yea :-)
20:44 kados chris: $ perl misc/migration_tools/bulkmarcimport.pl -d -file /home/jmf/koha.mrc
20:44 kados ZOOM error 109 "Database unavailable" (addinfo: "kohatest") from diag-set 'Bib-1'
20:44 kados that's what I'm getting with latest cvs
20:45 chris and zebra is running?
20:46 kados yea ... here's the log entry for that transaction:
20:46 kados http://kados.org/zebra.txt
20:46 kados everything was working until I deleted all those Zconns yesterday
20:47 kados the Context.pm code does a basic search on 'mineral'
20:47 chris k
20:47 kados just to check that the server's alive
20:48 kados (note that in Z3950, even if there are no results, a search is considered successful)
20:48 chris yep
20:48 kados now strangely, I did a search on the error in the logs
20:48 kados and my name comes up :-)
20:48 kados apparantly I've had this problem before ... a long time ago
20:49 chris are you getting this in the logs too?
20:49 chris Fatal error, cant connect to z3950 serve
20:49 chris r
20:50 kados [Sun Feb 26 16:50:25 2006] [error] [client 70.104.108.241] ZOOM error 109 "Database unavailable" (addinfo: "kohatest") from diag-set 'Bib-1', referer: http://opactest.liblime.com/cg[…]ha/opac-search.pl
20:51 kados that's the only error I get in the log
20:52 chris righto
20:52 kados I put a little warn in new_Zconn
20:52 kados seems like it's getting called an awful lot
20:53 chris hmmm, so where is that error coming from
20:53 kados so maybe something's wrong with my Context.pm code (though it worked fine before I took out all those Zconns in Biblio.pm )
20:53 kados it happens in Context.pm I think
20:53 chris can you change Context.pm
20:53 chris in the bit where that error is printed
20:54 chris put "Context.pm new_zconn then whats there"
20:54 chris just so we can see where the error is being thrown
20:54 chris i think its  warn "Error ", $@->code(), ": ", $@->message(), "\n";
20:55 chris that line, but if we make it "Error new_Zconn", etc
20:55 chris will be easier to spot
20:55 kados k
20:57 kados yea, so that's not the problem
20:57 kados I changed the warn in there but I don't see it in the logs
20:57 chris right, i suspected it might be
20:57 chris so its connecting fine
20:58 chris so its erroring on the opac now eh?
20:58 kados if by fine you mean that it calls new_Zconn every time it does anything
20:58 kados yea, nothing works :(
20:58 kados i thought the connection should stick
20:58 chris so we want to check SearchMarc.pm
20:59 chris is that using C4::Context?
21:00 kados yep
21:00 kados also has a use ZOOM;
21:00 chris i meant to make the connection
21:00 chris i suspect its not unless you have changed it
21:00 kados and a :
21:00 kados my $Zconn = C4::Context->Zconn or die "unable to set Zconn";
21:00 chris hmm
21:00 kados I added that yesterday to replace your stuff
21:01 chris thats in Search.pm
21:01 chris which the opac doesnt use yet, it uses SearchMarc.pm
21:01 kados on my machine it's in SearchMarc.pm too ... unless I didn't commit that change yet
21:01 chris doesnt look like it
21:02 chris so where is this error coming from, we need to find the warn that is throwing this error
21:02 kados I think it's just a zebra diagnostic
21:02 chris then we might be able to figure out why
21:02 kados it thrown from within Context.pm
21:03 chris but we dont know where?
21:03 chris ahh i see
21:03 kados $rs=$Zconn->search_pqf('@attr 1=4 mineral');
21:03 chris the search is failing
21:03 kados that line
21:03 chris so its making a new connection
21:03 chris everytime
21:04 kados maybe some bad logic there?
21:04 chris and the search will fail from the opac too
21:04 kados (though why did it work before?)
21:04 chris dunno, its trying to use the wrong database it looks like
21:05 kados well ... db name hasn't changed in the conf file or on the server when I start it --
21:05 chris its odd, cos the search is what is failing
21:07 kados ok ... so first time through, there's no Zconn
21:07 kados so it does: $context->{"Zconn"} = &new_Zconn();
21:07 chris yep
21:07 chris then the search fails
21:07 kados yep
21:07 chris 16:43:24-26/02 zebrasrv(2) [request] Search ERROR 109 1 1+0 RPN: @attrset Bib-1 @attr 1=4 mineral
21:07 chris so it will try to make another one
21:07 kados yep
21:07 chris and if the search is failing im betting all the search's and updates fail too
21:08 kados yea, I first spotted this trying to bulkmarcimport
21:08 kados too bad, I was really proud of some of this code :/
21:08 chris the zebradb bit hasnt changed in the koha.conf bit?
21:08 kados nope
21:08 chris can we query the zebrasvr with another z3950 client?
21:09 kados yep
21:10 kados same error
21:10 chris hmm
21:10 kados $ yaz-client
21:10 chris so its not your code then
21:10 kados Z> open localhost:2100/kohatest
21:10 kados Z> find mineral
21:10 kados Diagnostic message(s) from database:
21:10 kados    [109] Database unavailable -- v2 addinfo 'kohatest'
21:10 chris for some reason zebra has forgotten about kohatest
21:11 kados I did upgrade zebra to the latest version ... but that was a few days ago I think
21:11 chris what happens if you go zebraidx create kohatest
21:12 chris (i presume it wont let you create a db if one already exists)
21:14 kados doesn't seem to care
21:14 kados can't start on the same port though
21:14 chris zebraidx?
21:14 chris does that need a port
21:15 kados no
21:15 kados I mean after I created kohatest
21:15 kados (in the same directory as the other kohatest)
21:15 kados !!
21:15 chris ahh, can you stop the one thats running
21:15 kados while the other one was running :-)
21:15 chris and start zebrasrv
21:15 chris and see if now it knows about kohatest
21:16 kados still no
21:16 chris weird
21:16 kados it's got to be in my code
21:16 kados cause it worked fine yesterday before I took out those Zconns
21:17 chris umm i dont think so
21:17 chris how come it doesnt work from yaz
21:17 chris and it does for me
21:17 kados good point
21:17 chris hris@wolf:~/koha/misc/zebra/usmarc$ yaz-client localhost:2100/koha3
21:17 kados what version of zebra are you running?
21:17 chris Z> find mineral
21:17 chris Sent searchRequest.
21:17 chris Received SearchResponse.
21:17 chris Search was a success.
21:17 chris Number of hits: 0, setno 1
21:17 kados and yaz
21:17 chris Version: Zebra 1.3.33/1.66/2.1.12
21:18 chris YAZ version: 2.0.30
21:18 chris YAZ DLL/SO: 2.1.12
21:18 kados # zebraidx -V
21:18 kados Zebra 1.3.34 $Date: 2006/02/23 13:29:41 $
21:18 kados YAZ version: 2.1.12
21:18 chris can you try this please
21:18 chris yaz-client localhost:2100
21:19 chris find mineral
21:19 chris (ie without the /kohatest)
21:19 kados yep
21:19 chris do you get
21:19 chris [109] Database unavailable -- v2 addinfo 'Default'
21:19 kados    [109] Database unavailable -- v2 addinfo 'Default'
21:19 kados yep
21:20 chris right
21:20 chris so it feels to me like zebra doesnt know anything about kohatest anymore
21:20 kados I've tried flushing it
21:20 kados zebraidx init
21:20 kados zebraidx update biblios
21:20 chris what happens if you stop zebrasrv
21:20 chris zebraidx delete kohatest
21:20 chris zebraidx create kohatest
21:21 chris then start zebrasrv again
21:21 kados same error
21:21 chris bizarre
21:21 chris your code seems to work here
21:22 kados can I downgrade with apt-get to 1.3.33?
21:22 chris and i can connect with yaz just fine
21:22 chris not easily no
21:22 kados maybe 1.3.34 is buggy
21:22 chris could be
21:22 kados my code working++
21:22 chris you could get the 1.3.33 deb file
21:22 chris and dpkg -i it
21:23 chris that should force a downgrade
21:23 kados k
21:23 kados I'll give that a shot
21:23 kados bugger
21:23 kados it's missing from the list!
21:23 kados there's a 1.3.32 but no 1.3.33
21:25 chris hmm lets try 32
21:25 chris its easy to get back up to 34 if it doesnt work
21:25 kados k
21:27 kados AARG ... same error
21:28 kados I did zebraidx delete kohatest, create kohatest, zebrasrv
21:28 chris damned if i know whats going on
21:28 chris how about
21:28 chris stop zebrasrv
21:29 chris zebraidx create testytest
21:29 chris start zebrasrv
21:29 chris (i dont think you have to stop it, but just being safe)
21:29 chris then
21:29 chris yaz-client localhost:2100/testytest
21:30 chris and find minerla
21:31 kados [109] Database unavailable -- v2 addinfo 'testtytest'
21:31 chris chris@wolf:~/koha/misc/zebra/usmarc$ zebraidx create testytest
21:31 kados aarg!
21:31 chris yaz-client localhost:2100/testytest
21:31 chris weird
21:31 kados I wonder if apt-get upgrade broke it
21:31 chris that worked just fine for me
21:32 chris 'testtytest' <--- typo ?
21:32 kados ooh ... nice get
21:32 kados yea, that worked
21:32 kados very strange
21:33 chris so its something odd with kohatest
21:33 chris i suspect if you change your koha.conf
21:33 chris to testytest
21:33 chris then your bulkmarcimport will work again
21:33 kados that's just nutty
21:33 chris yep
21:34 chris you would have thought the delete then recreate would have fixed it
21:34 chris well i thought it would have anyway
21:34 kados right
21:35 kados doesn't bode well for system stability
21:35 kados upgrade the system, rename your database (not to mention lose all the data)
21:35 kados we do need to find out how to do backups on zebra
21:38 chris yep
21:38 chris i wonder where its stores its files
21:38 kados everything is stored in the directory you run zebrasrv from
21:39 kados or one you specify in the zebra.cfg
21:39 chris interesting
21:39 chris the .mf files eh?
21:39 kados plus I added the shadow dir
21:41 chris i dont suppose it could be permissions problem
21:41 chris on any of those files?
21:42 chris mind you zebrasrv is probably running as root right?
21:42 kados hmmm
21:42 kados btw: I just got the error again
21:42 kados now with kohademo as the name
21:42 kados interesting point
21:42 kados let me try as root
21:45 kados weird
21:45 kados so as root:
21:45 kados zebraidx init
21:45 kados zebraidx update biblios
21:45 kados # zebrasrv localhost:2100/kohademo
21:45 kados perl misc/migration_tools/bulkmarcimport.pl -d -file /home/jmf/koha.mrc
21:46 kados Use of uninitialized value in subroutine entry at /usr/local/lib/perl/5.8.4/ZOOM.pm line 280.
21:46 kados Error Context.pm new_zconn10000: Connect failed
21:46 kados Fatal error, cant connect to z3950 server at C4/Context.pm line 448.
21:46 kados Compilation failed in require at misc/migration_tools/bulkmarcimport.pl line 11.
21:46 kados BEGIN failed--compilation aborted at misc/migration_tools/bulkmarcimport.pl line 11.
21:46 chris umm do you put that bit when you start the zebrasrv?
21:46 chris i never put the /bit
21:47 chris sudo zebrasrv localhost:2100
21:47 chris is all i do
21:47 kados huh
21:48 chris i only tell it the database on connect
21:48 kados ok ... I tried it your way ... same deal
21:48 kados now ... if I run bulkmarcimport as root
21:48 chris can you connect as yaz
21:48 kados ZOOM error 109 "Database unavailable" (addinfo: "kohademo") from diag-set 'Bib-1'
21:48 chris ah ha
21:49 kados nope
21:49 chris man
21:49 chris i have no idea what youve done :-)
21:49 kados hehe
21:49 chris can you check your zebra.cfg
21:49 chris and make sure
21:49 chris perm.anonymous: rw
21:49 chris is there
21:50 kados it is
21:50 chris well, thats all i had left to check
21:50 kados :-)
21:50 chris weird how it worked for testytest .. but not kohademo or kohatest
21:51 chris were they both existing db's?
21:51 kados no
21:51 kados never used kohademo before just now
21:51 chris so you did a zebraidx create kohademo ?
21:51 chris and now you can connect to it?
21:51 kados before our conversation I didn't even know about zebraidx create
21:51 chris can=cant
21:51 kados or zebraidx delete
21:52 chris how did you make kohatest i wonder?
21:52 kados I've been doing 'zebraidx init' then 'zebraidx update biblios' to create it
21:52 kados zebra creates it when zebrasrv starts IIRC
21:52 kados based on info in the zebra.cfg
21:52 chris hmm how does it know what name to give it?
21:52 kados it's in the zebra.cfg
21:52 kados database: zebrademo
21:53 chris can you try zebraidx create zebrademo
21:53 chris and then try yazzing to it
21:53 chris ahh and its drop
21:53 chris not delete
21:54 chris so if your zebraidx create kohademo works
21:54 chris then you could try
21:54 chris zebraidx drop kohatest
21:54 chris zebraidx create kohatest
21:54 kados huh
21:54 kados that's different
21:54 kados # perl misc/migration_tools/bulkmarcimport.p -file /home/jmf/koha.mrc I:0 at misc/migration_tools/bulkmarcimport.pl line 96.NUM:0 at misc/migration_tools/bulkmarcimport.pl line 97.Can't locate object method "field" via package "ZOOM::Connection" at C4/Biblio.pm line 766.
21:54 chris yep, can you yaz-client to it?
21:55 kados yea, that works
21:55 chris right i dont trust the init method :)
21:55 chris im not convinced its making databases right
21:55 chris yay so we are on to an error we can fix now
21:56 kados sounds right to me
21:56 kados yea, so the 'field' issue has to do with the record
21:56 chris that looks like you are passing a zconn
21:56 chris to it
21:56 kados this one is probably my problem
21:56 chris and its expecting a record
21:56 kados yea, could be
21:56 chris so its going hey, theres no fields in a zconn
21:57 kados hmmm
21:57 kados I don't think I"m passing it a Zconn
21:57 chris so whatever is calling it, still has a $Zconn in the call is my guess
21:58 chris hmm something is
21:58 kados I took all the Zconns out
21:59 chris id look at bulkmarcimport
22:00 chris line 165
22:00 chris still looks to be passing a zconn
22:00 chris which is then passed around inside Biblio.pm
22:00 kados hmmm
22:01 kados took it out, same error
22:01 chris hmm something is giving that subroutine a Zconn
22:01 chris NEWnewitem($dbh,$Zconn,$items[$i],$bibid);
22:01 chris is it this line?
22:01 kados hang on
22:01 chris 168
22:02 chris there appear to be quite a few in bulkmarcimport
22:02 kados yep, I forgot about those
22:02 kados took them out yesterday
22:02 kados but I think I reverted back to CVS version a bit ago
22:02 chris ahh that'd do it
22:02 kados ok ... working now ... yay!
22:02 chris yay
22:02 kados ok, I've got some stuff to commit then
22:02 kados before paul freaks :-)
22:02 chris ok so i suspect the trick is to use zebraidx create
22:02 chris to make databases
22:03 kados yep, sounds like it
22:03 chris you can call that routine from in ZOOM too
22:03 chris ie you can make dbs from zoom
22:03 kados yep
22:03 kados z3950_extended_services knows about it
22:03 kados the Biblio.pm routine
22:04 chris cool cos the upgrader/installer will want to do that
22:04 kados so you can go:
22:04 chris make the db, and set the value in koha.conf
22:04 kados z3950_extended_services('create',$serviceOptions);
22:04 kados too bad 'drop' doesn't work in Zebra
22:05 kados I put an error condition in z3950_extended_services until it does
22:05 chris cool
22:05 kados thanks for the help chris
22:07 chris np
22:12 kados ok ... now I'm back to troubleshooting what I wanted :-)
22:12 kados addbiblio.pl
22:13 kados in head (need to troubleshoot it in rel_2_2 also)
22:13 kados in head, when I go to modify a record it comes up blank in the record editor using the PROG templates
22:14 kados (did you modify with the PROG templates when you tested this?)
22:14 chris hmm nope it was working fine for me
22:14 chris lemme go check
22:15 kados maybe I need to updatedatabase
22:15 chris so you start here eh?
22:15 chris http://koha.koha3.katipo.co.nz[…]guing/addbooks.pl
22:15 kados looks like default framework is now being called "Default" not "" as in rel_2_2
22:16 kados comes up blank for me in yours too
22:17 chris weird im sure it didnt use to
22:17 chris ah well, wont be hard to fix
22:18 chris itll just be finding what the problem is
22:19 kados huh
22:19 chris i think the templates are the problem
22:19 kados updatedatabase is throwing some strange errors
22:19 chris http://koha.koha3.katipo.co.nz[…]dbiblionumber=101
22:20 chris nowhere in addbiblio.pl does it fetch oldbiblionumber
22:20 kados hmmm
22:20 kados I thought it did
22:20 chris not that i can find
22:20 kados if you're doing a modify
22:20 chris grep "oldbiblionumber" addbiblio.pl              
22:20 chris chris@wolf:~/koha/cataloguing$
22:20 chris nothing
22:21 chris theres my $biblionumber=$input->param('biblionumber');
22:21 chris but nothing with oldbiblionumber
22:21 chris 2 secs
22:21 kados nice
22:21 kados try this:
22:21 kados http://koha.koha3.katipo.co.nz[…]?biblionumber=101
22:21 kados working for me
22:22 chris yep
22:22 chris its a template problem
22:22 kados I'll change the template
22:22 chris it'll be for the additems and the duplicate as well i think
22:24 kados cripes, we've got lots of prog template probs
22:25 chris :)
22:26 kados if you're not super busy today, I could use some help on the MARChtml2marc routine in addbiblio.pl in rel_2_2
22:26 kados otherwise I can wait
22:27 chris thats a confusing chunk of code
22:27 kados yea ... I was actually thinking of a complete rewrite
22:27 kados since the new MARC::Record is much nicer
22:27 kados it's based on a very old MARC::Record
22:29 kados as far as I see, it doesnt' really do much
22:30 kados just takes the CGI objects and turns them into a MARC::Record object
22:30 chris hmm yeah
22:30 chris pretty much
22:30 kados no idea why it has to be so convoluted
22:30 kados plus it's kinda buggy
22:30 kados ie, creates blank subfields and tags in MARC::Record
22:30 kados ie, invalid MARC :-)
22:31 chris so it takes a list of tags
22:31 kados also not sure it can handle subfield repeatability
22:31 chris a list of subfields and a list of values
22:31 kados (the editor can't either)
22:31 kados (the interface I mean)
22:32 chris right
22:32 kados but for 2.2.6 I want to fix that blank value bug as well as allow subfield repeatability and reordering
22:32 chris i dont think it can but i may be reading it wrong
22:33 kados so we _finally_ have a valid MARC editor :-)
22:33 chris it loops thru the list of tags
22:34 chris creating fields, and adding them to the marc record
22:35 kados right ... except for the fixed fields and the leader
22:35 kados which it handles separately
22:35 chris yep
22:35 kados (course, there's a whole slew of new tools in MARC::Record for doing all of that in a much more sane way)
22:35 chris each time through it checks the tag to see if it was the same as the previous one
22:36 chris if it was, it adds some subfields
22:36 chris if its not, it adds the field to the marc::record and sets the prev tag to be the same
22:36 kados right
22:36 chris so what i dont get is
22:36 kados and if you have two 600s in a row
22:36 chris yeah
22:37 chris it goes bad
22:37 kados they come out of $rtags like this:
22:37 kados 600
22:37 kados ""
22:37 kados 600
22:37 chris ahhh
22:37 kados it doesn't go bad actually
22:37 chris so thats how he gets round it
22:37 kados but it does create a blank tag/subfield
22:37 chris thats a pretty naff work around
22:37 chris we must be injecting those blanks
22:38 chris so that we can separate the tags
22:38 kados yep
22:38 kados I tried checking for them, then passing if they were blank
22:39 kados but the way I wrote it it ended up overwriting the previous tag
22:39 kados (I think I was close though)
22:39 chris ahh
22:39 kados notice that it also creates blank subfields
22:39 kados so if the template has a place for 245 $c
22:39 kados it comes in as a ""
22:40 kados and that's why on my otherwise perfect chinese record
22:40 chris right
22:40 chris i think i see how to fix it
22:40 chris 2 secs
22:40 kados sweet, thx
22:45 chris ok
22:45 chris see this line
22:45 chris $indicators{@$rtags[$i]}.='  ';
22:48 kados yep
22:50 chris i think after that is where we want to put some code to jump to the next tag if the current one is blank
22:51 kados if (@$rtags eq "") {
22:51 kados is there a 'skip' condition?
22:51 chris set the prev tag to it, and dont do anything else
22:51 chris yep next
22:51 kados cool
22:51 chris so set prevtag
22:52 kados $indicators{@$rtags[$i]}.='  ';
22:52 kados                        if (@$rtags eq "") {
22:52 kados                        $prevtags=@$rtags;
22:52 kados                        next;
22:52 kados                        }
22:53 kados how's that?
22:53 chris umm not quite
22:53 kados prevtags is a typo, should be prevtag
22:53 chris $rtags->[$i];
22:53 chris you dont want to check the whole array
22:53 kados ah ... I knew that :-)
22:53 chris :)
22:54 chris same with prevtag
22:54 kados ?
22:54 kados prevtag doesn't look like an array to me
22:54 chris no but you are trying to set an array to it :)
22:54 chris so the if and the prevtag line need to be fixed
22:55 kados ahh ... right
22:55 kados heh
22:55 kados [Sun Feb 26 17:54:12 2006] [error] [client 70.104.108.241] Can't call method "add_subfields" on an undefined value at /var/www/liblime.com/koha/in​tranet/modules/C4/Biblio.pm line 1087., referer: http://koha.liblime.com/cgi-bi[…]ault&op=duplicate
22:56 chris oldbiblionumber again
22:56 chris gotta fix that
22:57 kados naw, this is rel_2_2
22:57 chris ahh so it was oldbiblionumber back then?
22:58 kados yea as far as I know
22:58 chris righto we must need something else then :)
22:58 kados well I'm getting called to a movie :-)
22:59 kados try again tomorrow? :-)
22:59 chris have fun ill take another look
22:59 kados thx ..

| Channels | #koha index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary