CDH分支节点无法被监听,错误提示ValueError: too many values to unpack
来源:互联网 发布:26周胎儿四维彩超数据 编辑:程序博客网 时间:2024/06/06 04:49
检查系统是否安装有两个版本的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-
(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.el
Please test if you have the skills to modify files and let me know your results.
我的问题就这么解决了,可能出现的问题略有不同,仅供参考。
- CDH分支节点无法被监听,错误提示ValueError: too many values to unpack
- 关于错误:ValueError: too many values to unpack
- ValueError: too many values to unpack
- ValueError: too many values to unpack (expected 2)
- ValueError: too many values to unpack (expected 2)
- python错误for k,v in d: ValueError: too many values to unpack
- 关于Android 4.0编译生成Recovery的一个错误:ValueError: too many values to unpack
- python2.7错误for k,v in dict: ValueError: too many values to unpack
- 关于 Python opencv 使用中的 ValueError: too many values to unpack
- Python too many values to unpack
- to many values to unpack
- 关于解决cv2.findContours返回值too many values to unpack (expected 2)的问题
- 解决cv2.findContours返回值too many values to unpack (expected 2)的问题
- ValueError: need more than 1 values to unpack
- ValueError: not enough values to unpack (expected 3, got 0)
- ValueError: not enough values to unpack (expected 2, got 1)
- 学习Programming the Semantic Web遇到的问题(二)——python:too many values to unpack
- ORA-00913: too many values 错误分析
- Windows10安装TensorFlow GPU版本
- TransactionalConfiguration
- springboot整合Quartz实现动态配置定时任务
- 树莓派学习札记(一)
- These values must match for an upgrade to be allowed.
- CDH分支节点无法被监听,错误提示ValueError: too many values to unpack
- 底部导航之RadioGroup
- Android5.0、6.0新特性(1)
- P1265 公路修建
- Java设计模式:装饰者模式
- 超级素数幂解题报告
- 【JavaScript】异步编程,保证同时完成的方法
- 上传图片时js验证图片大小、尺寸、格式
- leetcode 455. Assign Cookies