02_已解决 [salt.minion :1758][ERROR ][52886] Returner mysql.returner could not be loaded: 'mysql' __virtual__ returned False: Could not import mysql returner; mysql python client is not installed.
总结:python2.7下的salt,要把 mysql-python也安装,并不是python3环境,看清,看清
Returners组件,master自动把值写入mysql数据库中,出现的问题
1、本地环境
1、版本信息
[root@localhost ~]# salt-call --versions-report
Salt Version:
Salt: 2018.3.4 Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: 1.2.5
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.5 (default, Aug 7 2019, 00:51:29)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4 System Versions:
dist: centos 7.3.1611 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-514.el7.x86_64
system: Linux
version: CentOS Linux 7.3.1611 Core
2、问题
minion报错
2019-11-29 00:49:19,893 [salt.minion :1758][ERROR ][52886] Returner mysql.returner could not be loaded: 'mysql' __virtual__ returned False: Could not import mysql returner; mysql python client is not installed.
master报错
2019-11-28 23:39:52,761 [salt.transport.zeromq:699 ][ERROR ][45236] Some exception handling a payload f
rom minion
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 695, in handle_message
ret, req_opts = yield self.payload_handler(payload)
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 882, in run
value = future.result()
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result
raise_exc_info(self._exc_info)
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 217, in wrapper
result = func(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/salt/master.py", line 1027, in _handle_payload
'clear': self._handle_clear}[key](load)
File "/usr/lib/python2.7/site-packages/salt/master.py", line 1058, in _handle_clear
ret = getattr(self.clear_funcs, cmd)(load), {'fun': 'send_clear'}
File "/usr/lib/python2.7/site-packages/salt/master.py", line 2092, in publish
payload = self._prep_pub(minions, jid, clear_load, extra, missing)
File "/usr/lib/python2.7/site-packages/salt/master.py", line 2184, in _prep_pub
self.event.fire_event({'minions': minions}, clear_load['jid'])
File "/usr/lib/python2.7/site-packages/salt/utils/event.py", line 746, in fire_event
salt.utils.stringutils.to_bytes(tag),
...skipping...
File "/usr/lib/python2.7/site-packages/salt/master.py", line 1027, in _handle_payload
'clear': self._handle_clear}[key](load)
File "/usr/lib/python2.7/site-packages/salt/master.py", line 1058, in _handle_clear
ret = getattr(self.clear_funcs, cmd)(load), {'fun': 'send_clear'}
File "/usr/lib/python2.7/site-packages/salt/master.py", line 2092, in publish
payload = self._prep_pub(minions, jid, clear_load, extra, missing)
File "/usr/lib/python2.7/site-packages/salt/master.py", line 2184, in _prep_pub
self.event.fire_event({'minions': minions}, clear_load['jid'])
File "/usr/lib/python2.7/site-packages/salt/utils/event.py", line 746, in fire_event
salt.utils.stringutils.to_bytes(tag),
File "/usr/lib/python2.7/site-packages/salt/utils/stringutils.py", line 63, in to_bytes
return to_str(s, encoding, errors)
File "/usr/lib/python2.7/site-packages/salt/utils/stringutils.py", line 118, in to_str
raise TypeError('expected str, bytearray, or unicode')
TypeError: expected str, bytearray, or unicode
2019-11-28 23:41:25,750 [tornado.general :452 ][ERROR ][46443] Uncaught exception, closing connection.
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 444, in _handle_events
self._handle_send()
File "/usr/lib64/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 487, in _handle_send
status = self.socket.send_multipart(msg, **kwargs)
File "/usr/lib64/python2.7/site-packages/zmq/sugar/socket.py", line 363, in send_multipart
i, rmsg,
TypeError: Frame 0 (u'Some exception handling minion...) does not support the buffer interface.
2019-11-28 23:41:25,750 [tornado.application:611 ][ERROR ][46443] Exception in callback None
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/tornado/ioloop.py", line 865, in start
handler_func(fd_obj, events)
File "/usr/lib64/python2.7/site-packages/tornado/stack_context.py", line 274, in null_wrapper
return fn(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 444, in _handle_events
self._handle_send()
File "/usr/lib64/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 487, in _handle_send
status = self.socket.send_multipart(msg, **kwargs)
File "/usr/lib64/python2.7/site-packages/zmq/sugar/socket.py", line 363, in send_multipart
i, rmsg,
TypeError: Frame 0 (u'Some exception handling minion...) does not support the buffer interface.
提示我未安装pymsql,但是我记得我安装l
3、原因:
用到的命令
# 查找文件
比如我要查看elasticsearch安装在哪了:
# sudo find / -name elasticsearch -type d
难道是我的pymsql装错地方了
python第三方包位置
pymysql位置
位置不一样,会影响吗? (很重要,欲哭无泪)
salt位置。怎么是2.7的,难道说。。。
查看return.py源码位置
就是这样的
4、解决掉它
现在本地python2.7装mysqlpy测试
[root@localhost ~]# pip2 install mysql-python
重新来一次配置master ok
哈哈哈哈哈
02_已解决 [salt.minion :1758][ERROR ][52886] Returner mysql.returner could not be loaded: 'mysql' __virtual__ returned False: Could not import mysql returner; mysql python client is not installed.的更多相关文章
- 03_已解决 [salt.master :2195][ERROR ][6219] Failed to allocate a jid. The requested returner 'mysql' could not be loaded.
总结: 对于python2.7环境下的salt来说,要安装pip install mysql-python 对于python3环境下的salt来说,pip install mysqlclient的时候 ...
- [ERROR ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate
2.salt master已缓存此节点的公钥,此salt minion将等待10秒,然后再尝试重新验证. [ERROR ] The Salt Master has cached the public ...
- [ERROR ] Error parsing configuration file: /etc/salt/minion - conf should be a document, not <type 'str'>.
错误信息 [ERROR ] Error parsing configuration file: /etc/salt/minion - conf should be a document, not &l ...
- Sqoop导入数据到mysql数据库报错:ERROR tool.ExportTool: Error during export: Export job failed!(已解决)
问题描述: Container killed by the ApplicationMaster. Container killed on request. Exit code is 143 Conta ...
- 已解决】Sublime中运行带input或raw_input的Python代码出错:EOFError: EOF when reading a line(转)
[问题] 在折腾: [已解决]Sublime Text 2中运行Python程序出错:The system cannot find the file specified 的过程中,虽然解决了找不到py ...
- 完美解决VS2003.Net fatal error LNK1201: 写入程序数据库“.pdb”时出错
我的开发环境是Win7旗舰64位+VS2003.Net,经常卡pdb错误,文末给出一个完美的解决方案和一个懒人补丁包.问题描述如下:在重新编译的时候,经常报错: fatal error LNK1201 ...
- 【已解决】Android ADT中增大AVD内存后无法启动:emulator failed to allocate memory 8
[问题] 折腾: [已解决]Android ADT中增大AVD内存后无法启动:emulator failed to allocate memory 8 过程中,增大对应AVD的内存为2G后,结果无法启 ...
- npm缺少css-loader,/style-compiler,stylus-loader问题,npm没有权限无法全局更新问题【已解决】
ERROR in ./node_modules/css-loader!./node_modules/vue-loader/lib/style-compiler?{"vue":tru ...
- [已解决]gitee初次使用git clone报错
本文描述的错误按实际出现先后顺序排列,并且附上一些其他可能会出现的问题 错误1: JZKJ@DESKTOP-I7Q9QJ4 MINGW64 ~ $ git clone https://gitee.co ...
随机推荐
- MySQL提供的几种检索行数据的优化方式
ICP(Index Condition Pushdown): 在MySQL5.6之前,存储引擎会通过遍历索引定位基表中 的行,然后返回给Server层,再去为这些数据进行WHERE后的条件过滤.MyS ...
- html5 外链式实现加减乘除
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- 剑指offer51:构建乘积数组B[i]=A[0]*A[1]*...*A[i-1]*A[i+1]*...*A[n-1],不能使用除法
1 题目描述 给定一个数组A[0,1,...,n-1],请构建一个数组B[0,1,...,n-1],其中B中的元素B[i]=A[0]*A[1]*...*A[i-1]*A[i+1]*...*A[n-1] ...
- 十四、i2c子系统
由于之后的触摸屏驱动分析中使用到了GPIO子系统和i2c子系统,因此在分析触摸屏驱动之前我准备把这两个子系统进行简单分析. 在读者学习本章以及后续i2c相关章节之前,最好了解i2c通信方式,可以参考: ...
- 创客课堂——Scratch实例演示
大家好,这里是蓝精灵创客公益课堂,我是蓝老师. 前两期我们认识了Scratch的界面和菜单功能,本期我们就可以根据提示的步骤,学习一些Scratch的基本操作. 下面就开始今天学习内容 一.开始移动 ...
- 其实每个行业都有各自的辛苦,好的程序员并不累,他们乐此不疲(见过太多在职位事业、人生方向上随转如流的人,累了疲乏了就去做别的事情了。必须有自己的坚守和立足的点,自我驱动,否则沦为在别人的体制制度中被驱赶一生)good
作者:陈柯好链接:https://www.zhihu.com/question/39813913/answer/104275537来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注 ...
- (十九)SpringBoot之使用Spring Session集群-redis
一.引入maven依赖 <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEnc ...
- KNN算法识别手写数字
需求: 利用一个手写数字“先验数据”集,使用knn算法来实现对手写数字的自动识别: 先验数据(训练数据)集: ♦数据维度比较大,样本数比较多. ♦ 数据集包括数字0-9的手写体. ♦每个数字大约有20 ...
- VBA术语(三)
在本章中,将介绍常用的Excel VBA术语.这些术语将在很多的模块中使用,因此理解其中的每一个术语都很重要. 模块 模块是编写代码的区域.如下图中,这是一个新的工作簿,因此没有任何模块. 要插入模块 ...
- 使用element-ui中的el-upload组件时携带其他参数
解决方法:// template <el-upload action="/api/oss/file/add" :headers="headers" // ...