Just in case anyone else is running into this, following changes work for me.<br>1) upgrade to to Version 0.18 of Sys::Syslog, and <br>2) use the nofatal option in MogileFS::<a href="http://Server.pm">Server.pm</a>. Diff Below.
<br><br><br><br>109c109<br>< Sys::Syslog::openlog('mogilefsd', 'pid,nofatal', 'daemon');<br>---<br>> Sys::Syslog::openlog('mogilefsd', 'pid', 'daemon');<br><br>
<br>Dormando, Thanx a lot for pointing me to the fix.<br><br>HB<br><div><span class="gmail_quote">On 9/3/07, <b class="gmail_sendername">Hemant Bist</b> <<a href="mailto:hemant_bist@yahoo.com">hemant_bist@yahoo.com</a>
> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>Thanks for replying.<br>I confirmed that the mogilefsd crashes if I stop the syslogd. (And mogilefsd would not even start till I start the syslogd daemon.)
<br>Just adding setlogsock('udp'); to MogileFS/Server.pm does not seem to be helping.
<br> <br>However I have version 0.09 of Sys::Syslog. I will try with the newer version on CPAN that has a 'nofatal' option to not croak.<br>Thanx,<br>HB<br>=============log from my machine ============<br>hbist@bestprice
:~/work/bestprice/doc$ date; ps -ef |grep mogilefsd <br>Mon Sep 3 23:21:26 PDT 2007<br>mogile 25409 1 11 23:20 ? 00:00:03 mogilefsd<br>mogile 25410 25409 22 23:20 ? 00:00:06 mogilefsd [replicate]<br>
mogile 25411 25409 0 23:20 ? 00:00:00 mogilefsd [delete]<br>mogile 25412 25409 4 23:20 ? 00:00:01 mogilefsd [queryworker]<br>mogile 25413 25409 4 23:20 ? 00:00:01 mogilefsd [queryworker]<br>
mogile 25414 25409 4 23:20 ? 00:00:01 mogilefsd [queryworker]
<br>mogile 25415 25409 1 23:20 ? 00:00:00 mogilefsd [monitor]<br>mogile 25416 25409 0 23:20 ? 00:00:00 mogilefsd [reaper]<br>mogile 25417 25409 0 23:20 ? 00:00:00 mogilefsd [fsck]<br>hbist 25451 31128 0 23:21 pts/4 00:00:00 grep mogilefsd
<br>hbist@bestprice:~/work/bestprice/doc$ sudo /etc/init.d/sysklogd stop<br> * Stopping system log... [ ok ] <br>hbist@bestprice:~/work/bestprice/doc$ #wait for few seconds
<br>hbist@bestprice:~/work/bestprice/doc$ date; ps -ef |grep mogilefsd <br>Mon Sep 3 23:22:29 PDT 2007<br>hbist 25526 31128 0 23:22 pts/4 00:00:00 grep mogilefsd<br>hbist@bestprice:~/work/bestprice/doc$ #try starting mogilefsd with syslogd stopped.
<br>hbist@bestprice:~/work/bestprice/doc$ sudo -u mogile mogilefsd -c /etc/mogilefs/mogilefsd.conf --daemon<br>hbist@bestprice:~/work/bestprice/doc$ date; ps -ef |grep mogilefsd <br>Mon Sep 3 23:23:09 PDT 2007<br>hbist 25570 31128 0 23:23 pts/4 00:00:00 grep mogilefsd
<br>hbist@bestprice:~/work/bestprice/doc$ sudo /etc/init.d/sysklogd start<br> * Starting system log... [ ok ] <br>hbist@bestprice:~/work/bestprice/doc$ #try starting mogilefsd with syslogd running
<br>hbist@bestprice:~/work/bestprice/doc$ sudo -u mogile mogilefsd -c /etc/mogilefs/mogilefsd.conf --daemon<br>hbist@bestprice:~/work/bestprice/doc$ #try starting mogilefsd with syslogd running<br>hbist@bestprice:~/work/bestprice/doc$ date; ps -ef |grep mogilefsd
<br>Mon Sep 3 23:23:51 PDT 2007<br>mogile 25613 1 9 23:23 ? 00:00:01 mogilefsd<br>mogile 25614 25613 38 23:23 ? 00:00:06 mogilefsd [replicate]<br>mogile 25615 25613 0 23:23 ? 00:00:00 mogilefsd [delete]
<br>mogile 25616 25613 0 23:23 ? 00:00:00 mogilefsd [queryworker]<br>mogile 25617 25613 0 23:23 ? 00:00:00 mogilefsd [queryworker]<br>mogile 25618 25613 0 23:23 ? 00:00:00 mogilefsd [queryworker]
<br>mogile 25619 25613 1 23:23 ? 00:00:00 mogilefsd [monitor]<br>mogile 25620 25613 0 23:23 ? 00:00:00 mogilefsd [reaper]<br>mogile 25621 25613 0 23:23 ? 00:00:00 mogilefsd [fsck]<br>hbist 25643 31128 0 23:23 pts/4 00:00:00 grep mogilefsd
<br>hbist@bestprice:~/work/bestprice/doc$ clear<br>hbist@bestprice:~/work/bestprice/doc$ <br><br>##<br>ep 3 23:21:39 localhost exiting on signal 15<br>Sep 3 23:23:15 localhost syslogd 1.4.1#17ubuntu7: restart.<br>##<div>
<span class="e" id="q_114cf4956a8fdbc2_1"><br>
<div><span class="gmail_quote">On 9/3/07, <b class="gmail_sendername">dormando</b> <<a href="mailto:dormando@rydia.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">dormando@rydia.net</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hemant Bist wrote:<br>> Hi,<br>> I am testing mogilefs on a single machine on ubunutu dapper. I ran a<br>> script that apparently 'crashed' mogilefsd after few hours.<br>> Around the time when mogilefsd crashed, I see the following
<br>> error.(syslog file was rotated around this time). To me it looks like<br>> that syslogd rotation caused mogilefsd to crash.<br>> Am I correct in my conclusion? Is there some setting I can use to avoid<br>> this?
<br>><br>> (line 262 in .../MogileFS/Server.pm is 262 is Sys::Syslog::syslog(@_); )<br>><br><br>(I could be wrong; just took two minutes to look at this).<br><br>`perldoc Sys::Syslog` says that error happens when syslog couldn't talk
<br>over reliable connection. I'm assuming you have syslogd logging to<br>localfiles on the same machine as the mogilefs tracker.<br><br>A quick fix might be adding "setlogsock('udp');" above the <a href="http://Server.pm" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Server.pm</a><br>line with Sys::Syslog::openlog in it.<br><br>Should be an easy test if you can manually stop syslogd and cause the<br>mogile tracker to crash.<br><br>It could be a while before I personally could test this condition and
<br>suggest a patch, but if someone else wants to it's really easy.<br><br>-Dormando<br></blockquote></div><br>
</span></div></blockquote></div><br>