Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

hadoop-httpfs daemon gave up supervising hadoop-httpfs

Highlighted

hadoop-httpfs daemon gave up supervising hadoop-httpfs

New Contributor

Mar 02 10:46:36 norad-13365-hadoop-mgr-1 sh[27852]: mkdir: cannot create directory '/var/run/hadoop-httpfs': Permission denied

Mar 02 10:46:36 norad-13365-hadoop-mgr-1 systemd[1]: hadoop-httpfs.service: control process exited, code=exited status=1

Mar 02 10:46:36 norad-13365-hadoop-mgr-1 systemd[1]: Failed to start The Hadoop httpfs daemon.

Systemd service is configured (by creating symbolic link - /usr/hdp/current/hadoop-httpfs//usr/lib/systemd/system/hadoop-httpfs.service) as part of yum installation. This service file create /var/run/hadoop-httpfs dir using "httpfs" user. The 'httpfs' doesn't have permission due to that reason service failed after reboot the system

Currently the issue is this

[Service]
Type=forking
User=httpfs
Group=hadoop
Restart=on-failure
WorkingDirectory=-/var/run/hadoop-httpfs
....
....

ExecStartPre=/bin/sh -c 'test -d $HTTPFS_RUN || mkdir -p $HTTPFS_RUN'
ExecStartPre=/bin/sh -c 'test -d $HTTPFS_LOG || mkdir -p $HTTPFS_LOG'

Hence the above ExecStartPre state create the $HTTPFS_RUN dir as httpfs user

If it is added with PermissionsStartOnly=true above 'ExecStartPre' line, 'ExecStartPre' executes as a root and 'ExecStart' state is executed as httpfs user.