0

yarn.nodemanager.local-dirs 文件夹的文件权限应该是什么?我弄乱了这些文件的权限,无法解决。目前我已将文件夹权限设置为 755 yarn:hadoop。每当我尝试运行节点管理器时,都会遇到 EPERM: Operation not allowed 错误。细节 -

2014-06-19 22:15:17,954 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService: usercache path : file://opt1/yarn/nm2/usercache_DEL_1403241103430
2014-06-19 22:15:17,954 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService: usercache path : file://opt1/yarn/nm2/usercache_DEL_1403241317919
2014-06-19 22:15:17,954 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService: usercache path : file://opt1/yarn/nm2/usercache_DEL_1403241109852
2014-06-19 22:15:17,954 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService: usercache path : file://opt1/yarn/nm2/usercache_DEL_1403241098628
2014-06-19 22:15:17,992 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:233)
        at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
        at org.apache.hadoop.service.CompositeService.serviceInit(CompositeService.java:108)
        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:108)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.serviceInit(NodeManager.java:188)
        at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartNodeManager(NodeManager.java:353)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.main(NodeManager.java:401)
Caused by: EPERM: Operation not permitted
        at org.apache.hadoop.io.nativeio.NativeIO$POSIX.chmodImpl(Native Method)
        at org.apache.hadoop.io.nativeio.NativeIO$POSIX.chmod(NativeIO.java:226)
        at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:629)
        at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:421)
        at org.apache.hadoop.fs.FileSystem.primitiveMkdir(FileSystem.java:1061)
        at org.apache.hadoop.fs.DelegateToFileSystem.mkdir(DelegateToFileSystem.java:157)
        at org.apache.hadoop.fs.FilterFs.mkdir(FilterFs.java:187)
        at org.apache.hadoop.fs.FileContext$4.next(FileContext.java:720)
        at org.apache.hadoop.fs.FileContext$4.next(FileContext.java:716)
        at org.apache.hadoop.fs.FSLinkResolver.resolve(FSLinkResolver.java:90)
        at org.apache.hadoop.fs.FileContext.mkdir(FileContext.java:716)
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService.serviceInit(ResourceLocalizationService.java:230)
        ... 9 more

尝试启动失败后,local-dirs 文件夹包含以下文件夹 - filecache、nmPrivate、3 usercache_DEL_timestamp。根据错误的位置(ResourceLocalizationService.java,第 233 行),三个可能的操作可能会引发此错误 -
a) 清理旧文件 - 这有效,如日志输出所示
b) 创建新文件 - 启动尝试失败后,我在local-dirs中看到了三种文件——三个usercache_DEL_*、filecache、nmPrivate文件。
c) 制作日志路径 - 我检查了日志文件夹以获得 yarn:hadoop 的 775 权限。

可能出了什么问题?我正在使用 Cloudera 来管理我的集群。

4

1 回答 1

0

你应该让你的nodemanager dir拥有执行权,chmod 700 ..(nodemanager dir)

于 2014-10-28T08:57:14.333 回答