一、问题描述
初始化 master standby 时(包括 "gpinitsystem -s " 和 " gpinitstandby -s ")时,屏幕标准输出报错 standby 节点启、停失败,而在debug模式下报错:
[DEBUG]:-get pids cmdStr='ssh -o 'StrictHostKeyChecking no' master_s ". /home/gpadmin/greenplum/greenplum_path.sh; python -c 'from gppylib.commands import unix; print unix.getDescendentProcesses(10571)'"' had result: cmd had rc=1 completed=True halted=False
stdout=''
stderr='Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/gpadmin/greenplum/lib/python/gppylib/commands/unix.py", line 968, in getDescendentProcesses
for p in psutil.Process(pid).children(recursive=True):
AttributeError: 'Process' object has no attribute 'children'
二、解决
通过 pip 或 easy_install 命令升级 psutil 模块
三、其他
我初次安装时用的psutil,是通过rpmsearch下载的python-psutil包安装的,该版本为1.2.1。
来源:oschina
链接:https://my.oschina.net/u/1171200/blog/749051