Leah Newmark
2008-Oct-29 17:13 UTC
[asterisk-users] Blank Voicemail.Conf after Password Change
Hi, For a few weeks now, our asterisk server has been experiencing something very odd. From time to time, voicemail.conf would go blank. We finally tracked it down to happening when someone attempts to change their password. It seems the file is touched, but not written to, and we're left with a blank voicemail file. Permissions seem to be fine: -rw-rw-r-- 1 asterisk asterisk 12707 2008-10-29 12:14 /etc/asterisk/voicemail.conf Asterisk is running as asterisk: 24560 ? Ssl 409:34 /usr/sbin/asterisk -U asterisk We're at a loss of what is going wrong, and how to resolve it. Meanwhile, *I don't think it's possible to not allow password changes (correct me if I'm wrong). *Using externpass to run a script that will copy a backup voicemail file to voicemail.conf could potentially work, but it won't save password changes. Nothing generated from voicemail is showing up in the asterisk logs, nor does the console show any error after changing a password. Any assistance on this strange behavior is much appreciated! Thank you, Leah Newmark VoIP Programmer Capalon Communications
Robert Lister
2008-Nov-01 00:22 UTC
[asterisk-users] Blank Voicemail.Conf after Password Change
On Wed, Oct 29, 2008 at 01:13:56PM -0400, Leah Newmark wrote:> From time to time, voicemail.conf would go blank. We finally tracked it > down to happening when someone attempts to change their password. > It seems the file is touched, but not written to, and we're left with a > blank voicemail file. > > Permissions seem to be fine: > -rw-rw-r-- 1 asterisk asterisk 12707 2008-10-29 12:14 > /etc/asterisk/voicemail.confI believe what it does it create a new file called voicemail.conf.new in the same directory and then copies it into place, so worth checking the permissions on the directory as well, that asterisk can write to it.> Asterisk is running as asterisk: > 24560 ? Ssl 409:34 /usr/sbin/asterisk -U asteriskI see your asterisk is running "-U asterisk" but this ps output is ambiguous. What does ps xaguwww show? if it really is running as UID asterisk, you should see something like: asterisk 8506 0.0 0.6 443672 12912 ? Ssl Oct02 31:46 /usr/sbin/asterisk -U asterisk -G asterisk> Nothing generated from voicemail is showing up in the asterisk logs, nor > does the console show any error after changing a password.Otherwise, it could be some sort of odd file locking issue where multiple things are trying to write to the same file at once? Or perhaps you have a blank voicemail.conf.new that it can't erase, sitting about somewhere? Maybe try running asterisk under strace to see what happens when you try to change a password. Rob -- Robert Lister - London Internet Exchange - http://www.linx.net/ sip:robl at linx.net - inoc-dba:5459*710 - tel: +44 (0)20 7645 3510 134-138 Borough High Street, London SE1 1LB Registered in England 3137929 at 3 Park Road, Peterborough, PE1 2UX
Leah Newmark
2008-Nov-03 18:19 UTC
[asterisk-users] Blank Voicemail.Conf after Password Change
Rob, Thanks for your time and assistance. The directory is owned by asterisk and permissions seem fine there too: drwxrwxr-x 9 asterisk asterisk 3072 2008-11-03 13:12 . I never see a voicemail.conf.new created. I have done a locate on the whole server and don't see a blank one there either which might be causing any confusion. ps xaguwww confirms asterisk is running as UID asterisk: asterisk 24560 1.0 3.1 50648 32692 ? Ssl Oct02 506:35 /usr/sbin/asterisk -U asterisk I see that it's been up for a while, and I'm wondering if that coincides with when we started noticing this behavior. I'd have to restart asterisk to use strace, but restarting for all I know might help... Any other input before I do so? TIA, LN asterisk-users-request at lists.digium.com wrote: Message: 15 Date: Sat, 1 Nov 2008 00:22:30 +0000 From: Robert Lister <robl at linx.net> Subject: Re: [asterisk-users] Blank Voicemail.Conf after Password Change To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> Message-ID: <20081101002230.GE28180 at linx.net> Content-Type: text/plain; charset=us-ascii On Wed, Oct 29, 2008 at 01:13:56PM -0400, Leah Newmark wrote:> > From time to time, voicemail.conf would go blank. We finally tracked it > > down to happening when someone attempts to change their password. > > It seems the file is touched, but not written to, and we're left with a > > blank voicemail file. > > > > Permissions seem to be fine: > > -rw-rw-r-- 1 asterisk asterisk 12707 2008-10-29 12:14 > > /etc/asterisk/voicemail.conf >I believe what it does it create a new file called voicemail.conf.new in the same directory and then copies it into place, so worth checking the permissions on the directory as well, that asterisk can write to it.> > Asterisk is running as asterisk: > > 24560 ? Ssl 409:34 /usr/sbin/asterisk -U asterisk >I see your asterisk is running "-U asterisk" but this ps output is ambiguous. What does ps xaguwww show? if it really is running as UID asterisk, you should see something like: asterisk 8506 0.0 0.6 443672 12912 ? Ssl Oct02 31:46 /usr/sbin/asterisk -U asterisk -G asterisk> > Nothing generated from voicemail is showing up in the asterisk logs, nor > > does the console show any error after changing a password. >Otherwise, it could be some sort of odd file locking issue where multiple things are trying to write to the same file at once? Or perhaps you have a blank voicemail.conf.new that it can't erase, sitting about somewhere? Maybe try running asterisk under strace to see what happens when you try to change a password. Rob
Leah Newmark
2008-Nov-04 18:37 UTC
[asterisk-users] Blank Voicemail.Conf after Password Change
Thanks! Apparently, I forgot to mention our version running is 1.2.13 Is the coding similar enough to give it a shot? (Perhaps it's time to upgrade...) I really appreciate the assistance. LN asterisk-users-request at lists.digium.com wrote: Message: 12 Date: Mon, 3 Nov 2008 15:11:10 -0600 From: Tilghman Lesher <tilghman at mail.jeffandtilghman.com> Subject: Re: [asterisk-users] Blank Voicemail.Conf after Password Change To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users at lists.digium.com> Message-ID: <200811031511.11495.tilghman at mail.jeffandtilghman.com> Content-Type: text/plain; charset="iso-8859-1" On Monday 03 November 2008 12:19:31 Leah Newmark wrote:> > The directory is owned by asterisk and permissions seem fine there too: > > drwxrwxr-x 9 asterisk asterisk 3072 2008-11-03 13:12 . > > > > I never see a voicemail.conf.new created. I have done a locate on the > > whole server and don't see a blank one there either which might be > > causing any confusion. >In 1.4, it no longer creates any such file. Instead, it creates a randomly named file, designed to be unique, starting with "voicemail.conf." and ending with 6 random characters.> > ps xaguwww confirms asterisk is running as UID asterisk: > > asterisk 24560 1.0 3.1 50648 32692 ? Ssl Oct02 506:35 > > /usr/sbin/asterisk -U asterisk > > > > I see that it's been up for a while, and I'm wondering if that coincides > > with when we started noticing this behavior. I'd have to restart > > asterisk to use strace, but restarting for all I know might help... > > > > Any other input before I do so? >Please try the following patch: http://bugs.digium.com/view.php?id=13831 -- Tilghman ------------------------------