I have /var/spool/asterisk/voicemail NFS mounted from another server. Everything is fine, until I simulate an NFS server failure, by shutting down the NFS server process. At this point, Asterisk becomes almost non-responsive. It won't even process a 'sip show peers' command correctly. It displays a few lines of text, pauses for several seconds, and then displays the rest. When a call comes into the system, Asterisk seems to do nothing for several seconds, and generally acts really sluggish. The phone gives up after several seconds, because Asterisk isn't doing anything. I have used the soft option with the NFS mount. I hope someone isn't going to tell me that the voicemail directory going away is going to cause Asterisk to fall in a heap on the floor. We just changed our model from a single, central voicemail server, to a distributed model, to get around some issues. We can't lose ALL pbx functionality just because the voicemail NFS server goes away. That's insane. Doug.
you might want to try autofs to drive the nfs functions. it'll make you less susceptable as the filesystem won't be mounted full time Douglas Garstang wrote:> I have /var/spool/asterisk/voicemail NFS mounted from another server. Everything is fine, until I simulate an NFS server failure, by shutting down the NFS server process. > > At this point, Asterisk becomes almost non-responsive. It won't even process a 'sip show peers' command correctly. It displays a few lines of text, pauses for several seconds, and then displays the rest. When a call comes into the system, Asterisk seems to do nothing for several seconds, and generally acts really sluggish. The phone gives up after several seconds, because Asterisk isn't doing anything. > > I have used the soft option with the NFS mount. > > I hope someone isn't going to tell me that the voicemail directory going away is going to cause Asterisk to fall in a heap on the floor. We just changed our model from a single, central voicemail server, to a distributed model, to get around some issues. We can't lose ALL pbx functionality just because the voicemail NFS server goes away. That's insane. > > Doug. > > > > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- One day at a time, one second if that's what it takes
I'll give this a try, but what happens when someone tries to access their voicemail? Common sense would say that THEN the system will fall apart, which isn't much of a solution. Doug.> -----Original Message----- > From: Bruce Ferrell [mailto:bferrell@baywinds.org] > Sent: Friday, June 16, 2006 2:26 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] Voicemail with NFS > > > you might want to try autofs to drive the nfs functions. > it'll make you > less susceptable as the filesystem won't be mounted full time > > Douglas Garstang wrote: > > I have /var/spool/asterisk/voicemail NFS mounted from > another server. Everything is fine, until I simulate an NFS > server failure, by shutting down the NFS server process. > > > > At this point, Asterisk becomes almost non-responsive. It > won't even process a 'sip show peers' command correctly. It > displays a few lines of text, pauses for several seconds, and > then displays the rest. When a call comes into the system, > Asterisk seems to do nothing for several seconds, and > generally acts really sluggish. The phone gives up after > several seconds, because Asterisk isn't doing anything. > > > > I have used the soft option with the NFS mount. > > > > I hope someone isn't going to tell me that the voicemail > directory going away is going to cause Asterisk to fall in a > heap on the floor. We just changed our model from a single, > central voicemail server, to a distributed model, to get > around some issues. We can't lose ALL pbx functionality just > because the voicemail NFS server goes away. That's insane. > > > > Doug. > > > > > > > > > > _______________________________________________ > > --Bandwidth and Colocation provided by Easynews.com -- > > > > Asterisk-Users mailing list > > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > > -- > One day at a time, one second if that's what it takes > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Douglas Garstang wrote:> > I hope someone isn't going to tell me that the voicemail directory going away is going to cause Asterisk to fall in a heap on the floor. >You never give up on dissing Asterisk, do you, Pococurante? B. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
> -----Original Message----- > From: Brian Capouch [mailto:brianc@palaver.net] > Sent: Friday, June 16, 2006 3:30 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] Voicemail with NFS > > > Douglas Garstang wrote: > > I'll give this a try, but what happens when someone tries > to access their voicemail? Common sense would say that THEN > the system will fall apart, which isn't much of a solution. > > > > What do you want it to do? > > The "hanging waiting for NFS volume to become avaiable" is a > classic NFS > situation, hardly limited to your little experiment. > > There are NFS mount options that stop the hang, but they > won't correct > the fact that your voicemail store isn't there.What do I want what to do? I don't see why Asterisk should hang. As I said, I mounted the NFS share with the 'soft' option and a timeout of 5 seconds. When I do a 'df -k' command, the result hangs for 5s or so and then returns. Asterisk doesn't seem to behave in the same way. Considering it's a function of the mount command, you'd think it would be transparent to Asterisk. Yes... soft causes it not to hang.... for everything else except Asterisk.... I don't care if the voicemail store goes away. I do care if the voicemail store going away causes all calls across the entire system to fail. Doug.
> -----Original Message----- > From: Brian Capouch [mailto:brianc@palaver.net] > Sent: Friday, June 16, 2006 3:40 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] Voicemail with NFS > > > Douglas Garstang wrote: > > > > > I hope someone isn't going to tell me that the voicemail > directory going away is going to cause Asterisk to fall in a > heap on the floor. > > > > You never give up on dissing Asterisk, do you, Pococurante?This would be acceptable behaviour for you?
CF... I tried setting it to 60s, and it delays the same final result. The system becomes unresponsive, but it just takes a few more seconds to do it. Looks like it's somehow related to Asterisk polling it's voicemail store every checkmwi seconds. Well... :(> -----Original Message----- > From: C F [mailto:shmaltz@gmail.com] > Sent: Friday, June 16, 2006 4:06 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] Voicemail with NFS > > > I'm curious is this might help: > this is in sip.conf > ;checkmwi=10 ; Default time between > mailbox checks for peers > This might be the reason asterisk misbehaves when the NFS > mount is unavailable. > Therfore I think this might tell asterisk not to try looking thru the > folders every 10 seconds and will therefore allow asterisk to allow > for a missing NFS mount for longer than 10 seconds. However if someone > wants to leave a message, I'm not sure this will work. > > On 6/16/06, Douglas Garstang <dgarstang@oneeighty.com> wrote: > > > -----Original Message----- > > > From: Brian Capouch [mailto:brianc@palaver.net] > > > Sent: Friday, June 16, 2006 3:40 PM > > > To: Asterisk Users Mailing List - Non-Commercial Discussion > > > Subject: Re: [Asterisk-Users] Voicemail with NFS > > > > > > > > > Douglas Garstang wrote: > > > > > > > > > > > I hope someone isn't going to tell me that the voicemail > > > directory going away is going to cause Asterisk to fall in a > > > heap on the floor. > > > > > > > > > > You never give up on dissing Asterisk, do you, Pococurante? > > > > This would be acceptable behaviour for you? > > _______________________________________________ > > --Bandwidth and Colocation provided by Easynews.com -- > > > > Asterisk-Users mailing list > > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
> -----Original Message----- > From: Brian Capouch [mailto:brianc@palaver.net] > Sent: Friday, June 16, 2006 3:30 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] Voicemail with NFS > > > Douglas Garstang wrote: > > I'll give this a try, but what happens when someone tries > to access their voicemail? Common sense would say that THEN > the system will fall apart, which isn't much of a solution. > > > > What do you want it to do? > > The "hanging waiting for NFS volume to become avaiable" is a > classic NFS > situation, hardly limited to your little experiment. > > There are NFS mount options that stop the hang, but they > won't correct > the fact that your voicemail store isn't there.We've just tried the same thing, but with a samba server. Shut down the samba server, and Asterisk stops processing calls. Actually, this time the phones will fail over to the next asterisk box. However, if all asterisk boxes are pointing to the same samba server, then failover from one asterisk box to another isn't going to help at all. So... Asterisk responds to a samba failure in the same way as an NFS failure. Looks like it's time to start playing with rsync...
Mike, Never heard of Unison... do you have a link to it? Doug.> -----Original Message----- > From: Mike Diehl [mailto:mdiehl@diehlnet.com] > Sent: Friday, June 16, 2006 9:41 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] Voicemail with NFS > > > I don't know how big your voicemail system is, but have you > considered using > Unison to syncronize the vm accross all your servers? I'm > deploying multiple > servers with two vm servers, each sync'ed every 5? minutes. > If one fails, > the other one should be "good enough." > > Just a though, > Mike > > On Friday 16 June 2006 16:14, Brian Capouch wrote: > > Douglas Garstang wrote: > > >>Douglas Garstang wrote: > > >>>I hope someone isn't going to tell me that the voicemail > > >> > > >>directory going away is going to cause Asterisk to fall in a > > >>heap on the floor. > > >> > > >> Brian Capouch wrote: > > >>You never give up on dissing Asterisk, do you, Pococurante? > > > > > > This would be acceptable behaviour for you? > > > > An NFS-mounted volume isn't ever going to be as reliable as > one mounted > > on the local filesystem. You are introducing additional points of > > failure both with respect to there now being two hard > drives involved, > > as well as an interposed network that can fail in a variety of ways. > > > > So by definition this arrangement isn't going to be as > reliable as one > > based on a native filesystem. > > > > And you never have answered the direct question: what do > you expect the > > "logical" thing would be to happen if all the sudden an > important system > > resource has just gone away? > > > > Regardless of the answer (because a rejoinder to that would > then be, "So > > add that behavior into Asterisk, or help the developers do > so . . ") my > > point isn't that you are finding--actually looking for--places where > > catastrophic behavior makes Asterisk suffer. > > > > The problem is that you don't ever say, "So what are some reasonable > > things that might be done in this situation;" instead you emit a > > scathing remark ("fall in a heap on the floor") that would indicate > > you've discovered some glaring design flaw that any idiot would have > > known to design around ahead of your "finding" it. > > > > It is not automatically the case that if Asterisk doesn't > do something > > you think it should do it means that Asterisk is horribly > and glaringly > > flawed. But that's what you *always* assume, and you > always--ALWAYS--do > > so snidely. > > > > Pococurante. > > > > B. > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Mike, I don't think unison is a workable solution. It doesn't scale. The network and system load would increase exponentially as we added asterisk servers to our cluster. Doug. -----Original Message----- From: Mike Diehl [mailto:mdiehl@diehlnet.com] Sent: Fri 6/16/2006 9:40 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject: Re: [Asterisk-Users] Voicemail with NFS I don't know how big your voicemail system is, but have you considered using Unison to syncronize the vm accross all your servers? I'm deploying multiple servers with two vm servers, each sync'ed every 5? minutes. If one fails, the other one should be "good enough." Just a though, Mike On Friday 16 June 2006 16:14, Brian Capouch wrote: > Douglas Garstang wrote: > >>Douglas Garstang wrote: > >>>I hope someone isn't going to tell me that the voicemail > >> > >>directory going away is going to cause Asterisk to fall in a > >>heap on the floor. > >> > >> Brian Capouch wrote: > >>You never give up on dissing Asterisk, do you, Pococurante? > > > > This would be acceptable behaviour for you? > > An NFS-mounted volume isn't ever going to be as reliable as one mounted > on the local filesystem. You are introducing additional points of > failure both with respect to there now being two hard drives involved, > as well as an interposed network that can fail in a variety of ways. > > So by definition this arrangement isn't going to be as reliable as one > based on a native filesystem. > > And you never have answered the direct question: what do you expect the > "logical" thing would be to happen if all the sudden an important system > resource has just gone away? > > Regardless of the answer (because a rejoinder to that would then be, "So > add that behavior into Asterisk, or help the developers do so . . ") my > point isn't that you are finding--actually looking for--places where > catastrophic behavior makes Asterisk suffer. > > The problem is that you don't ever say, "So what are some reasonable > things that might be done in this situation;" instead you emit a > scathing remark ("fall in a heap on the floor") that would indicate > you've discovered some glaring design flaw that any idiot would have > known to design around ahead of your "finding" it. > > It is not automatically the case that if Asterisk doesn't do something > you think it should do it means that Asterisk is horribly and glaringly > flawed. But that's what you *always* assume, and you always--ALWAYS--do > so snidely. > > Pococurante. > > B. _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
On Fri, Jun 16, 2006 at 02:17:53PM -0600, Douglas Garstang wrote:> I have /var/spool/asterisk/voicemail NFS mounted from another server. > Everything is fine, until I simulate an NFS server failure, by > shutting down the NFS server process. > > At this point, Asterisk becomes almost non-responsive. It won't even > process a 'sip show peers' command correctly. It displays a few lines > of text, pauses for several seconds, and then displays the rest. When > a call comes into the system, Asterisk seems to do nothing for several > seconds, and generally acts really sluggish. The phone gives up after > several seconds, because Asterisk isn't doing anything.Why is Asterisk hung? Is it just a long wait, or are some threads in a D state (uninterruptable sleep)? Maybe one thread is hung and is holding a certain lock and thus all others are hung. On kernel 2.6, ps won't show the different threads of the process by default. Try: ps -T PID_OF_ASTERISK Are different threads in "STAT" (state) D or S? You can get a stack trace from at least from threads that are not in D state using gdb: gdb -p PID_OF_THREAD # in the (gdb) prompt: backtrace Though IIRC, the thread that is responsible to answer to 'sip show peers' is actually the "main" thread (whose PID is the same as the "PID of asterisk").> > I have used the soft option with the NFS mount.BTW: what version of NFS? Have you verified that the "soft" option is indeed used? (take a look at /proc/mounts ). BTW: the fact that you use Outlook makes it much more difficult to read complex (branching) list threads in which you participate. I had to spend some 15 minutes or so just to glue sub-threads together. And I'm not sure most mailers even have that option to manually attach/detach threads. -- Tzafrir Cohen sip:tzafrir@local.xorcom.com icq#16849755 iax:tzafrir@local.xorcom.com +972-50-7952406 tzafrir.cohen@xorcom.com http://www.xorcom.com
Pococurante! Or Pococurante? Or you're a big fat poco! Damn Brian, I had to look this word up. SYLLABICATION: po?co?cu?ran?te Pronunciation: (p?"k?-koo-ran't?, -r?n'-, -kyoo-; It.p?"k?-kOO-r?n'te) ADJECTIVE: Indifferent; apathetic; nonchalant. NOUN: One who does not care; a careless or indifferent person. Thanks for expanding my vocabulary. I actually export my NFS share from my Voicemail server read-only. The registration servers mount the VFS share, only to get the MWI function working. I send all VM functions over the VM server so the registration servers never have to write to the VM NSF share so Asterisk doesn't care if it drops off. Digium has been working on a remote MWI over IAX, hopefully it will be completed soon and there will be no need for NFS or SAMBA to do any of this. There are 2 patches on Mantis that do just this, two different implementations and the authors report great success. Mantis issue 4236 and 4371 JR Poco-not
I have some experience with fibre-channel. I wouldn't be surprised if Asterisk behaved in exactly the same way if a fibre-channel volume went offline. It's also prohibitively expensive. -----Original Message----- From: Avi Miller [mailto:avi.miller@squiz.net] Sent: Sat 6/17/2006 1:06 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject: Re: [Asterisk-Users] Voicemail with NFS Douglas Garstang wrote: > I don't think unison is a workable solution. It doesn't scale. The network and system load would increase exponentially as we added asterisk servers to our cluster. If you're clustering that many boxes, I'd investigate fibre channel SAN and GFS. That way, each node of the cluster just mounts the voicemail location locally. -- National Manager - Special Projects < Melbourne / Sydney / Canberra / Hobart / London /> 2/340 Gore Street T: 1 300 SQUIZ (77859) Fitzroy, VIC T: 03 9486 0411 3065 F: 03 9486 0611 W: http://www.squiz.net/ .....>> Open Source - Own it - Squiz.net ...../> _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Yes, we'd need it on every single box. We had a dedicated voicemail server in the first place. I decided to distribute voicemail between all boxes because the script that I had that copied the phone registrations over to the voicemail server (for mwi) was unreliable. -----Original Message----- From: Simon Woodhead [mailto:woodheads@esms.com] Sent: Sat 6/17/2006 1:31 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject: Re: [Asterisk-Users] Voicemail with NFS We use Unison Doug and it works just fine. It isn't perfect in theory but we've had no issues in practice. Your concerns over sacalbility are resolved by implementation - do you need it on every single Asterisk box, or maybe local to just two with routing to them and failover in the dial-plan? Unison is like two way rsync and consequently extremely efficient. Simon On 6/17/06, Douglas Garstang <dgarstang@oneeighty.com> wrote: Mike, I don't think unison is a workable solution. It doesn't scale. The network and system load would increase exponentially as we added asterisk servers to our cluster. Doug. -----Original Message----- From: Mike Diehl [mailto:mdiehl@diehlnet.com] Sent: Fri 6/16/2006 9:40 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject: Re: [Asterisk-Users] Voicemail with NFS I don't know how big your voicemail system is, but have you considered using Unison to syncronize the vm accross all your servers? I'm deploying multiple servers with two vm servers, each sync'ed every 5? minutes. If one fails, the other one should be "good enough." Just a though, Mike On Friday 16 June 2006 16:14, Brian Capouch wrote: > Douglas Garstang wrote: > >>Douglas Garstang wrote: > >>>I hope someone isn't going to tell me that the voicemail > >> > >>directory going away is going to cause Asterisk to fall in a > >>heap on the floor. > >> > >> Brian Capouch wrote: > >>You never give up on dissing Asterisk, do you, Pococurante? > > > > This would be acceptable behaviour for you? > > An NFS-mounted volume isn't ever going to be as reliable as one mounted > on the local filesystem. You are introducing additional points of > failure both with respect to there now being two hard drives involved, > as well as an interposed network that can fail in a variety of ways. > > So by definition this arrangement isn't going to be as reliable as one > based on a native filesystem. > > And you never have answered the direct question: what do you expect the > "logical" thing would be to happen if all the sudden an important system > resource has just gone away? > > Regardless of the answer (because a rejoinder to that would then be, "So > add that behavior into Asterisk, or help the developers do so . . ") my > point isn't that you are finding--actually looking for--places where > catastrophic behavior makes Asterisk suffer. > > The problem is that you don't ever say, "So what are some reasonable > things that might be done in this situation;" instead you emit a > scathing remark ("fall in a heap on the floor") that would indicate > you've discovered some glaring design flaw that any idiot would have > known to design around ahead of your "finding" it. > > It is not automatically the case that if Asterisk doesn't do something > you think it should do it means that Asterisk is horribly and glaringly > flawed. But that's what you *always* assume, and you always--ALWAYS--do > so snidely. > > Pococurante. > > B. _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
JR, Are you sure that a ro mounted volume won't behave in the same fashion as a rw mounted one when the NFS server is abruptly shut down? Have you tried shutting down the NFS server? Does Asterisk recover from this? Doug. -----Original Message----- From: JR Richardson [mailto:jmr.richardson@gmail.com] Sent: Sat 6/17/2006 8:04 AM To: asterisk-users@lists.digium.com Cc: Subject: Re: [Asterisk-Users] Voicemail with NFS Pococurante! Or Pococurante? Or you're a big fat poco! Damn Brian, I had to look this word up. SYLLABICATION: po?co?cu?ran?te Pronunciation: (p?"k?-koo-ran't?, -r?n'-, -kyoo-; It.p?"k?-kOO-r?n'te) ADJECTIVE: Indifferent; apathetic; nonchalant. NOUN: One who does not care; a careless or indifferent person. Thanks for expanding my vocabulary. I actually export my NFS share from my Voicemail server read-only. The registration servers mount the VFS share, only to get the MWI function working. I send all VM functions over the VM server so the registration servers never have to write to the VM NSF share so Asterisk doesn't care if it drops off. Digium has been working on a remote MWI over IAX, hopefully it will be completed soon and there will be no need for NFS or SAMBA to do any of this. There are 2 patches on Mantis that do just this, two different implementations and the authors report great success. Mantis issue 4236 and 4371 JR Poco-not _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
>Are you sure that a ro mounted volume won't behave in the same fashion as arw mounted one when the NFS server is >abruptly shut down?>Have you tried shutting down the NFS server? Does Asterisk recover fromthis? Doug, I have to say, my system has been working fine, but could not recall if I actually tested a VM server crash, so I did a test and even with ro mounted asterisk did not like that either. I'm in the middle of some more testing, so far things are a miss. I do hate breaking things just to counter the "what if's" but it is better to be prepared than asleep at the wheel. JR JR Richardson Engineering for the Masses
At 03:44 PM 6/16/2006, you wrote:> > The "hanging waiting for NFS volume to become avaiable" is a > > classic NFS > > situation, hardly limited to your little experiment.Silly question, but how is this different than a hard disk in the local machine crashing or the router dying or even pulling the plug on the * box itself? Would you expect it to handle any of those scenarios? Ira
Other applications can handle it. Don't see why Asterisk can't. Mount the nfs volume with the -soft option. Do a 'df -k' and you will see that the df command will time out in a couple of seconds. Why can't Asterisk do the same? -----Original Message----- From: Ira [mailto:ira@extrasensory.com] Sent: Sat 6/17/2006 3:10 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: Subject: RE: [Asterisk-Users] Voicemail with NFS At 03:44 PM 6/16/2006, you wrote: > > The "hanging waiting for NFS volume to become avaiable" is a > > classic NFS > > situation, hardly limited to your little experiment. Silly question, but how is this different than a hard disk in the local machine crashing or the router dying or even pulling the plug on the * box itself? Would you expect it to handle any of those scenarios? Ira _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users