最终解决了。
Unable to retrieve non-local non-loopback IP address. Seeing address: cm/127.0.0.1
这个问题修改host,把这个注释掉 #127.0.0.1 cm 感谢einhep的指点。
分发parcels到各个节点 ”,一直处在0% 这个问题,查看agent日志会发现:
[19/Apr/2017 14:23:20 +0000] 25170 MainThread agent ERROR Caught unexpected exception in main loop.
Traceback (most recent call last):
File "/usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.10.0-py2.7.egg/cmf/agent.py", line 710, in __issue_heartbeat
self._init_after_first_heartbeat_response(resp_data)
File "/usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.10.0-py2.7.egg/cmf/agent.py", line 947, in _init_after_first_heartbeat_response
self.client_configs.load()
File "/usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.10.0-py2.7.egg/cmf/client_configs.py", line 682, in load
new_deployed.update(self._lookup_alternatives(fname))
File "/usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.10.0-py2.7.egg/cmf/client_configs.py", line 432, in _lookup_alternatives
return self._parse_alternatives(alt_name, out)
File "/usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.10.0-py2.7.egg/cmf/client_configs.py", line 444, in _parse_alternatives
path, _, _, priority_str = line.rstrip().split(" ")
ValueError: too many values to unpack
解决方案是修改 /usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.10.0-py2.7.egg/cmf/client_configs.py 这个脚本的第444行。
for line in output.splitlines():
if line.startswith("/"):
if len(line.rstrip().split(" "))<=4:
path, _, _, priority_str = line.rstrip().split(" ")
# Ignore the alternative if it's not managed by CM.
if CM_MAGIC_PREFIX not in os.path.basename(path):
continue
try:
priority = int(priority_str)
except ValueError:
THROTTLED_LOG.info("Failed to parse %s: %s", name, line)
key = ClientConfigKey(name, path)
value = ClientConfigValue(priority, self._read_generation(path))
ret[key] = value
else:
pass
return ret
添加 if len(line.rstrip().split(" "))<=4: 和 else: pass;
再次感谢各位的帮助,谢谢。 |