Pivotal Knowledge Base

Follow

Stopping Oozie via Ambari fails with error message "/var/tmp/oozie: No such file or directory"

Environment

Product Version
Ambari 1.7.1 / 2.1.2
Pivotal HD 3.0.x
OS RHEL / CENTOS

Symptom

When trying to stop Oozie via Ambari, the shutdown fails in the following manner in Ambari:

 The following was the error message:

  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 291, in _call
raise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of 'cd /var/tmp/oozie && /usr/phd/current/oozie-server/bin/oozie-stop.sh' returned 1. -bash: line 0: cd: /var/tmp/oozie: No such file or directory

Cause

/var/tmp/oozie was removed by the operating system as all files had not been touched for more than 30 days. Indeed, in RHEL /CENTOS systems, the /etc/cron.daily/tmpwatch script will run daily and look for files and directories in /var/tmp/ that are unmodified for more than 30 days and remove them as shown below:

[root@amb171hawq cron.daily]# cat /etc/cron.daily/tmpwatch
#! /bin/sh
flags=-umc
/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \
-x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix \
-X '/tmp/hsperfdata_*' 10d /tmp
/usr/sbin/tmpwatch "$flags" 30d /var/tmp
for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
if [ -d "$d" ]; then
/usr/sbin/tmpwatch "$flags" -f 30d "$d"
fi
done
[root@amb171hawq cron.daily]#

Resolution

As the user "root" on the Oozie server node, complete the following tasks:

1. Create the directory /var/tmp/oozie:

mkdir /var/tmp/oozie

2. Grant the correct permissions to the directory:

#chown oozie:hadoop /var/tmp/oozie
#chmod 755 /var/tmp/oozie
# ls -ltrd /var/tmp/oozie/
drwxr-xr-x. 3 oozie hadoop 4096 Mar 11 11:16 /var/tmp/oozie/

3. Try to stop Oozie again via Ambari. 

 

Comments

Powered by Zendesk