Yesterday, I took the plunge and installed 3.6.6 on a brand new install of Ubuntu 12.04 server. Everything went swimmingly well ('restored' an old Koha db, data conversion succeeded) until: koha@sandbox:/usr/share/koha/bin/migration_tools$ KOHA_CONF=/etc/koha/koha-conf.xml PERL5LIB=/usr/share/koha/lib perl rebuild_zebra.pl -b -r -v -x ........ Records exported: 37190 ==================== REINDEXING zebra ==================== zebraidx(1981) [warn] zebra_lock_create fail fname=/var/lock/koha/zebradb/biblios/norm..LCK [No such file or Directory] zebraidx(1981) [warn] zebra_lock_create fail fname=/var/lock/koha/zebradb/biblios/shadow..LCK [No such file or Directory] zebraidx(1981) [fatal] Could not select database biblios errCode=109 (repeated for pid 1982 and 1983) ==================== CLEANING ==================== koha@sandbox:/usr/share/koha/bin/migration_tools$ I find in the records, that Chris C. had addressed this in June 2011 "Your answer is here, you are missing those directories, you will need to create them and make sure they are writable by the user you run zebra as" and that Robin had followed up "There is a patch I need to write (that I did as a one-off on a laptop that was experiencing this issue) that I really need to submit that will prevent this occuring." Could someone please tell me what the patch might be? (and possibly point me to what and where to create?) For the record, when I installed 3.6.1 (our production machine) earlier this year, this error did not occur. The only slight difference [not relevant?] was that I used Ubuntu 11.10 (12.04 had not been released), and that this time I did install a memcache server prior to Koha (I installed it after Koha was running on the production box.) Thanks and br, Paul --- Maritime heritage and history, preservation and conservation, research and education through the written word and the arts. <http://NavalMarineArchive.com> and <http://UltraMarine.ca>
Op 23-07-12 21:29, Paul schreef:
I find in the records, that Chris C. had addressed this in June 2011 "Your answer is here, you are missing those directories, you will need to create them and make sure they are writable by the user you run zebra as" and that Robin had followed up "There is a patch I need to write (that I did as a one-off on a laptop that was experiencing this issue) that I really need to submit that will prevent this occuring."
The problem is that Ubuntu effectively clears the /var/lock directory on boot, which Debian doesn't do. The patch (which is in now, maybe it never made it into 3.6, I'm not sure) just creates /var/lock/(instancename)/... on boot. The bug for it is here: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4873 and it looks like it should be in 3.6 -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D
At 10:14 AM 7/24/2012 +0200, Robin Sheat wrote: [snip]
The problem is that Ubuntu effectively clears the /var/lock directory on boot, which Debian doesn't do. The patch (which is in now, maybe it never made it into 3.6, I'm not sure) just creates /var/lock/(instancename)/... on boot.
The bug for it is here: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4873 and it looks like it should be in 3.6
Thanks - I've had a quick look, comparing our production 3.6.1 on Ubuntu 11.04 and sandbox 3.6.6 (absolutely clean install, server and Koha) on Ubuntu 12.04 LTS. This is a show stopper at the moment, as zebra (idzebra-2.0) obviously is non-functional. a) both koha-common.init files have the bug4873 mod. They are both still in the "package" used during install, so how are they re-used on boot? (a 'find / -name' does not find them anywhere else) b) dir/file structure differs after boot 3.6.1: drwxrwxrwt 4 root root 80 2012-07-24 07:50 lock drwxr-xr-x 18 root root 620 2012-07-24 07:50 run lock has two dirs apache2 and koha run has a koha 3.6.6: lrwxrwxrwt 1 root root 9 May 29 17:37 lock -> /run/lock lrwxrwxrwt 1 root root 4 Jul 23 20:31 run -> /run lock has two dirs apache2 and lvm, but no koha run has no koha Note that the 2 dirs run and lock are time/dated from this morning (I rebooted), but the two links in 12.04 / 3.6.6 are dated not from today's reboot, but presumably from the Ubuntu ISO. I'm thinking of trying something along the lines of: sudo mkdir /run sudo mkdir /run/lock sudo mv /var/run/* /run sudo mv /var/lock/* /run/lock sudo rm -rf /var/run sudo rm -rf /var/lock sudo ln -s /run /var/run sudo ln -s /run/lock /var/lock and then copying the relevant run and lock 'koha' files from the production Koha system, but might screw up badly ;={ Where to next, please? Thanks and br, Paul
Op 24-07-12 17:26, Paul schreef:
a) both koha-common.init files have the bug4873 mod. They are both still in the "package" used during install, so how are they re-used on boot? (a 'find / -name' does not find them anywhere else)
It becomes /etc/init.d/koha-common when it's installed.
b) dir/file structure differs after boot
3.6.1: drwxrwxrwt 4 root root 80 2012-07-24 07:50 lock drwxr-xr-x 18 root root 620 2012-07-24 07:50 run lock has two dirs apache2 and koha run has a koha
3.6.6: lrwxrwxrwt 1 root root 9 May 29 17:37 lock -> /run/lock lrwxrwxrwt 1 root root 4 Jul 23 20:31 run -> /run lock has two dirs apache2 and lvm, but no koha run has no koha
I'm not sure what these are comparing. The Ubuntu boot process will create /var/run and /var/lock, it's out of Koha's hands. The init script should run koha-create-dirs however, which should create subdirs in that.
sudo mkdir /run sudo mkdir /run/lock sudo mv /var/run/* /run sudo mv /var/lock/* /run/lock sudo rm -rf /var/run sudo rm -rf /var/lock sudo ln -s /run /var/run sudo ln -s /run/lock /var/lock
That sounds like a really bad idea. Let your OS do what it does and work within that. Koha should be setting itself up to work within those links. If not, it's a bug and should be fixed.
and then copying the relevant run and lock 'koha' files from the production Koha system, but might screw up badly ;={
Noo. Lock and run files are temporary, transitive things. Often they contain a PID which _will_not_ travel between systems meaningfully.
Where to next, please?
Look in the init script, see if koha-create-dirs does what you need, if not, amend it to do so and submit a patch. -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D
At 05:35 PM 7/24/2012 +0200, Robin Sheat wrote:
Op 24-07-12 17:26, Paul schreef:
a) both koha-common.init files have the bug4873 mod. They are both still in the "package" used during install, so how are they re-used on boot? (a 'find / -name' does not find them anywhere else)
It becomes /etc/init.d/koha-common when it's installed.
Thanks for the reply. For me every day is a new learning experience. There is no 'koha-common' in /etc/init.d (nor anywhere else) on either the production machine or the sandbox. [All the 'koha-common*' files are still in the original Koha packages.]
Where to next, please?
Look in the init script, see if koha-create-dirs does what you need, if not, amend it to do so and submit a patch.
What I'm not understanding, is how the koha-create-dirs (in the install package, under /debian/scripts) can be called on *reboot*. It worked on install -- e.g. the /var/lib/koha has the correct idzebra dirs dated to the install date; the production machine has contents dated/timed today (cron job) but the new install are empty except README. This is why in my previous message I had mentioned:
3.6.1: drwxrwxrwt 4 root root 80 2012-07-24 07:50 lock drwxr-xr-x 18 root root 620 2012-07-24 07:50 run 3.6.6: lrwxrwxrwt 1 root root 9 May 29 17:37 lock -> /run/lock lrwxrwxrwt 1 root root 4 Jul 23 20:31 run -> /run
where for lock and run Ubuntu 12.04 is re-creating *links* on reboot and obviously not finding any "koha input" but the production machine is recreating *dirs* and finding "koha input" -- from where and how is what I'm trying to [unsuccessfully] find. Sorry to appear obtuse, but I'm missing something. And of course I'll try and submit a patch [if needed - this might be just plain stupidity on my part] when this is resolved, and add the Ubuntu 12.04 install to the Wiki pages - I've been keeping scrupulous notes (see <http://navalmarinearchive.com/research/koha_ubuntu.html>. Thanks - Paul --- Maritime heritage and history, preservation and conservation, research and education through the written word and the arts. <http://NavalMarineArchive.com> and <http://UltraMarine.ca>
Op 24-07-12 19:41, Paul schreef:
There is no 'koha-common' in /etc/init.d (nor anywhere else) on either the production machine or the sandbox. [All the 'koha-common*' files are still in the original Koha packages.]
Oh, I think I misunderstood. I had the impression that you were running from the Debian packages. If you are not, then these won't be all set up for you and you'll have to configure things manually. The patch that was referred to only applies to package installations, not git or tarball ones. I'm afraid that you'll have to work it on your own in that case (although I'd still recommend not changing the layout of system directories on your server, that's just asking for pain.) -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D
participants (2)
-
Paul -
Robin Sheat