Search This Blog

Monday, February 20, 2017

Crontab is not working for oracle user suddenly

Hello DBA's,

Just wanted to share my simple mistake made crontab to skip all the jobs under oracle user. Here i have written the issue detail. This will help for those who work in solaris platform.
Kindly go through!

Just i figured out rman backup dint run for past two days in production. I immediately checked the permission for the scripts and mount point space to see we have sufficient space. Everything was fine.

At initial level i could not figure out the cause. I could not figure out anything after looking into logs.

You can check crontab logs in /var/cron/log for crontab jobs log. This is what i could see for the failed attempts.

>  oracle 9575 c Mon Feb 20 10:00:00 2017
! bad user (oracle) Mon Feb 20 10:00:00 2017
<  oracle 9575 c Mon Feb 20 10:00:00 2017 rc=1
>  CMD: sh /u02/backup/scripts/rman_full.sh


After digging into solaris forums i though this error "! bad user (oracle) Mon Feb 20 10:00:00 2017" could cause this issue. Few experts were posted as this error will trip due to account lock. So i check the account expiry date for oracle.

Use the below command :

logins -ax -l oracle

I made the oracle user as non-expire account but dint work. Use the command below to make any user to have no expiry date.

passwd -x -1 oracle

I checked whether cron services are running and it was also running fine,

svcs -a | grep cron

I add the below test job to trouble shoot the issue. This will run every one minute.

*   *  *  *   *  echo test >> /tmp/test.log

Also i check whether oracle user is locked but it was unlocked. you can check this in /etc/passwd. In case if its locked you can unlock by simply resetting the password for oracle user.

! bad user (oracle) Mon Feb 20 10:00:00 2017 --> This error can be fixed by just resetting the password but in case there is no issue with oracle user. so i still had to troubleshoot.

Finally i checked whether host entries are fine and found out -i have been set to hostname. This is due to wrong command entered accidentally to find ip address. hostname -i will not work in solaris like it does in linux. whatever we enter followed by hostname command will be set as hostname in solaris. so i did :

hostname <hostname> as root user.

After this my jobs were started running as usual. Hope this helps! 

You cannot complete this task because one of the following events caused a loss of page data: A system failure has occurred "Front end is locked after 12.2 upgrade"

  If you have upgraded to Oracle E-Business Suite 12.2.10 Release Update Pack from Oracle E-Business Suite 12.2.6 Release Update Pack (or ea...