Re: [Koha-devel] 3.18 zebra
Looks like `koha-start-zebra k318` is one of the command-line tools provided by the koha-common package. I'm guessing the recommended way to use this too is to run it as root, and it will then sudo to the k318-koha user to perform the task inside the tool. Seems there is an error in zebra though. There should be a way to start zebra with more logging, but I'm not that familiar with the command-line tools. Hopefully someone else knows more... On Wed, Jan 21, 2015 at 11:42 AM, Paul A pau...@navalmarinearchive.com wrote: Please bear with me -- I had no luck sorting out my search speed problem, so did a packet apt-get remove, install (not purge.) All went extremely well, OPAC reported under maintenance, staff admin (logging in with install name) upgraded the 3.05 database (new as requested by /usr/share/koha/k318-db-request.txt), and both sites are delivering proper pages through Apache (prefork+itk.) But I have a problem with Zebra. Does 'instancename-koha' really have to be a sudoer? If there's a possible quick fix I'll try it, if not I'll start over. k318-koha@hood:/usr/sbin$ koha-start-zebra k318 Invalid option: --user (only works for root) /.../ Starting Zebra server for k318 Invalid option: --user (only works for root) /.../ Something went wrong starting Zebra for k318. k318-koha is a valid user (non sudoer) with pw generated by Koha. I can start Zebra as root, no problem, but then: k318-koha@hood:/usr/sbin$ koha-rebuild-zebra -v -f k318 [N.B. not 'sudo'] k318-koha is not in the sudoers file. This incident will be reported. Something went wrong rebuilding biblio indexes for k318 and I have *not* tried reindexing as root -- ISTR dire warnings not to do so on this list :) I've looked at Bug 13396 and koha-conf.xml complies. I've tried sudo service koha-common restart * Restarting Koha ILS koha-common /.../ Zebra already stopped for instance k318. SIP server for k318 not running. * Error: Indexer not running for k318 zebra-error log reports: 20150121 12:49:39 k318-koha-zebra: client (pid 2132) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2133) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2134) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2135) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2136) exited with 1 status 20150121 12:49:39 k318-koha-zebra: terminating too quickly, waiting 30 seconds but I'm not sure where '-zebra' gets concatenated to the user. Many thanks -- Paul ___ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/ ___ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-devel] 3.18 zebra
Please bear with me -- I had no luck sorting out my search speed problem, so did a packet apt-get remove, install (not purge.) All went extremely well, OPAC reported under maintenance, staff admin (logging in with install name) upgraded the 3.05 database (new as requested by /usr/share/koha/k318-db-request.txt), and both sites are delivering proper pages through Apache (prefork+itk.) But I have a problem with Zebra. Does 'instancename-koha' really have to be a sudoer? If there's a possible quick fix I'll try it, if not I'll start over. k318-koha@hood:/usr/sbin$ koha-start-zebra k318 Invalid option: --user (only works for root) /.../ Starting Zebra server for k318 Invalid option: --user (only works for root) /.../ Something went wrong starting Zebra for k318. k318-koha is a valid user (non sudoer) with pw generated by Koha. I can start Zebra as root, no problem, but then: k318-koha@hood:/usr/sbin$ koha-rebuild-zebra -v -f k318 [N.B. not 'sudo'] k318-koha is not in the sudoers file. This incident will be reported. Something went wrong rebuilding biblio indexes for k318 and I have *not* tried reindexing as root -- ISTR dire warnings not to do so on this list :) I've looked at Bug 13396 and koha-conf.xml complies. I've tried sudo service koha-common restart * Restarting Koha ILS koha-common /.../ Zebra already stopped for instance k318. SIP server for k318 not running. * Error: Indexer not running for k318 zebra-error log reports: 20150121 12:49:39 k318-koha-zebra: client (pid 2132) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2133) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2134) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2135) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2136) exited with 1 status 20150121 12:49:39 k318-koha-zebra: terminating too quickly, waiting 30 seconds but I'm not sure where '-zebra' gets concatenated to the user. Many thanks -- Paul ___ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Re: [Koha-devel] 3.18 zebra
Ok, I've poked around a bit with the scripts now. Looks like the few command-line tools I looked at expect to be run as root. The zebra logging level is hard coded in koha-start-zebra as 'none,fatal,warn' which should be sufficient. You probably already know that the zebra error log is /var/log/koha/k318/zebra-error.log You may have to edit that script to change the zebra logging level, looks like the value for verbose logging is 'none,fatal,warn,all' or at least that's the case for zebraidx. I expect zebrasrv to be the same. I was wondering about file-system permissions, but as long as koha-start-zebra is run as root it takes care of that. The 'Indexer not running' error refers to the rebuild_zebra.pl script, which is started as a daemon by the koha-indexer command-line tool. So there may also be some error in there somewhere. It's log is /var/log/koha/k318/indexer-error.log Hope that info helps. On Wed, Jan 21, 2015 at 1:02 PM, Michael Hafen michael.ha...@washk12.org wrote: Looks like `koha-start-zebra k318` is one of the command-line tools provided by the koha-common package. I'm guessing the recommended way to use this too is to run it as root, and it will then sudo to the k318-koha user to perform the task inside the tool. Seems there is an error in zebra though. There should be a way to start zebra with more logging, but I'm not that familiar with the command-line tools. Hopefully someone else knows more... On Wed, Jan 21, 2015 at 11:42 AM, Paul A pau...@navalmarinearchive.com wrote: Please bear with me -- I had no luck sorting out my search speed problem, so did a packet apt-get remove, install (not purge.) All went extremely well, OPAC reported under maintenance, staff admin (logging in with install name) upgraded the 3.05 database (new as requested by /usr/share/koha/k318-db-request.txt), and both sites are delivering proper pages through Apache (prefork+itk.) But I have a problem with Zebra. Does 'instancename-koha' really have to be a sudoer? If there's a possible quick fix I'll try it, if not I'll start over. k318-koha@hood:/usr/sbin$ koha-start-zebra k318 Invalid option: --user (only works for root) /.../ Starting Zebra server for k318 Invalid option: --user (only works for root) /.../ Something went wrong starting Zebra for k318. k318-koha is a valid user (non sudoer) with pw generated by Koha. I can start Zebra as root, no problem, but then: k318-koha@hood:/usr/sbin$ koha-rebuild-zebra -v -f k318 [N.B. not 'sudo'] k318-koha is not in the sudoers file. This incident will be reported. Something went wrong rebuilding biblio indexes for k318 and I have *not* tried reindexing as root -- ISTR dire warnings not to do so on this list :) I've looked at Bug 13396 and koha-conf.xml complies. I've tried sudo service koha-common restart * Restarting Koha ILS koha-common /.../ Zebra already stopped for instance k318. SIP server for k318 not running. * Error: Indexer not running for k318 zebra-error log reports: 20150121 12:49:39 k318-koha-zebra: client (pid 2132) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2133) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2134) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2135) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2136) exited with 1 status 20150121 12:49:39 k318-koha-zebra: terminating too quickly, waiting 30 seconds but I'm not sure where '-zebra' gets concatenated to the user. Many thanks -- Paul ___ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/ ___ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Re: [Koha-devel] 3.18 zebra
Michael, Thank you, I'm on the same track, but being a little bit cautious. Since the packages were introduced (and I have not yet used them in production) a number of warnings have been expressed (e.g. one of our esteemed developers wrote 20-Aug-2013: Because the packages put koha-common in /etc/cron.d that does the indexing. The fact you have reindexed as root will have mucked up all sorts of permissions, including breaking this cron job.) So what I have been trying to do is imitate the cron job (that is obviously not running as intended.) Basically after env. vars it is: */5 * * * * root test -x /usr/sbin/koha-rebuild-zebra koha-rebuild-zebra -q $(koha-list --enabled) I was questioning the 'root' (which may in itself be fairly normal for cron jobs) which seems to go against previous advice. The 'test -x' is taken care of (the file does exist), -q defaults to bibs and auths but with no verbosity, so 'koha-rebuild-zebra -v -f k318' seems like a reasonable command line. It's just a question of 'who' does it, and with 'what permissions.' The zebra logs seem to be working OK, but I do not have 'indexer-error.log' anywhere on the system. Best -- Paul At 01:27 PM 1/21/2015 -0700, you wrote: Ok, I've poked around a bit with the scripts now. Looks like the few command-line tools I looked at expect to be run as root. The zebra logging level is hard coded in koha-start-zebra as 'none,fatal,warn' which should be sufficient. You probably already know that the zebra error log is /var/log/koha/k318/zebra-error.log You may have to edit that script to change the zebra logging level, looks like the value for verbose logging is 'none,fatal,warn,all' or at least that's the case for zebraidx. I expect zebrasrv to be the same. I was wondering about file-system permissions, but as long as koha-start-zebra is run as root it takes care of that. The 'Indexer not running' error refers to the http://rebuild_zebra.plrebuild_zebra.pl script, which is started as a daemon by the koha-indexer command-line tool. So there may also be some error in there somewhere. It's log is /var/log/koha/k318/indexer-error.log Hope that info helps. On Wed, Jan 21, 2015 at 1:02 PM, Michael Hafen mailto:michael.ha...@washk12.orgmichael.ha...@washk12.org wrote: Looks like `koha-start-zebra k318` is one of the command-line tools provided by the koha-common package. I'm guessing the recommended way to use this too is to run it as root, and it will then sudo to the k318-koha user to perform the task inside the tool. Seems there is an error in zebra though. There should be a way to start zebra with more logging, but I'm not that familiar with the command-line tools. Hopefully someone else knows more... On Wed, Jan 21, 2015 at 11:42 AM, Paul A mailto:pau...@navalmarinearchive.compau...@navalmarinearchive.com wrote: Please bear with me -- I had no luck sorting out my search speed problem, so did a packet apt-get remove, install (not purge.) All went extremely well, OPAC reported under maintenance, staff admin (logging in with install name) upgraded the 3.05 database (new as requested by /usr/share/koha/k318-db-request.txt), and both sites are delivering proper pages through Apache (prefork+itk.) But I have a problem with Zebra. Does 'instancename-koha' really have to be a sudoer? If there's a possible quick fix I'll try it, if not I'll start over.     k318-koha@hood:/usr/sbin$ koha-start-zebra k318     Invalid option: --user (only works for root)     /.../     Starting Zebra server for k318     Invalid option: --user (only works for root)     /.../     Something went wrong starting Zebra for k318. k318-koha is a valid user (non sudoer) with pw generated by Koha. I can start Zebra as root, no problem, but then:     k318-koha@hood:/usr/sbin$ koha-rebuild-zebra -v -f k318 [N.B. not 'sudo']     k318-koha is not in the sudoers file. This incident will be reported.     Something went wrong rebuilding biblio indexes for k318 and I have *not* tried reindexing as root -- ISTR dire warnings not to do so on this list :) I've looked at Bug 13396 and koha-conf.xml complies. I've tried sudo service koha-common restart     * Restarting Koha ILS koha-common     /.../ Zebra already stopped for instance k318.     SIP server for k318 not running.     * Error: Indexer not running for k318 zebra-error log reports: 20150121 12:49:39 k318-koha-zebra: client (pid 2132) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2133) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2134) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2135) exited with 1 status 20150121 12:49:39 k318-koha-zebra: client (pid 2136) exited with 1 status 20150121 12:49:39 k318-koha-zebra: terminating too quickly, waiting 30 seconds but I'm not
Re: [Koha-devel] 3.18 zebra
At 10:46 AM 1/22/2015 +1300, Robin Sheat wrote: Paul A schreef op wo 21-01-2015 om 13:42 [-0500]: But I have a problem with Zebra. Does 'instancename-koha' really have to be a sudoer? If there's a possible quick fix I'll try it, if not I'll start over. [snip] Instead, be your normal user, and use sudo to run the scripts. Like the documentation says to. Thanks Robin -- done (as 'paul', sudoer; not as k318-koha, non-sudoer.) It reindexed biblios and auths, exporting all 60,000 with no error messages. However, neither OPAC (Results of search for 'kw,wrdl: smith' No results found! No results found for that in NMA catalog) nor staff-admin (No results match your search for 'kw,wrdl: smith' in NMA Catalog) can find anything ... Best -- Paul ___ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Re: [Koha-devel] 3.18 zebra
Paul A schreef op wo 21-01-2015 om 16:21 [-0500]: Because the packages put koha-common in /etc/cron.d that does the indexing. The fact you have reindexed as root will have mucked up all sorts of permissions, including breaking this cron job.) That's what happens when you reindex as root, yes. However, it's not what happens when you use koha-rebuild-zebra as root, it's what happens when you run /usr/share/koha/bin/migration_tools/rebuild_zebra.pl, because it doesn't know about the packages. I was questioning the 'root' (which may in itself be fairly normal for cron jobs) which seems to go against previous advice. It doesn't. koha-rebuild-zebra is smart enough to know what user to do the indexing as, and change appropriately. Let it do its job. It potentially has to rebuild the indices of many koha instances. It can't do that if you don't run it as root. We put root in there for a reason, we know what we're doing. It's just a question of 'who' does it, and with 'what permissions.' No, it's not. It knows what it's doing. You're trying to second guess it, and that's why things aren't working. -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF signature.asc Description: This is a digitally signed message part ___ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Re: [Koha-devel] 3.18 zebra
At 11:55 AM 1/22/2015 +1300, you wrote: Paul A schreef op wo 21-01-2015 om 17:10 [-0500]: However, neither OPAC (Results of search for 'kw,wrdl: smith' No results found! No results found for that in NMA catalog) nor staff-admin (No results match your search for 'kw,wrdl: smith' in NMA Catalog) can find anything ... First thing to try: sudo service koha-common restart Thanks Robin, paul@hood:/usr/sbin$ sudo service koha-common restart * Restarting Koha ILS koha-common Stopping Zebra server for k318 SIP server for k318 not running. * Error: Indexer not running for k318 [fail] So, then it bounced me around looking for indexer, SIP server and Zebra, which all appear to start, but service koha-common restart doesn't appear to want to play: paul@hood:/usr/sbin$ sudo koha-indexer --start k318 * Starting Koha indexing daemon for k318 paul@hood:/usr/sbin$ sudo koha-start-sip k318 Starting SIP server for k318 paul@hood:/usr/sbin$ sudo koha-start-zebra k318 Starting Zebra server for k318 paul@hood:/usr/sbin$ sudo service koha-common restart * Restarting Koha ILS koha-common Zebra already stopped for instance k318. SIP server for k318 not running. * Error: Indexer not running for k318 [fail] Best and again thanks -- Paul --- Paul Adamthwaite, Ph.D., Executive Director --- Canadian Society of Marine Artists 205, Main Street, Picton, Ontario, K0K 2T0, Canada Telephone: 1 613 476 1177 E-mail: i...@ultramarine.ca Web: http://www.ultramarine.ca Dedicated to Canadian marine art. ___ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Re: [Koha-devel] 3.18 zebra
Paul A schreef op wo 21-01-2015 om 18:53 [-0500]: So, then it bounced me around looking for indexer, SIP server and Zebra, which all appear to start, but service koha-common restart doesn't appear to want to play: You probably don't want the indexer at this stage. By default, it's not enabled (specified in /etc/default/koha-common), though I can't remember exactly what version that came in on. You just want to make sure that zebra is correctly running. Ignore the indexer as that's not your issue here, your problem is with searching, not indexing. You never tested searching, so for all we know it's better now. If zebra is failing to start, you'll have to figure out why. -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF signature.asc Description: This is a digitally signed message part ___ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Re: [Koha-devel] 3.18 zebra
Paul A schreef op wo 21-01-2015 om 17:10 [-0500]: However, neither OPAC (Results of search for 'kw,wrdl: smith' No results found! No results found for that in NMA catalog) nor staff-admin (No results match your search for 'kw,wrdl: smith' in NMA Catalog) can find anything ... First thing to try: sudo service koha-common restart -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF signature.asc Description: This is a digitally signed message part ___ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Re: [Koha-devel] 3.18 zebra
Paul A schreef op wo 21-01-2015 om 20:36 [-0500]: k318-ko+ 1285 0.0 0.0 114000 5532 ?S19:47 0:00 \_ zebrasrv -v none,fatal,warn -f /etc/koha/sites/k318/koha-conf.xml OK, so it is running. I have no clue as to user k318-ko+ That's just a truncation of the username. nor where --name=k318-koha-zebra came from. It's just a name, to prevent the same thing being started twice. koha-conf.xml has (for both bibs and auths, created by the install process): userk318-koha/user password2YTEGxbk/password HOWEVER -- I have just (since reboot) found in zebra-output.log Failed to bind to unix:/var/run/koha/zebradb/bibliosocket [No such file or directory] and the same for authority socket. That's suspect. Have you messed with the configuration? It should be creating the sockets in /var/run/koha/instancename/bibliosocket, etc. This is defined in the listen sections near the top of koha-conf.xml. There is no file at all by that name on this box, but a quick look at our production box finds symbolic links at /run/koha/zebradb/ (but no file by that name.) /run is not necessarily equal to /var/run. On the server I just checked, /run doesn't exist at all. -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF signature.asc Description: This is a digitally signed message part ___ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Re: [Koha-devel] 3.18 zebra
At 01:33 PM 1/22/2015 +1300, Robin Sheat wrote: Paul A schreef op wo 21-01-2015 om 18:53 [-0500]: So, then it bounced me around looking for indexer, SIP server and Zebra, which all appear to start, but service koha-common restart doesn't appear to want to play: [snip] You just want to make sure that zebra is correctly running. Ignore the indexer as that's not your issue here, your problem is with searching, not indexing. You never tested searching, so for all we know it's better now. If zebra is failing to start, you'll have to figure out why. It is starting/running. Just rebooted the box (end of the day for me, but I appreciate you're the other side of the timezones) and $ ps -faux gives 2 entries: k318-ko+ 1283 0.0 0.0 17176 404 ?S19:47 0:00 daemon --name=k318-koha-zebra ---errlog=/var/log/koha/k318/zebra-error.log --stdout=/var/log/koha/k318/zebra.log --output=/var/log/koha/k318/zebra-output.log --verbose=1 --respawn --delay=30 --user=k318-koha.k318-koha -- zebrsrv -v none,fatal,warn -f /etc/koha/sites/k318/koha-conf.xml k318-ko+ 1285 0.0 0.0 114000 5532 ?S19:47 0:00 \_ zebrasrv -v none,fatal,warn -f /etc/koha/sites/k318/koha-conf.xml I have no clue as to user k318-ko+ nor where --name=k318-koha-zebra came from. koha-conf.xml has (for both bibs and auths, created by the install process): userk318-koha/user password2YTEGxbk/password HOWEVER -- I have just (since reboot) found in zebra-output.log Failed to bind to unix:/var/run/koha/zebradb/bibliosocket [No such file or directory] and the same for authority socket. There is no file at all by that name on this box, but a quick look at our production box finds symbolic links at /run/koha/zebradb/ (but no file by that name.) Can you tell me please how these are spawned? Maybe if I chase this down, I can get back to my search speed testing ... Thanks again -- Paul ___ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/