yarn nodemanager doesn't start - Caused by: EPERM: Operation not permitted

I was dealing with this YarnRuntimeException recently and thought it might be useful for folks who encounter this situation.  

Both Namenode and Datanode is up and running and it was time to start the yarn daemons. ResourceManager came up just fine while the nodemanager stalled with the following exception. 

"
2014-04-19 03:46:37,595 INFO org.apache.hadoop.service.AbstractService: Service org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService failed in state INITED; cause: org.apache.hadoop.yarn.exceptions.YarnRuntimeException: Failed to initialize LocalizationService
org.apache.hadoop.yarn.exceptions.YarnRuntimeException: Failed to initialize LocalizationService
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService.serviceInit(ResourceLocalizationService.java:234)
        at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
        at org.apache.hadoop.service.CompositeService.serviceInit(CompositeService.java:107)
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.ContainerManagerImpl.serviceInit(ContainerManagerImpl.java:220)
        at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
        at org.apache.hadoop.service.CompositeService.serviceInit(CompositeService.java:107)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.serviceInit(NodeManager.java:186)
        at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartNodeManager(NodeManager.java:357)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.main(NodeManager.java:404)
Caused by: EPERM: Operation not permitted
"

Looking at the nodemanager logs and searching the internet for a while the initial impression was, yarn user doesn't have sufficient privileges to mkdir using "yarn.nodemanager.local-dirs". But, in the next couple of minutes my assumptions were wrong. 

After digging into the source,  it turns out that, the log folder configured in the yarn-site.xml (yarn.nodemanager.log-dirs)  doesn't belong to yarn user group. 
Doing a chown -R yarn:yarn (assuming yarn being the name of the yarn user) on the log dir helped in bringing up the nodemanager. 

Comments

Anonymous said…
Thanks that helped
Anonymous said…
Helped me too! Thanks!
Tejuteju said…
Really Good blog post. provided a helpful information. I hope that you will post more updates like this Big Data Hadoop Online Course
Unknown said…
Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updating Big data online training

Popular posts from this blog

How to find the source branch of a branch in git

gpg: cancelled by user