Operating System - HP-UX
1832777 Members
3395 Online
110045 Solutions
New Discussion

Re: Unix oracle ID mail accounts have lots of mail

 
q1w2e3r4
New Member

Unix oracle ID mail accounts have lots of mail

Hello ,

Iam a newbie on this kind of problems . I am on HP-UX 11 and am getting the below error :-

From oradbs01_a@ Sun Jul 27 12:45:04 EDT 2008
Received: (from oradbs01_a@localhost)
by grrapi22.na.steelcase.net (8.11.1/8.11.1) id m6RGj2x16586
for oradbs01_a; Sun, 27 Jul 2008 12:45:02 -0400 (EDT)
Date: Sun, 27 Jul 2008 12:45:02 -0400 (EDT)
From: oradbs01_a@
Message-Id: <200807271645.m6RGj2x16586@>
Cron: can't change directory to your home directory.
Your commands will not be executed.

--

My Questions :-
1] How Do I investigate the above problem ?
2] What could be the actual problem ?
3] My cron does have absolute paths for all the jobs .

Let me know.
9 REPLIES 9
Anshumali
Esteemed Contributor

Re: Unix oracle ID mail accounts have lots of mail

1] How Do I investigate the above problem?
You can write the output of the cron entry to a file and enable set -x in script.
2] What could be the actual problem ?
Point 1 will suggest it :)
3] My cron does have absolute paths for all the jobs .
Does it has the env paths set as well..
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Steven E. Protter
Exalted Contributor

Re: Unix oracle ID mail accounts have lots of mail

Shalom,

Key part of the message:
Cron: can't change directory to your home directory.
Your commands will not be executed.

You have a cron script probably part of oracle cron that can not execute the commands it is being asked to execute.

1] Add a set -x to the script and direct cron job output to an actual file. Remember cron has no preset PATH variable and this is the source of many issues.
2] Almost certainly code that works from the command line and does not work in cron to to environmental differences.
3] You can add a PATH to cron and using absolute path in your cron scripts can avoid these issues.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
IG_2
Advisor

Re: Unix oracle ID mail accounts have lots of mail

Shalom,

1sf of all determine the script the cron tries to execute (crontab -l on behalf of oradbs01_a). After that check what actions the script is inteneted to do (cat|vi|more . Then check if you $HOME directory - /etc/passwd for user oradbs01_a - is correct one.

Regards,
q1w2e3r4
New Member

Re: Unix oracle ID mail accounts have lots of mail

Hello ,

Thanks for your replies.

I cannot touch the scripts in the cron . But now I need to find out :-

1] Where are the mailbox for a particular id ?
2] How do I clean the mails from an id ?
3] Eaxctly how is the mail generated from the scripts/jobs in the cron ?

Let me know
Anshumali
Esteemed Contributor

Re: Unix oracle ID mail accounts have lots of mail

1] Where are the mailbox for a particular id ?
/var/mail/user
2] How do I clean the mails from an id ?
cd /var/mail/
>user
3] Eaxctly how is the mail generated from the scripts/jobs in the cron ?
completion/messages goes to your inbox. explicitly, you can also send them to other id's using mailx, sendmail...
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Dennis Handly
Acclaimed Contributor

Re: Unix oracle ID mail accounts have lots of mail

>2] What could be the actual problem?

If your home directories are over NFS, it could be that NFS decided to take a vacation during the cronjob. Are you still getting these messages.

>I cannot touch the scripts in the cron

Why not? Do you have root?
q1w2e3r4
New Member

Re: Unix oracle ID mail accounts have lots of mail

Thanks for all your replies.

I was looking at the error's in /var/mail/ files and also found some of the below :-
1]
sh: /oracle/admin/devl/SID/logs/cron_errors.log: Cannot create the specified file.
********************************************
Cron: The previous message is the standard output and standard error of one of your crontab commands:

2]
sh: /oracle/admin/devl/DBS01_A/logs/cron_errors_dbmonitor_hourly.log: Cannot create the specified file.

My questions :-
1] iam assuming that my env has some mismatch, but is this the same reason for the above 2 error's ?

2] I have around 8 HP-UX servers and I need to have a proper soln or the most appropriate solution to the above. What would you all suggest ? Just setting PATH in cron would help ? How do I set PATH in a cron ?

3] We do have weekend failover testing. Could this be one of the cause?
4] My typical /etc/passwd has the follwoing :-

root:*:0:3::/:/sbin/sh
daemon:*:1:5::/:/sbin/sh
bin:*:2:2::/usr/bin:/sbin/sh
sys:*:3:3::/:
adm:*:4:4::/var/adm:/sbin/sh
uucp:*:5:3::/var/spool/uucppublic:/usr/lbin/uucp/uucico
lp:*:9:7::/var/spool/lp:/sbin/sh
nuucp:*:11:11::/var/spool/uucppublic:/usr/lbin/uucp/uucico
hpdb:*:27:1:ALLBASE:/:/sbin/sh
nobody:*:-2:-2::/:
www:*:30:1::/:
smbnull:*:114:101:DO NOT USE OR DELETE - needed by Samba:/home/smbnull:/sbin/sh
sshd:*:134:134:sshd privsep:/var/empty:/bin/false
iwww:*:80:1::/home/iwww:/sbin/sh
owww:*:81:1::/home/owww:/sbin/sh
hpsmh:*:79:79:System Management Homepage:/home/hpsmh:/sbin/sh
:sthanawa /oracle 33> id
uid=100(oracle) gid=200(dba) groups=4024(ftpmpwh),129(fnusr),310(oinstall)
grrapi22:sthanawa /oracle 34>

Let me know.


Deepak Kr
Respected Contributor

Re: Unix oracle ID mail accounts have lots of mail

Hi,

Provide

crontab -l output.

Also cat scripts there...

if possible run the scripts mentioned in cron using sh +x for debugging...and look for errors...


Regds,

Deepak
"There is always some scope for improvement"
Dennis Handly
Acclaimed Contributor

Re: Unix oracle ID mail accounts have lots of mail

>1] I am assuming that my env has some mismatch, but is this the same reason for the above 2 errors?

Yes.

>sh: /oracle/admin/devl/SID/logs/cron_errors.log: Cannot create the specified file.

Basically you need to look at the permissions of the directory logs/. Does the current user have write permission for it? Also it needs permissions on the whole path to even see logs/.
Check this in your crontab with:
ll -d /oracle/admin/devl/SID/logs

If oradbs01_a doesn't have permission to write, you could create the file under a user that does, then adjust the permission to allow group or everyone to write, or use ACLs to allow that user to write.