[Koha] on reboot Ubuntu deletes /var/run files and directories -> FIXED = start Zebra server on daemon mode

Pseudo Admin sayanslib at gmail.com
Thu Apr 24 13:19:24 NZST 2008


Hi!

I dont't know if this happens to anyone using Ubuntu, but to avoid
confusion  I would like to report my experience  regarding this matter,
hoping it  could help someone who is baffled (as I was) with the missing
files and directories under /var/run after rebooting.

Issuing this command to start the Zebra server :  *sudo zebrasrv -f
/etc/koha/koha-conf.xml*

produces the error:

  *08:25:25-23/04 [fatal] lock file
/var/lock/koha/zebradb/biblios/zebrasrv.pid [No such file or directory]*

Fortunately this has been fixed (Thanks!  Galen) with a  patch to
koha-zebra-ctl.sh to create the subdirectories under /var/run if needed.

However, running the same command again (*sudo zebrasrv -f
/etc/koha/koha-conf.xml*) still produces the same error*
*
To prevent this from happening I followed the instruction on how to run
Zebra in daemon mode. This will use the patched koha-zebra-ctl.sh that will
create the subdirectories under /var/run if needed*

**Option 2: run the Zebra processes as daemons, and add to startup process:

Note that references to $SCRIPT_DIR refer to the directory where
Koha's command-line scripts are installed, e.g., /usr/share/koha/bin.

    Zebra Server:
    $ sudo ln -s ${SCRIPT_DIR}/koha-zebra-ctl.sh
/etc/init.d/koha-zebra-daemon
    (Note: ${SCRIPT_DIR} is /usr/share/koha/bin/ by default in a standard
install)
    $ sudo update-rc.d koha-zebra-daemon defaults
    ( Note: see man chkconfig(8) on other distros )

    $ sudo ${SCRIPT_DIR}/koha-zebra-ctl.sh start

    Zebraqueue Daemon:
    $ sudo ln -s ${SCRIPT_DIR}/koha-zebraqueue-ctl.sh
/etc/init.d/koha-zebraqueue-daemon
    $ sudo update-rc.d koha-zebraqueue-daemon defaults
    ( Note: see man chkconfig(8) on other distros )

    $ sudo ${SCRIPT_DIR}/koha-zebraqueue-ctl.sh start

*Since Zebra server now runs in daemon mode, and added to the startup
process, the problem on missing files and subdirectories under /var/run on
reboot, on Ubuntu, is fixed.
*
Thanks!

Mon
*

 ----------------------------------------------------------------------

> Message: 1
> Date: Tue, 22 Apr 2008 23:30:12 -0400
> From: "Pseudo Admin" <sayanslib at gmail.com>
> Subject: [Koha] On reboot Ubuntu deletes /var/run files and
>        directories
> To: koha at lists.katipo.co.nz
> Message-ID:
>        <a2f7ffb0804222030mf3b4acbo12bf678d8f484f6a at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On reboot Ubuntu deletes /var/run files and directories causing this error
> when running zebra :
>
>  *08:25:25-23/04 [fatal] lock file
> /var/lock/koha/zebradb/biblios/zebrasrv.pid [No such file or directory]
> *
> A search on Google led me to this post on koha-dev:
>
> *On 2/13/08, Chadwick, John, DCA <john.chadwick at ...> wrote:
> > We have had this problem with Koha 3 on Ubuntu. After doing a great deal
> > of research, it seems that Ubuntu (and probably other OS systems) treat
> > directories in /var/run and /var/lock as temp directories and each time
> > the machine reboots, the directories disappear on us.
> *
>
> *Yes, as I just found on closer inspection of the FHS documentation
> [1], files in /var/run are supposed to be deleted or truncated at
> boot.  Debian Etch clears files but leaves the subdirectories in
> place, but Ubuntu and other systems that either mount /var/run as a
> tempfs or are are aggressive about clearing /var/run get rid of the
> subdirectories at boot.*
>
> *Consequently, I will patch koha-zebra-ctl.sh to create the
> subdirectories under /var/run if needed.*
>
> *[1]
> http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA*
>
> *Regards,*
>
> *Galen*
>
> I was just wondering what is the status of this fix ? Is it already
> included
> in Koha 3b2?
>
> Thanks!



> ------------------------------
>
> Message: 4
> Date: Wed, 23 Apr 2008 06:32:54 -0500
> From: "Galen Charlton" <galen.charlton at liblime.com>
> Subject: Re: [Koha] On reboot Ubuntu deletes /var/run files and
>        directories
> To: "Pseudo Admin" <sayanslib at gmail.com>
> Cc: koha at lists.katipo.co.nz
> Message-ID:
>        <4659947d0804230432o7eecd7d2r2c71a9d4eaf7d194 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi,
>
> On Tue, Apr 22, 2008 at 10:30 PM, Pseudo Admin <sayanslib at gmail.com>
> wrote:
> > I was just wondering what is the status of this fix ? Is it already
> included
> > in Koha 3b2?
>
> Yes, it is.
>
> Regards,
>
> Galen
> --
> Galen Charlton
> Koha Application Developer
> LibLime
> galen.charlton at liblime.com
> p: 1-888-564-2457 x709
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.katipo.co.nz/pipermail/koha/attachments/20080423/7993c32c/attachment.htm 


More information about the Koha mailing list