CDH分支节点无法被监听,错误提示ValueError: too many values to unpack

分享一个我的公众号,最近突然想玩公众号,之前做过一段时间前端开发,考虑到现在应用程序越来越多,未来社会一定是一个充满“只有你想不到,没有你做不到”的App的世界!而微信小程序又给我们这群喜爱开发的童鞋们提供了友好的入门机会,因此,不如就在当下,开始一步一步的学习并开发自己的小程序吧。这是我的公众号:目的是和大家讨论小程序开发,同时也带着开发小白入门设计开发微信小程序,来吧,加入!

 

正文:

 

检查系统是否安装有两个版本的JDK,配置文件是不是指向了oracleJDK,我的情况是指向了openJDK,就先按照我的另一个博客(http://blog.csdn.net/data8866/article/details/60869118),修改了系统的环境变量,使之指向oracleJDK。

一般情况下卸载了openJDK之后应该问题已经解决,入围解决可查看一下链接:https://community.cloudera.com/t5/Cloudera-Manager-Installation/Mismatched-CDH-versions-host-has-NONE-but-role-expect-5/td-p/48780

里边有CM专业人士的回答:

 

I just tested a proposed fix that I think is pretty safe if you need to get by this problem in the agent without uninstalling OpenJDK.

DISCLAIMER:

 

This code change worked properly in my personal testbed and I think it is sound, but Cloudera engineering will need to confirm or provide an altenate fix.  Use at your own risk.

 

Possible code fix for the agent issue.  You can perform these steps on the agent host where the problem occurs:

 

 

(1)

 

Find your "client_configs.py" file.  For 5.9.0 it will be:

 

/usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.9.0-py2.7.egg/cmf/client_configs.py

 

The version number after the "cmf-" in cmf-5.9.0-py2.7.egg will reflect your version number.  If you are on 5.8.3 it will look like this:

 

/usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.8.3-py2.7.egg/cmf/client_configs.py

 

(2)

 

Back up your "client_configs.py file (cp client_configs.py client_configs.py.original for example)

 

(3)

 

Edit client_configs.py with the following diff as your guide:

 

diff -u client_configs.py.original_cdh583 client_configs.py
--- client_configs.py.original_cdh583 2017-01-03 08:28:23.922822423 -0800
+++ client_configs.py 2017-01-03 08:26:56.073261511 -0800
@@ -441,7 +441,12 @@
ret = {}
for line in output.splitlines():
if line.startswith("/"):
- path, _, _, priority_str = line.rstrip().split(" ")
+ #path, _, _, priority_str = line.rstrip().split(" ")
+ #proposed fix for Cloudera Internal Jira OPSAPS-38086
+ thisLine = line.rstrip().split(" ")
+ path = thisLine[0]
+ priority_str = thisLine[-1]

 

Basically, all you are doing is commenting out

path, _, _, priority_str = line.rstrip().split(" ")
and then adding:

 

thisLine = line.rstrip().split(" ")
path = thisLine[0]
priority_str = thisLine[-1]

 

WARNING:  Make sure the indentiation is exact as python requires it.  The end result should look like this (chanages in red):

 

   for line in output.splitlines():
      if line.startswith("/"):
        #path, _, _, priority_str = line.rstrip().split(" ")
        #proposed fix for OPSAPS-38086
        thisLine = line.rstrip().split(" ")
        path = thisLine[0]
        priority_str = thisLine[-1]

 

        # Ignore the alternative if it's not managed by CM.
        if CM_MAGIC_PREFIX not in os.path.basename(path):
 

(4)

 

Save and restart the agent on the host where you made the code change:

 

service cloudera-scm-agent restart

 

Note: The code change merely creates a list of the "split" elements rather than hard-coding the columns.  The code only needs the first and last columns, so if we take the first and last elements in the list, the code is happy.

 

This means the following "update-alternatives --display" output will no longer cause the exception in the agent:

 

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre - family java-1.8.0-openjdk.x86_64 priority 1800111

 

Please test if you have the skills to modify files and let me know your results.

 

我的问题就这么解决了,可能出现的问题略有不同,仅供参考。

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值