免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5255 | 回复: 1

[Salt] salt-minion 启动报错“ global name 'RSA' is not defined” [复制链接]

论坛徽章:
0
发表于 2016-03-11 11:27 |显示全部楼层
最近折腾 salt-minion ,用的是综合安装(胡乱安装,有些是源码,有些是 RPM 包安装),终于装完所有包,启动的时候却提示
salt-minion -l debug 提示:
[DEBUG ] Reading configuration from /etc/salt/minion
[DEBUG ] Using cached minion ID from /etc/salt/minion_id: GDZJ-MS-MMDS-SV04-GET04
[DEBUG ] Configuration file path: /etc/salt/minion
[WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
[INFO ] Setting up the Salt Minion "GDZJ-MS-MMDS-SV04-GET04"
[DEBUG ] Created pidfile: /var/run/salt-minion.pid
[DEBUG ] Reading configuration from /etc/salt/minion
[DEBUG ] Attempting to authenticate with the Salt Master at 192.168.70.1
[DEBUG ] Initializing new SAuth for ('/etc/salt/pki/minion', 'GDZJ-MS-MMDS-SV04-GET04', 'tcp://192.168.70.1:4506')
[INFO ] Generating keys: /etc/salt/pki/minion
[INFO ] The salt minion is shut down
[ERROR ] global name 'RSA' is not defined
[WARNING ] ** Restarting minion **
[INFO ] Sleeping random_reauth_delay of 6 seconds
日志的提示:
016-02-24 15:08:26,229 [salt.scripts ][ERROR ][162651] global name 'RSA' is not defined
2016-02-24 15:08:26,229 [salt.scripts ][WARNING ][162651] ** Restarting minion **
2016-02-24 15:08:33,523 [salt.scripts ][ERROR ][162671] global name 'RSA' is not defined
2016-02-24 15:08:33,523 [salt.scripts ][WARNING ][162671] ** Restarting minion **
2016-02-24 15:08:34,811 [salt.scripts ][ERROR ][162692] global name 'RSA' is not defined
2016-02-24 15:08:34,812 [salt.scripts ][WARNING ][162692] ** Restarting minion *^C
2016-02-24 15:08:44,104 [salt.scripts ][ERROR ][162712] global name 'RSA' is not defined
2016-02-24 15:08:44,105 [salt.scripts ][WARNING ][162712] * Restarting minion **
2016-02-24 15:08:50,394 [salt.scripts ][ERROR ][162732] global name 'RSA' is not defined
2016-02-24 15:08:50,394 [salt.scripts ][WARNING ][162732] ** Restarting minion **

论坛徽章:
1
IT运维版块每日发帖之星
日期:2016-04-30 06:20:00
发表于 2016-04-27 11:52 |显示全部楼层
  File "/usr/local/lib/python2.7/site-packages/salt/crypt.py", line 113, in gen_keys
    gen = RSA.gen_key(keysize, 65537, callback=lambda x, y, z: None)
NameError: global name 'RSA' is not defined

python包,导入RSA 报错
查看python包:RSA 来着M2Crypto 文件
    from M2Crypto import RSA, EVP

进入python 模式,导入M2Crypto

>>> import M2Crypto
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.linux-i686/egg/M2Crypto/__init__.py", line 22, in <module>
  File "build/bdist.linux-i686/egg/M2Crypto/__m2crypto.py", line 7, in <module>
  File "build/bdist.linux-i686/egg/M2Crypto/__m2crypto.py", line 6, in __bootstrap__
ImportError: libssl.so.1.0.0: cannot open shared object file: No such file or directory
>>>导入报错,原因,缺少 libssl.so.1.0.0 库文件

查看库文件 /sbin/ldconfig -v
找到 libssl.so.1.0.0 库
/usr/local/openssl-1.0.1g/lib:
        libcrypto.so.1.0.0 -> libcrypto.so.1.0.0
        libssl.so.1.0.0 -> libssl.so.1.0.0
libssl库是来着/usr/local/openssl-1.0.1g/lib:
而cat /etc/ld.so.conf 库文件配置中没有加入改目录
修改库文件为:
[root@linux3 ~]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
##add start  
/usr/local/zlib-1.2.8/lib ##安装完成后需要注释这个库文件,不然会出现ssh调用库文件冲突,无法启动ssh
/usr/local/openssl-1.0.1g/lib
##add end
[root@linux3 ~]# /sbin/ldconfig -v

启动salt-minion 正常
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP