Is this a syslogd error?

Hemant Bist hemant_bist at yahoo.com
Thu Sep 6 16:09:33 UTC 2007


Just in case anyone else is running into this, following changes work for
me.
1) upgrade to to Version 0.18 of Sys::Syslog, and
2) use the nofatal option in MogileFS::Server.pm. Diff Below.



109c109
<     Sys::Syslog::openlog('mogilefsd', 'pid,nofatal', 'daemon');
---
>     Sys::Syslog::openlog('mogilefsd', 'pid', 'daemon');


Dormando, Thanx a lot for pointing me to the fix.

HB
On 9/3/07, Hemant Bist <hemant_bist at yahoo.com> wrote:
>
> Hi,
> Thanks for replying.
> I confirmed that the mogilefsd crashes if I stop the syslogd. (And
> mogilefsd would not even start till I start the syslogd daemon.)
> Just adding  setlogsock('udp'); to MogileFS/Server.pm does not seem to be
> helping.
>
> 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.
> Thanx,
> HB
> =============log from my machine ============
> hbist at bestprice :~/work/bestprice/doc$ date; ps -ef |grep mogilefsd
> Mon Sep  3 23:21:26 PDT 2007
> mogile   25409     1 11 23:20 ?        00:00:03 mogilefsd
> mogile   25410 25409 22 23:20 ?        00:00:06 mogilefsd [replicate]
> mogile   25411 25409  0 23:20 ?        00:00:00 mogilefsd [delete]
> mogile   25412 25409  4 23:20 ?        00:00:01 mogilefsd [queryworker]
> mogile   25413 25409  4 23:20 ?        00:00:01 mogilefsd [queryworker]
> mogile   25414 25409  4 23:20 ?        00:00:01 mogilefsd [queryworker]
> mogile   25415 25409  1 23:20 ?        00:00:00 mogilefsd [monitor]
> mogile   25416 25409  0 23:20 ?        00:00:00 mogilefsd [reaper]
> mogile   25417 25409  0 23:20 ?        00:00:00 mogilefsd [fsck]
> hbist    25451 31128  0 23:21 pts/4    00:00:00 grep mogilefsd
> hbist at bestprice:~/work/bestprice/doc$ sudo /etc/init.d/sysklogd stop
>  * Stopping system
> log...
> [ ok ]
> hbist at bestprice:~/work/bestprice/doc$ #wait for few seconds
> hbist at bestprice:~/work/bestprice/doc$ date; ps -ef |grep mogilefsd
> Mon Sep  3 23:22:29 PDT 2007
> hbist    25526 31128  0 23:22 pts/4    00:00:00 grep mogilefsd
> hbist at bestprice:~/work/bestprice/doc$ #try starting mogilefsd with syslogd
> stopped.
> hbist at bestprice:~/work/bestprice/doc$ sudo -u mogile mogilefsd -c
> /etc/mogilefs/mogilefsd.conf --daemon
> hbist at bestprice:~/work/bestprice/doc$ date; ps -ef |grep mogilefsd
> Mon Sep  3 23:23:09 PDT 2007
> hbist    25570 31128  0 23:23 pts/4    00:00:00 grep mogilefsd
> hbist at bestprice:~/work/bestprice/doc$ sudo /etc/init.d/sysklogd start
>  * Starting system
> log...
> [ ok ]
> hbist at bestprice:~/work/bestprice/doc$ #try starting mogilefsd with syslogd
> running
> hbist at bestprice:~/work/bestprice/doc$ sudo -u mogile mogilefsd -c
> /etc/mogilefs/mogilefsd.conf --daemon
> hbist at bestprice:~/work/bestprice/doc$ #try starting mogilefsd with syslogd
> running
> hbist at bestprice:~/work/bestprice/doc$ date; ps -ef |grep mogilefsd
> Mon Sep  3 23:23:51 PDT 2007
> mogile   25613     1  9 23:23 ?        00:00:01 mogilefsd
> mogile   25614 25613 38 23:23 ?        00:00:06 mogilefsd [replicate]
> mogile   25615 25613  0 23:23 ?        00:00:00 mogilefsd [delete]
> mogile   25616 25613  0 23:23 ?        00:00:00 mogilefsd [queryworker]
> mogile   25617 25613  0 23:23 ?        00:00:00 mogilefsd [queryworker]
> mogile   25618 25613  0 23:23 ?        00:00:00 mogilefsd [queryworker]
> mogile   25619 25613  1 23:23 ?        00:00:00 mogilefsd [monitor]
> mogile   25620 25613  0 23:23 ?        00:00:00 mogilefsd [reaper]
> mogile   25621 25613  0 23:23 ?        00:00:00 mogilefsd [fsck]
> hbist    25643 31128  0 23:23 pts/4    00:00:00 grep mogilefsd
> hbist at bestprice:~/work/bestprice/doc$ clear
> hbist at bestprice:~/work/bestprice/doc$
>
> ##
> ep  3 23:21:39 localhost exiting on signal 15
> Sep  3 23:23:15 localhost syslogd 1.4.1#17ubuntu7: restart.
> ##
> On 9/3/07, dormando <dormando at rydia.net> wrote:
> >
> > Hemant Bist wrote:
> > > Hi,
> > > I am testing mogilefs on  a single machine on ubunutu dapper. I ran a
> > > script that apparently 'crashed' mogilefsd after few hours.
> > > Around the time when mogilefsd crashed, I see the following
> > > error.(syslog file was rotated around this time). To me it looks like
> > > that syslogd rotation caused mogilefsd to crash.
> > > Am I correct in my conclusion? Is there some setting I can use to
> > avoid
> > > this?
> > >
> > > (line 262 in .../MogileFS/Server.pm is 262 is
> > Sys::Syslog::syslog(@_); )
> > >
> >
> > (I could be wrong; just took two minutes to look at this).
> >
> > `perldoc Sys::Syslog` says that error happens when syslog couldn't talk
> > over reliable connection. I'm assuming you have syslogd logging to
> > localfiles on the same machine as the mogilefs tracker.
> >
> > A quick fix might be adding "setlogsock('udp');" above the Server.pm
> > line with Sys::Syslog::openlog in it.
> >
> > Should be an easy test if you can manually stop syslogd and cause the
> > mogile tracker to crash.
> >
> > It could be a while before I personally could test this condition and
> > suggest a patch, but if someone else wants to it's really easy.
> >
> > -Dormando
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/mogilefs/attachments/20070906/0270e4e5/attachment-0001.html


More information about the mogilefs mailing list