IRC log for #koha, 2006-02-28

← Previous day | Today | Next day → | Search | Index

All times shown according to UTC.

Time 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 sorta anyway
20:42 russ hi kados
20:43 looks like the list was busy over the weekend - "the weekend warriors"
20:44 kados hehe yea :-)
20:44 chris: $ perl misc/migration_tools/bulkmarcimport.pl -d -file /home/jmf/koha.mrc
20:44 ZOOM error 109 "Database unavailable" (addinfo: "kohatest") from diag-set 'Bib-1'
20:44 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 http://kados.org/zebra.txt
20:46 everything was working until I deleted all those Zconns yesterday
20:47 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 (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 and my name comes up :-)
20:48 apparantly I've had this problem before ... a long time ago
20:49 chris are you getting this in the logs too?
20:49 Fatal error, cant connect to z3950 serve
20:49 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 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 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 it happens in Context.pm I think
20:53 chris can you change Context.pm
20:53 in the bit where that error is printed
20:54 put "Context.pm new_zconn then whats there"
20:54 just so we can see where the error is being thrown
20:54 i think its  warn "Error ", $@->code(), ": ", $@->message(), "\n";
20:55 that line, but if we make it "Error new_Zconn", etc
20:55 will be easier to spot
20:55 kados k
20:57 yea, so that's not the problem
20:57 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 so its connecting fine
20:58 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 yea, nothing works :(
20:58 i thought the connection should stick
20:58 chris so we want to check SearchMarc.pm
20:59 is that using C4::Context?
21:00 kados yep
21:00 also has a use ZOOM;
21:00 chris i meant to make the connection
21:00 i suspect its not unless you have changed it
21:00 kados and a :
21:00 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 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 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 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 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 so it does: $context->{"Zconn"} = &new_Zconn();
21:07 chris yep
21:07 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 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 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 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 Z> find mineral
21:10 Diagnostic message(s) from database:
21:10    [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 (i presume it wont let you create a db if one already exists)
21:14 kados doesn't seem to care
21:14 can't start on the same port though
21:14 chris zebraidx?
21:14 does that need a port
21:15 kados no
21:15 I mean after I created kohatest
21:15 (in the same directory as the other kohatest)
21:15 !!
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 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 cause it worked fine yesterday before I took out those Zconns
21:17 chris umm i dont think so
21:17 how come it doesnt work from yaz
21:17 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 Sent searchRequest.
21:17 Received SearchResponse.
21:17 Search was a success.
21:17 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 YAZ version: 2.0.30
21:18 YAZ DLL/SO: 2.1.12
21:18 kados # zebraidx -V
21:18 Zebra 1.3.34 $Date: 2006/02/23 13:29:41 $
21:18 YAZ version: 2.1.12
21:18 chris can you try this please
21:18 yaz-client localhost:2100
21:19 find mineral
21:19 (ie without the /kohatest)
21:19 kados yep
21:19 chris do you get
21:19 [109] Database unavailable -- v2 addinfo 'Default'
21:19 kados    [109] Database unavailable -- v2 addinfo 'Default'
21:19 yep
21:20 chris right
21:20 so it feels to me like zebra doesnt know anything about kohatest anymore
21:20 kados I've tried flushing it
21:20 zebraidx init
21:20 zebraidx update biblios
21:20 chris what happens if you stop zebrasrv
21:20 zebraidx delete kohatest
21:20 zebraidx create kohatest
21:21 then start zebrasrv again
21:21 kados same error
21:21 chris bizarre
21:21 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 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 and dpkg -i it
21:23 that should force a downgrade
21:23 kados k
21:23 I'll give that a shot
21:23 bugger
21:23 it's missing from the list!
21:23 there's a 1.3.32 but no 1.3.33
21:25 chris hmm lets try 32
21:25 its easy to get back up to 34 if it doesnt work
21:25 kados k
21:27 AARG ... same error
21:28 I did zebraidx delete kohatest, create kohatest, zebrasrv
21:28 chris damned if i know whats going on
21:28 how about
21:28 stop zebrasrv
21:29 zebraidx create testytest
21:29 start zebrasrv
21:29 (i dont think you have to stop it, but just being safe)
21:29 then
21:29 yaz-client localhost:2100/testytest
21:30 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 weird
21:31 kados I wonder if apt-get upgrade broke it
21:31 chris that worked just fine for me
21:32 'testtytest' <--- typo ?
21:32 kados ooh ... nice get
21:32 yea, that worked
21:32 very strange
21:33 chris so its something odd with kohatest
21:33 i suspect if you change your koha.conf
21:33 to testytest
21:33 then your bulkmarcimport will work again
21:33 kados that's just nutty
21:33 chris yep
21:34 you would have thought the delete then recreate would have fixed it
21:34 well i thought it would have anyway
21:34 kados right
21:35 doesn't bode well for system stability
21:35 upgrade the system, rename your database (not to mention lose all the data)
21:35 we do need to find out how to do backups on zebra
21:38 chris yep
21:38 i wonder where its stores its files
21:38 kados everything is stored in the directory you run zebrasrv from
21:39 or one you specify in the zebra.cfg
21:39 chris interesting
21:39 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 on any of those files?
21:42 mind you zebrasrv is probably running as root right?
21:42 kados hmmm
21:42 btw: I just got the error again
21:42 now with kohademo as the name
21:42 interesting point
21:42 let me try as root
21:45 weird
21:45 so as root:
21:45 zebraidx init
21:45 zebraidx update biblios
21:45 # zebrasrv localhost:2100/kohademo
21:45 perl misc/migration_tools/bulkmarcimport.pl -d -file /home/jmf/koha.mrc
21:46 Use of uninitialized value in subroutine entry at /usr/local/lib/perl/5.8.4/ZOOM.pm line 280.
21:46 Error Context.pm new_zconn10000: Connect failed
21:46 Fatal error, cant connect to z3950 server at C4/Context.pm line 448.
21:46 Compilation failed in require at misc/migration_tools/bulkmarcimport.pl line 11.
21:46 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 i never put the /bit
21:47 sudo zebrasrv localhost:2100
21:47 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 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 i have no idea what youve done :-)
21:49 kados hehe
21:49 chris can you check your zebra.cfg
21:49 and make sure
21:49 perm.anonymous: rw
21:49 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 were they both existing db's?
21:51 kados no
21:51 never used kohademo before just now
21:51 chris so you did a zebraidx create kohademo ?
21:51 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 zebra creates it when zebrasrv starts IIRC
21:52 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 database: zebrademo
21:53 chris can you try zebraidx create zebrademo
21:53 and then try yazzing to it
21:53 ahh and its drop
21:53 not delete
21:54 so if your zebraidx create kohademo works
21:54 then you could try
21:54 zebraidx drop kohatest
21:54 zebraidx create kohatest
21:54 kados huh
21:54 that's different
21:54 # 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 im not convinced its making databases right
21:55 yay so we are on to an error we can fix now
21:56 kados sounds right to me
21:56 yea, so the 'field' issue has to do with the record
21:56 chris that looks like you are passing a zconn
21:56 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 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 hmm something is
21:58 kados I took all the Zconns out
21:59 chris id look at bulkmarcimport
22:00 line 165
22:00 still looks to be passing a zconn
22:00 which is then passed around inside Biblio.pm
22:00 kados hmmm
22:01 took it out, same error
22:01 chris hmm something is giving that subroutine a Zconn
22:01 NEWnewitem($dbh,$Zconn,$items[$i],$bibid);
22:01 is it this line?
22:01 kados hang on
22:01 chris 168
22:02 there appear to be quite a few in bulkmarcimport
22:02 kados yep, I forgot about those
22:02 took them out yesterday
22:02 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 before paul freaks :-)
22:02 chris ok so i suspect the trick is to use zebraidx create
22:02 to make databases
22:03 kados yep, sounds like it
22:03 chris you can call that routine from in ZOOM too
22:03 ie you can make dbs from zoom
22:03 kados yep
22:03 z3950_extended_services knows about it
22:03 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 too bad 'drop' doesn't work in Zebra
22:05 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 addbiblio.pl
22:13 in head (need to troubleshoot it in rel_2_2 also)
22:13 in head, when I go to modify a record it comes up blank in the record editor using the PROG templates
22:14 (did you modify with the PROG templates when you tested this?)
22:14 chris hmm nope it was working fine for me
22:14 lemme go check
22:15 kados maybe I need to updatedatabase
22:15 chris so you start here eh?
22:15 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 comes up blank for me in yours too
22:17 chris weird im sure it didnt use to
22:17 ah well, wont be hard to fix
22:18 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 nowhere in addbiblio.pl does it fetch oldbiblionumber
22:20 kados hmmm
22:20 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@wolf:~/koha/cataloguing$
22:20 nothing
22:21 theres my $biblionumber=$input->param('biblionumber');
22:21 but nothing with oldbiblionumber
22:21 2 secs
22:21 kados nice
22:21 try this:
22:21 http://koha.koha3.katipo.co.nz[…]?biblionumber=101
22:21 working for me
22:22 chris yep
22:22 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 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 since the new MARC::Record is much nicer
22:27 it's based on a very old MARC::Record
22:29 as far as I see, it doesnt' really do much
22:30 just takes the CGI objects and turns them into a MARC::Record object
22:30 chris hmm yeah
22:30 pretty much
22:30 kados no idea why it has to be so convoluted
22:30 plus it's kinda buggy
22:30 ie, creates blank subfields and tags in MARC::Record
22:30 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 (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 creating fields, and adding them to the marc record
22:35 kados right ... except for the fixed fields and the leader
22:35 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 if it was, it adds some subfields
22:36 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 it goes bad
22:37 kados they come out of $rtags like this:
22:37 600
22:37 ""
22:37 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 we must be injecting those blanks
22:38 so that we can separate the tags
22:38 kados yep
22:38 I tried checking for them, then passing if they were blank
22:39 but the way I wrote it it ended up overwriting the previous tag
22:39 (I think I was close though)
22:39 chris ahh
22:39 kados notice that it also creates blank subfields
22:39 so if the template has a place for 245 $c
22:39 it comes in as a ""
22:40 and that's why on my otherwise perfect chinese record
22:40 chris right
22:40 i think i see how to fix it
22:40 2 secs
22:40 kados sweet, thx
22:45 chris ok
22:45 see this line
22:45 $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 is there a 'skip' condition?
22:51 chris set the prev tag to it, and dont do anything else
22:51 yep next
22:51 kados cool
22:51 chris so set prevtag
22:52 kados $indicators{@$rtags[$i]}.='  ';
22:52                        if (@$rtags eq "") {
22:52                        $prevtags=@$rtags;
22:52                        next;
22:52                        }
22:53 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 you dont want to check the whole array
22:53 kados ah ... I knew that :-)
22:53 chris :)
22:54 same with prevtag
22:54 kados ?
22:54 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 so the if and the prevtag line need to be fixed
22:55 kados ahh ... right
22:55 heh
22:55 [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 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 try again tomorrow? :-)
22:59 chris have fun ill take another look
22:59 kados thx ..

← Previous day | Today | Next day → | Search | Index

koha1