Amanda-Users

Re: Amanda not sending emails

2003-10-05 23:08:29
Subject: Re: Amanda not sending emails
From: M3 Freak <m3freak AT rogers DOT com>
To: amanda-users AT amanda DOT org
Date: 05 Oct 2003 22:58:27 -0400
I thought I had the problem licked, but I rejoiced too soon.

I took everyone's advice and went through the mail logs, did some tests, and I ended up installing a new crontab file for the amanda user (i.e. as root, I typed "crontab -u amanda -e").  This is what I did:

1. Running tests with "/etc/crontab", I discovered my original entry was throwing cron for a loop.  I used to have "00 14 * *  1-5 amanda /usr/sbin/amcheck -m DailySet1", but cron didn't like "amanda" in the line, so I took it out.
2. With amanda removed, errors disappeared.
3. Heeding advice of others that replied to my original message, I created a crontab file for the amanda user.  In this file I used some test entries to see if I would get emails.  The test entry was: "* * * * * /usr/sbin/amcheck -m DailySet1".  This worked like a charm and I did get emailed (btw, I didn't have the tape inserted so I was assured that amcheck would complain).
4. Thinking I had the problem licked, I put in my final crontab entry for the amanda user, as follows:
00 14 * * 1-5 /usr/sbin/amcheck -m DailySet1
01 0 * * 2-6 /usr/sbin/amdump DailySet1 && mt -f /dev/nst0 rewoffl
5. Woke up next morning, and viola, no email.  Back to square one.

I don't know why it worked for a little while, and then barfed the very next day when amdump was supposed to run.  In fact, amdump DID run because I ran amreport manually on the log file, and the dump completed successfully.  I just didn't get an email from amanda

I'm not sure what is going on, because the system is sending out emails for everything else just fine.  The only problem seems to be from cron, which works for a little while and then stops.  Weird.

Any more suggestions?  Thanks for all the help so far.

Regards,

Kanwar Sandhu

P.S.

There was one suggestion to take out "-m" for amcheck and instead use the "MAILTO" setting in the crontab file, but that wouldn't explain why I'm not getting an email after amdump runs, because by default it emails after executing.  It's not something I have to set manually.

On Fri, 2003-10-03 at 11:58, Dean Lambourn wrote:
I have a similiar or perhaps the same problem. After a reboot, Amanda 
emails backup summaries for about a day. After that it stops. If I 
manually run amcheck (provided there is a problem) after it stops, it 
sends an email but anything initiated by the cron does not.

Both root's and amanda's mailboxs are empty.

I'm running RH7.3.

donald.ritchey AT exeloncorp DOT com wrote:
> Kanwar:
> 
> Check the contents of your root user's mailbox on this system.  If cron 
> is not completely configured to send e-mails to the accounts which run 
> the cron commands, then the e-mails from cron have probably ended up in 
> the root mailbox.  Anything sent to standard out/error from a cron 
> process will be mailed somewhere, unless that functionality is disabled.
> 
> I am more used to individual crontab files, which gives cron the best
> clue as to which user ID receives the e-mailed output, but that should
> also work here (although I have no experience with the version of cron
> that you are using).  Start out with a simple "Hello, world" type of 
> cron entry and track down the output from there.
> 
> Run something like the following for a few minutes to track down the 
> processes and where they lead.  It will give you more insight into
> how e-mail from cron is handled.
> 
> * * * * *	amanda	echo "Hello World" && sleep 45 && echo "Hello,
> Again"
> 
> Then, do a ps command to find the pipeline:
> 	ps -fea |grep "Hello"
> 
> Then, run lsof on the processes you found to see where all the file 
> connections go
> 	lsof -p <process ID1> -p <process ID2> ...
> 
> Hope this helps,
> 
> Don
> 
> Donald L. (Don) Ritchey
> E-mail:  Donald.Ritchey AT exeloncorp DOT com
> 
> -----Original Message-----
> From: M3 Freak [mailto:m3freak AT rogers DOT com]
> Sent: Friday, October 03, 2003 9:15 AM
> To: amanda-users AT amanda DOT org
> Subject: Amanda not sending emails
> 
> 
> Hello,
> 
> I have amanda set up and it runs great, however I'm experiencing one
> problem and I don't know how to fix it.  This is what I have setup in
> the "/etc/crontab" file:
> 
> # amanda
> 00 15 * * 1-5 amanda /usr/sbin/amcheck -m DailySet1
> 01 0 * * 2-6 amanda /usr/sbin/amdump DailySet1 && mt -f /dev/nst0
> rewoffl
> 
> I don't think I've set that up incorrectly, however I'm not getting
> emails from amanda after a backup is performed, or if any problems are
> found with the tape (e.g. user forgot to change tapes).  The really
> strange part is that if I "su" as the amanda user, and then run amreport
> on the log file manually, I get an email right away.  I can also run
> amcheck with the "m" flag, and an email is sent immediately.
> 
> Any ideas?  BTW, I'm running a RH9 system.
> 
> Thanks,
> 
> Kanwar Sandhu
> 
> 
> ************************************************************************
> This e-mail and any of its attachments may contain Exelon Corporation
> proprietary information, which is privileged, confidential, or subject 
> to copyright belonging to the Exelon Corporation family of Companies. 
> This e-mail is intended solely for the use of the individual or entity 
> to which it is addressed.  If you are not the intended recipient of this 
> e-mail, you are hereby notified that any dissemination, distribution, 
> copying, or action taken in relation to the contents of and attachments 
> to this e-mail is strictly prohibited and may be unlawful.  If you have 
> received this e-mail in error, please notify the sender immediately and 
> permanently delete the original and any copy of this e-mail and any 
> printout. Thank You.
> ************************************************************************
>