Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: CDH3b3
-
Fix Version/s: CDH3u4
-
Component/s: Hadoop Common, Packaging
-
Labels:None
Description
According to a comment in bin/hadoop:
# Even though we are trying to run a non-detached datanode, # jsvc will not write to stdout/stderr, so we have to pipe # it and tail the logfile.
Then, on line 407 of bin/hadoop we have:
tail -f $log_path &
However, this tail process is never cleaned up. After a while of restarting datanodes on a machine, one might see a lot of tails:
bash4.1$ ps -ef | grep jsvc root 893 1 0 Oct16 ? 00:00:05 tail -f /tmp/jsvc_datanode.857 root 1730 1 0 Oct16 ? 00:00:05 tail -f /tmp/jsvc_datanode.1691 root 1794 1 0 Oct19 ? 00:00:02 tail -f /tmp/jsvc_datanode.1755 root 1801 1 0 Oct18 ? 00:00:04 tail -f /tmp/jsvc_datanode.1765 root 1805 1 0 Oct16 ? 00:00:05 tail -f /tmp/jsvc_datanode.1771 root 1891 1 0 Oct16 ? 00:00:05 tail -f /tmp/jsvc_datanode.1857 root 2165 1 0 Oct16 ? 00:00:06 tail -f /tmp/jsvc_datanode.2130 root 2301 1 0 Oct16 ? 00:00:05 tail -f /tmp/jsvc_datanode.2267 root 2417 1 0 Oct16 ? 00:00:05 tail -f /tmp/jsvc_datanode.2383 root 2643 1 0 Oct16 ? 00:00:05 tail -f /tmp/jsvc_datanode.2608 root 2987 1 0 Oct19 ? 00:00:02 tail -f /tmp/jsvc_datanode.2953 root 3596 1 0 Oct19 ? 00:00:03 tail -f /tmp/jsvc_datanode.3562 root 4450 1 0 Oct16 ? 00:00:06 tail -f /tmp/jsvc_datanode.4415 root 5331 1 0 Oct16 ? 00:00:05 tail -f /tmp/jsvc_datanode.5295 root 6042 1 0 Oct16 ? 00:00:05 tail -f /tmp/jsvc_datanode.6001 root 8663 1 0 Oct06 ? 00:00:09 tail -f /tmp/jsvc_datanode.8629 root 11289 1 0 Oct06 ? 00:00:08 tail -f /tmp/jsvc_datanode.11237 root 11353 1 0 Oct06 ? 00:00:09 tail -f /tmp/jsvc_datanode.11319 root 11526 1 0 Oct06 ? 00:00:09 tail -f /tmp/jsvc_datanode.11492