<div class="gmail_quote"><div>Hi!<br></div><div> <br><meta http-equiv="content-type" content="text/html;charset=UTF-8"><title></title>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.<br><br><style type="text/css">
<!--
#toc,
.toc,
.mw-warning {
        border: 1px solid #aaa;
        background-color: #f9f9f9;
        padding: 5px;
        font-size: 95%;
}
#toc h2,
.toc h2 {
        display: inline;
        border: none;
        padding: 0;
        font-size: 100%;
        font-weight: bold;
}
#toc #toctitle,
.toc #toctitle,
#toc .toctitle,
.toc .toctitle {
        text-align: center;
}
#toc ul,
.toc ul {
        list-style-type: none;
        list-style-image: none;
        margin-left: 0;
        padding-left: 0;
        text-align: left;
}
#toc ul ul,
.toc ul ul {
        margin: 0 0 0 2em;
}
#toc .toctoggle,
.toc .toctoggle {
        font-size: 94%;
}@media print, projection, embossed {
        body {
                padding-top:1in;
                padding-bottom:1in;
                padding-left:1in;
                padding-right:1in;
        }
}
body {
        font-family:'Times New Roman';
        color:#000000;
        widows:2;
        font-style:normal;
        text-indent:0in;
        font-variant:normal;
        font-size:12pt;
        text-decoration:none;
        font-weight:normal;
        text-align:left;
}
table {
}
td {
        border-collapse:collapse;
        text-align:left;
        vertical-align:top;
}
--></style>Issuing this command to start the Zebra server :
<i>sudo zebrasrv -f /etc/koha/koha-conf.xml</i><div><p>produces the error:<br></p><p>
<meta http-equiv="content-type" content="text/html;charset=UTF-8"><title></title>
<style type="text/css">
<!--
#toc,
.toc,
.mw-warning {
        border: 1px solid #aaa;
        background-color: #f9f9f9;
        padding: 5px;
        font-size: 95%;
}
#toc h2,
.toc h2 {
        display: inline;
        border: none;
        padding: 0;
        font-size: 100%;
        font-weight: bold;
}
#toc #toctitle,
.toc #toctitle,
#toc .toctitle,
.toc .toctitle {
        text-align: center;
}
#toc ul,
.toc ul {
        list-style-type: none;
        list-style-image: none;
        margin-left: 0;
        padding-left: 0;
        text-align: left;
}
#toc ul ul,
.toc ul ul {
        margin: 0 0 0 2em;
}
#toc .toctoggle,
.toc .toctoggle {
        font-size: 94%;
}@media print, projection, embossed {
        body {
                padding-top:1in;
                padding-bottom:1in;
                padding-left:1in;
                padding-right:1in;
        }
}
body {
        font-weight:normal;
        font-family:'Times New Roman';
        color:#000000;
        widows:2;
        font-style:normal;
        text-indent:0in;
        text-align:left;
        font-variant:normal;
        text-decoration:none;
        font-size:12pt;
}
table {
}
td {
        border-collapse:collapse;
        text-align:left;
        vertical-align:top;
}
-->
</style>
</p><div>
<p><i>08:25:25-23/04 [fatal] lock file /var/lock/koha/zebradb/biblios/zebrasrv.pid [No such file or directory]</i></p><p>Fortunately this has been fixed (Thanks! Galen) with a patch to koha-zebra-ctl.sh to create the subdirectories under /var/run if needed.</p>
<p>However, running the same command again (<i>sudo zebrasrv -f /etc/koha/koha-conf.xml</i>) still produces the same error<i> <b><br></b></i></p><meta http-equiv="content-type" content="text/html;charset=UTF-8"><title></title>
<style type="text/css">-
#toc,
.toc,
.mw-warning {
        border: 1px solid #aaa;
        background-color: #f9f9f9;
        padding: 5px;
        font-size: 95%;
}
#toc h2,
.toc h2 {
        display: inline;
        border: none;
        padding: 0;
        font-size: 100%;
        font-weight: bold;
}
#toc #toctitle,
.toc #toctitle,
#toc .toctitle,
.toc .toctitle {
        text-align: center;
}
#toc ul,
.toc ul {
        list-style-type: none;
        list-style-image: none;
        margin-left: 0;
        padding-left: 0;
        text-align: left;
}
#toc ul ul,
.toc ul ul {
        margin: 0 0 0 2em;
}
#toc .toctoggle,
.toc .toctoggle {
        font-size: 94%;
}@media print, projection, embossed {
        body {
                padding-top:1in;
                padding-bottom:1in;
                padding-left:1in;
                padding-right:1in;
        }
}
body {
        font-family:'Times New Roman';
        color:#000000;
        widows:2;
        font-style:normal;
        text-indent:0in;
        font-variant:normal;
        font-size:12pt;
        text-decoration:none;
        font-weight:normal;
        text-align:left;
}
table {
}
td {
        border-collapse:collapse;
        text-align:left;
        vertical-align:top;
}
--></style>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<b><br><br></b><i>Option 2: run the Zebra processes as daemons, and add to startup process:<br>
<br>Note that references to $SCRIPT_DIR refer to the directory where<br>Koha's command-line scripts are installed, e.g., /usr/share/koha/bin.<br><br> Zebra Server:<br> $ sudo ln -s ${SCRIPT_DIR}/koha-zebra-ctl.sh /etc/init.d/koha-zebra-daemon<br>
(Note: ${SCRIPT_DIR} is /usr/share/koha/bin/ by default in a standard install)<br> $ sudo update-rc.d koha-zebra-daemon defaults<br> ( Note: see man chkconfig(8) on other distros )<br> <br> $ sudo ${SCRIPT_DIR}/koha-zebra-ctl.sh start<br>
<br> Zebraqueue Daemon:<br> $ sudo ln -s ${SCRIPT_DIR}/koha-zebraqueue-ctl.sh /etc/init.d/koha-zebraqueue-daemon<br> $ sudo update-rc.d koha-zebraqueue-daemon defaults <br> ( Note: see man chkconfig(8) on other distros )<br>
<br> $ sudo ${SCRIPT_DIR}/koha-zebraqueue-ctl.sh start<br><br></i>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.<br>
<b><br>Thanks!<br><br>Mon<br></b><div>
</div>
<p> ----------------------------------------------------------------------<br></p>
</div>
</div>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Message: 1<br>
Date: Tue, 22 Apr 2008 23:30:12 -0400<br>
From: "Pseudo Admin" <<a href="mailto:sayanslib@gmail.com">sayanslib@gmail.com</a>><br>
Subject: [Koha] On reboot Ubuntu deletes /var/run files and<br>
directories<br>
To: <a href="mailto:koha@lists.katipo.co.nz">koha@lists.katipo.co.nz</a><br>
Message-ID:<br>
<<a href="mailto:a2f7ffb0804222030mf3b4acbo12bf678d8f484f6a@mail.gmail.com">a2f7ffb0804222030mf3b4acbo12bf678d8f484f6a@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
On reboot Ubuntu deletes /var/run files and directories causing this error<br>
when running zebra :<br>
<br>
*08:25:25-23/04 [fatal] lock file<br>
/var/lock/koha/zebradb/biblios/zebrasrv.pid [No such file or directory]<br>
*<br>
A search on Google led me to this post on koha-dev:<br>
<br>
*On 2/13/08, Chadwick, John, DCA <john.chadwick@...> wrote:<br>
> We have had this problem with Koha 3 on Ubuntu. After doing a great deal<br>
> of research, it seems that Ubuntu (and probably other OS systems) treat<br>
> directories in /var/run and /var/lock as temp directories and each time<br>
> the machine reboots, the directories disappear on us.<br>
*<br>
<br>
*Yes, as I just found on closer inspection of the FHS documentation<br>
[1], files in /var/run are supposed to be deleted or truncated at<br>
boot. Debian Etch clears files but leaves the subdirectories in<br>
place, but Ubuntu and other systems that either mount /var/run as a<br>
tempfs or are are aggressive about clearing /var/run get rid of the<br>
subdirectories at boot.*<br>
<br>
*Consequently, I will patch koha-zebra-ctl.sh to create the<br>
subdirectories under /var/run if needed.*<br>
<br>
*[1] <a href="http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA*" target="_blank">http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA*</a><br>
<br>
*Regards,*<br>
<br>
*Galen*<br>
<br>
I was just wondering what is the status of this fix ? Is it already included<br>
in Koha 3b2?<br>
<br>
Thanks!
</blockquote><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">------------------------------<br><br>
Message: 4<br>
Date: Wed, 23 Apr 2008 06:32:54 -0500<br>
From: "Galen Charlton" <<a href="mailto:galen.charlton@liblime.com">galen.charlton@liblime.com</a>><br>
Subject: Re: [Koha] On reboot Ubuntu deletes /var/run files and<br>
directories<br>
To: "Pseudo Admin" <<a href="mailto:sayanslib@gmail.com">sayanslib@gmail.com</a>><br>
Cc: <a href="mailto:koha@lists.katipo.co.nz">koha@lists.katipo.co.nz</a><br>
Message-ID:<br>
<<a href="mailto:4659947d0804230432o7eecd7d2r2c71a9d4eaf7d194@mail.gmail.com">4659947d0804230432o7eecd7d2r2c71a9d4eaf7d194@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
Hi,<br>
<br>
On Tue, Apr 22, 2008 at 10:30 PM, Pseudo Admin <<a href="mailto:sayanslib@gmail.com">sayanslib@gmail.com</a>> wrote:<br>
> I was just wondering what is the status of this fix ? Is it already included<br>
> in Koha 3b2?<br>
<br>
Yes, it is.<br>
<br>
Regards,<br>
<br>
Galen<br>
--<br>
Galen Charlton<br>
Koha Application Developer<br>
LibLime<br>
<a href="mailto:galen.charlton@liblime.com">galen.charlton@liblime.com</a><br>
p: 1-888-564-2457 x709<br>
</blockquote></div><br>