<div class="gmail_quote"><div>Hi!<br></div><div>&nbsp;<br><meta http-equiv="content-type" content="text/html;charset=UTF-8"><title></title>I dont&#39;t know if this happens to anyone using Ubuntu, but to avoid&nbsp;
confusion&nbsp; I would like to report my experience&nbsp; regarding this matter,&nbsp;
hoping it&nbsp; 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">
   &lt;!--
#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:&#39;Times New Roman&#39;;
        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;
}
     --&gt;</style>Issuing this command to start the Zebra server :&nbsp; 

 
  
  
  
  
  
  
  
   <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">
   &lt;!--
#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:&#39;Times New Roman&#39;;
        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;
}
     --&gt;
  </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!&nbsp; Galen) with a&nbsp; 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:&#39;Times New Roman&#39;;
        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;
}
     --&gt;</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&#39;s command-line scripts are installed, e.g., /usr/share/koha/bin.<br><br>&nbsp;&nbsp;&nbsp; Zebra Server:<br>&nbsp;&nbsp;&nbsp; $ sudo ln -s ${SCRIPT_DIR}/koha-zebra-ctl.sh&nbsp; /etc/init.d/koha-zebra-daemon<br>
&nbsp;&nbsp;&nbsp; (Note: ${SCRIPT_DIR} is /usr/share/koha/bin/ by default in a standard install)<br>&nbsp;&nbsp;&nbsp; $ sudo update-rc.d koha-zebra-daemon defaults<br>&nbsp;&nbsp;&nbsp; ( Note: see man chkconfig(8) on other distros )<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; $ sudo ${SCRIPT_DIR}/koha-zebra-ctl.sh start<br>
<br>&nbsp;&nbsp;&nbsp; Zebraqueue Daemon:<br>&nbsp;&nbsp;&nbsp; $ sudo ln -s ${SCRIPT_DIR}/koha-zebraqueue-ctl.sh&nbsp; /etc/init.d/koha-zebraqueue-daemon<br>&nbsp;&nbsp;&nbsp; $ sudo update-rc.d koha-zebraqueue-daemon defaults <br>&nbsp;&nbsp;&nbsp; ( Note: see man chkconfig(8) on other distros )<br>
<br>&nbsp;&nbsp;&nbsp; $ 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>&nbsp;----------------------------------------------------------------------<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: &quot;Pseudo Admin&quot; &lt;<a href="mailto:sayanslib@gmail.com">sayanslib@gmail.com</a>&gt;<br>
Subject: [Koha] On reboot Ubuntu deletes /var/run files and<br>
 &nbsp; &nbsp; &nbsp; &nbsp;directories<br>
To: <a href="mailto:koha@lists.katipo.co.nz">koha@lists.katipo.co.nz</a><br>
Message-ID:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a href="mailto:a2f7ffb0804222030mf3b4acbo12bf678d8f484f6a@mail.gmail.com">a2f7ffb0804222030mf3b4acbo12bf678d8f484f6a@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
On reboot Ubuntu deletes /var/run files and directories causing this error<br>
when running zebra :<br>
<br>
&nbsp;*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 &lt;john.chadwick@...&gt; wrote:<br>
&gt; We have had this problem with Koha 3 on Ubuntu. After doing a great deal<br>
&gt; of research, it seems that Ubuntu (and probably other OS systems) treat<br>
&gt; directories in /var/run and /var/lock as temp directories and each time<br>
&gt; 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. &nbsp;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!&nbsp;
</blockquote><div>&nbsp;</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: &quot;Galen Charlton&quot; &lt;<a href="mailto:galen.charlton@liblime.com">galen.charlton@liblime.com</a>&gt;<br>
Subject: Re: [Koha] On reboot Ubuntu deletes /var/run files and<br>
 &nbsp; &nbsp; &nbsp; &nbsp;directories<br>
To: &quot;Pseudo Admin&quot; &lt;<a href="mailto:sayanslib@gmail.com">sayanslib@gmail.com</a>&gt;<br>
Cc: <a href="mailto:koha@lists.katipo.co.nz">koha@lists.katipo.co.nz</a><br>
Message-ID:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a href="mailto:4659947d0804230432o7eecd7d2r2c71a9d4eaf7d194@mail.gmail.com">4659947d0804230432o7eecd7d2r2c71a9d4eaf7d194@mail.gmail.com</a>&gt;<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 &lt;<a href="mailto:sayanslib@gmail.com">sayanslib@gmail.com</a>&gt; wrote:<br>
&gt; I was just wondering what is the status of this fix ? Is it already included<br>
&gt; 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>