问题:

为cdh新增节点时,在分配datanode后,启动报错

Can't open /software/opt/cloudera-manager/cm-5.11.2/run/cloudera-scm-agent/process/642-hdfs-DATANODE/config.zip: 权限不够.
Can't open /software/opt/cloudera-manager/cm-5.11.2/run/cloudera-scm-agent/process/642-hdfs-DATANODE/proc.json: 权限不够.
Can't open /software/opt/cloudera-manager/cm-5.11.2/run/cloudera-scm-agent/process/642-hdfs-DATANODE/config.zip,Permission deny
Can't open /software/opt/cloudera-manager/cm-5.11.2/run/cloudera-scm-agent/process/642-hdfs-DATANODE/proc.zip,Permission deny 以为是权限问题,chmod -R 777 /software/opt/cloudera-manager/cm-5.11.2/run/cloudera-scm-agent/process,重启后生成新的文件夹,权限还是有问题,推测是启动过程中root用去创建了,接着hdfs去读这个文件,所以报错 解决: 当重启时,此处将进程挂起3分钟,手动用root用户将/youdir/opt/cloudera-manager/cm-5.11.2/run/cloudera-scm-agent/process目录改为777,然后,没有然后,只需等待,3分钟后,居然就成功了,成功了。
/youdir/opt/cloudera-manager/cm-5.11.2/lib64/cmf/service/common/cloudera-config.sh
# When created, the final resting place of config files is unknown,
# so it is marked as {{CMF_CONF_DIR}}. We know what this directory will
# be here in this script, so search-replace it.
replace_conf_dir() {
echo "CONF_DIR=$CONF_DIR"
echo "CMF_CONF_DIR=$CMF_CONF_DIR" ############fix the Can't open /youdir/opt/cloudera-manager/cm-5.11.2/run/cloudera-scm-agent/process/642-hdfs-DATANODE/config.zip, ###################
############fix the Can't open /youdir/opt/cloudera-manager/cm-5.11.2/run/cloudera-scm-agent/process/642-hdfs-DATANODE/proc.json ###################
sleep 3m; ############fix end############################# # Exclude files that we don't want to be modified. (OPSAPS-37023)
EXCLUDE_CMF_FILES=('cloudera-config.sh' 'httpfs.sh' 'hue.sh' 'impala.sh' 'sqoop.sh' 'supervisor.conf' '*.log' '*.keytab' '*jceks')
find $CONF_DIR -type f ! -path "$CONF_DIR/logs/*" $(printf "! -name %s " ${EXCLUDE_CMF_FILES[@]}) -exec perl -pi -e "s#{{CMF_CONF_DIR}}#$CONF_DIR#g" {} \;
}

分析:

在日志中

中发现在find命令后,报错,那就在find命令前将进程挂起,修改目录权限,待执行find时,权限已符合要求

+ EXCLUDE_CMF_FILES=('cloudera-config.sh' 'httpfs.sh' 'hue.sh' 'impala.sh' 'sqoop.sh' 'supervisor.conf' '*.log' '*.keytab' '*jceks')
++ printf '! -name %s ' cloudera-config.sh httpfs.sh hue.sh impala.sh sqoop.sh supervisor.conf '*.log' hdfs.keytab '*jceks'
+ find /software/opt/cloudera-manager/cm-5.11.2/run/cloudera-scm-agent/process/642-hdfs-DATANODE -type f '!' -path '/software/opt/cloudera-manager/cm-5.11.2/run/cloudera-scm-agent/process/642-hdfs-DATANODE/logs/*' '!' -name cloudera-config.sh '!' -name httpfs.sh '!' -name hue.sh '!' -name impala.sh '!' -name sqoop.sh '!' -name supervisor.conf '!' -name '*.log' '!' -name hdfs.keytab '!' -name '*jceks' -exec perl -pi -e 's#{{CMF_CONF_DIR}}#/software/opt/cloudera-manager/cm-5.11.2/run/cloudera-scm-agent/process/642-hdfs-DATANODE#g' '{}' ';'
Can't open /software/opt/cloudera-manager/cm-5.11.2/run/cloudera-scm-agent/process/642-hdfs-DATANODE/config.zip: 权限不够.
Can't open /software/opt/cloudera-manager/cm-5.11.2/run/cloudera-scm-agent/process/642-hdfs-DATANODE/proc.json: 权限不够.
+ make_scripts_executable
+ find /software/opt/cloudera-manager/cm-5.11./run/cloudera-scm-agent/process/-hdfs-DATANODE -regex '.*\.\(py\|sh\)$' -exec chmod u+x '{}' ';'
+ '[' DATANODE_MAX_LOCKED_MEMORY '!=' '' ']'
+ ulimit -l

参考文章:https://blog.csdn.net/u011120550/article/details/80598653

cdh启动datanode报错的更多相关文章

  1. maven 项目启动tomcat报错 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    maven项目启动tomcat报错: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi ...

  2. 【转】Eclipse下启动tomcat报错:/bin/bootstrap.jar which is referenced by the classpath, does not exist.

    转载地址:http://blog.csdn.net/jnqqls/article/details/8946964 1.错误: 在Eclipse下启动tomcat的时候,报错为:Eclipse下启动to ...

  3. 学习中的错误——ubuntu 14.04 LTS 启动eclipse报错

    在ubuntu中启动eclipse报错:(Eclipse:15978): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assert ...

  4. tomcat7 启动项目报错 java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()

    JDK版本:jdk1.8.0_77 Tomcat 版本:apache-tomcat-7.0.47 异常重现步骤: 1.完成项目部署 2.启动Tomcat 异常头部信息:java.lang.NoSuch ...

  5. Eclipse中启动tomcat报错:A child container failed during start

    我真的很崩溃,先是workspace崩了,费了好久重建的workspace,然后建立了一个小demo项目,tomcat中启动却报错,挑选其中比较重要的2条信息如下: A child container ...

  6. Ubuntu下安装了java但启动eclipse报错说没装java

    参考资料:http://blog.csdn.net/happyteafriends/article/details/8290950 一.问题 在Ubuntu下安装了java并在~/.bashrc配置了 ...

  7. VirtualBox启动虚拟机报错0x80004005

    Unable to load R3 module C:\Program Files\Oracle\VirtualBox/VBoxDD.DLL (VBoxDD): GetLastError=1790 ( ...

  8. Eclipse启动Tomcat报错,系统缺少本地apr库

    Eclipse启动Tomcat报错,系统缺少本地apr库. Tomcat中service.xml中的设置情况. 默认情况是HTTP协议的值:protocol="HTTP/1.1" ...

  9. 启动php-fpm报错:please specify user and group other than root

    安装好PHP之后启动报错: 启动php-fpm报错:please specify user and group other than root, pool 'default 修改 php-fpm.co ...

随机推荐

  1. 学习笔记TF055:TensorFlow神经网络简单实现一元二次函数

    TensorFlow运行方式.加载数据.定义超参数,构建网络,训练模型,评估模型.预测. 构造一个满足一元二次函数y=ax^2+b原始数据,构建最简单神经网络,包含输入层.隐藏层.输出层.Tensor ...

  2. git 创建删除分支

    进入仓库目录 -- 查看本地分支 git branch -- 查看远程分支 git branch -r -- 查看远程和本地的分支 git branch -a -- 下载远程分支代码,并切换到分支 进 ...

  3. Linux主机安全配置规范

    一.账号口令 1 配置口令最小长度     在文件/etc/login.defs中设置 PASS_MIN_LEN,参考值:8 2 配置口令生存周期     在文件/etc/login.defs中设置 ...

  4. VCenter6.0.0的安装过程

    背景和实验环境介绍 操作系统环境:windows 2008R2 中文企业版 前期环境配置 配置IP信息,把DNS改成自己的IP 修改主机名和后缀 安装和配置DNS服务 Vcenter 添加dns角色 ...

  5. java web中分层MVC的意义

    在web编程中,由于高内聚.低耦合的特点,需要将多个类实现多层,大致有以下几层:①entity,实体类,如user,role等,这些类里边包含了私有属性和公共的get.set方法这和数据库中的表相对应 ...

  6. 截止2017年,最新的全国行政区划代码数据源(xml)

    <?xml version="1.0" encoding="utf-8"?> <Root xmlns:xsd="http://www ...

  7. version `GLIBC_2.17' not found 解决方法

    1.先查看是哪个函数用的是GLIBC_2.17 root@emb-pc:/home/emb/temp# nm lib61850.so | grep GLIBC_2.17 U clock_gettime ...

  8. python判断平台

    网上找到的判断平台的方法,特此记录 # -*- coding: utf-8 -*- import platform osName = platform.system() if(osName == 'W ...

  9. 未来-区块链-Micron:区块链永远不会忘记:内存对这项革命性技术的推动作用

    ylbtech-未来-区块链-Micron:区块链永远不会忘记:内存对这项革命性技术的推动作用 1.返回顶部 1. 俗话说,大象永远不会忘记.区块链亦是如此. 内存是区块链的核心,它是一种以关键方式构 ...

  10. 小程序sitemap配置

    这几天在官网文档中发现小程序也支持索引了链接,就是是在根目录下新建sitemap.json 文件. { "rules": [ { "action": " ...