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的时候要和salt在同一个目录下
1、生产环境3.6的,这个怎么整呢
1、2019.2 的salt
[root@IP ~]# salt-call --versions-report
Salt Version:
Salt: 2019.2.0 Dependency Versions:
cffi: Not Installed
cherrypy: 5.6.0
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8.1
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: 1.4.6
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.6.8 (default, Aug 7 2019, 17:28:10)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.4.2
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 [root@IP ~]#
2、python3.6

2、 报错

2019-11-29 14:59:46,062 [salt.master :2195][ERROR ][6219] Failed to allocate a jid. The requested returner 'mysql' could not be loaded.
2019-11-29 14:59:46,063 [salt.transport.zeromq:754 ][ERROR ][6219] Some exception handling a payload from minion
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/salt/transport/zeromq.py", line 750, in handle_message
ret, req_opts = yield self.payload_handler(payload)
File "/usr/lib64/python3.6/site-packages/tornado/gen.py", line 1015, in run
value = future.result()
File "/usr/lib64/python3.6/site-packages/tornado/concurrent.py", line 236, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/usr/lib64/python3.6/site-packages/tornado/gen.py", line 270, in wrapper
result = func(*args, **kwargs)
File "/usr/lib64/python3.6/types.py", line 248, in wrapped
coro = func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/master.py", line 1064, in _handle_payload
'clear': self._handle_clear}[key](load)
File "/usr/lib/python3.6/site-packages/salt/master.py", line 1095, in _handle_clear
ret = getattr(self.clear_funcs, cmd)(load), {'fun': 'send_clear'}
File "/usr/lib/python3.6/site-packages/salt/master.py", line 2137, in publish
payload = self._prep_pub(minions, jid, clear_load, extra, missing)
File "/usr/lib/python3.6/site-packages/salt/master.py", line 2233, in _prep_pub
self.event.fire_event({'minions': minions}, clear_load['jid'])
File "/usr/lib/python3.6/site-packages/salt/utils/event.py", line 744, in fire_event
salt.utils.stringutils.to_bytes(tag),
File "/usr/lib/python3.6/site-packages/salt/utils/stringutils.py", line 61, in to_bytes
raise TypeError('expected bytes, bytearray, or str')
TypeError: expected bytes, bytearray, or str
2019-11-29 14:59:46,065 [tornado.general :452 ][ERROR ][6219] Uncaught exception, closing connection.
Traceback (most recent call last):
File "/usr/lib64/python3.6/site-packages/zmq/sugar/socket.py", line 356, in send_multipart
_buffer_type(msg)
TypeError: memoryview: a bytes-like object is required, not 'str' During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/usr/lib64/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 444, in _handle_events
self._handle_send()
File "/usr/lib64/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 487, in _handle_send
status = self.socket.send_multipart(msg, **kwargs)
File "/usr/lib64/python3.6/site-packages/zmq/sugar/socket.py", line 363, in send_multipart
i, rmsg,
TypeError: Frame 0 ('Some exception handling minion ...) does not support the buffer interface.
2019-11-29 14:59:46,065 [tornado.application:632 ][ERROR ][6219] Exception in callback None
Traceback (most recent call last):
File "/usr/lib64/python3.6/site-packages/zmq/sugar/socket.py", line 356, in send_multipart
_buffer_type(msg)
TypeError: memoryview: a bytes-like object is required, not 'str' During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/usr/lib64/python3.6/site-packages/tornado/ioloop.py", line 886, in start
handler_func(fd_obj, events)
File "/usr/lib64/python3.6/site-packages/tornado/stack_context.py", line 274, in null_wrapper
return fn(*args, **kwargs)
File "/usr/lib64/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 444, in _handle_events
self._handle_send()
File "/usr/lib64/python3.6/site-packages/zmq/eventloop/zmqstream.py", line 487, in _handle_send
status = self.socket.send_multipart(msg, **kwargs)
File "/usr/lib64/python3.6/site-packages/zmq/sugar/socket.py", line 363, in send_multipart
i, rmsg,
TypeError: Frame 0 ('Some exception handling minion ...) does not support the buffer interface
3、原因:
又是提示我,未加载mysqlpy,这次我是真的装了

mysql环境也是3.6的。
salt也是3.6的

难道是 位置不在一起???
4、解决1:
卸载重装
[root@IP ~]# pip3 uninstall mysqlclient
[root@IP salt]# pip3 install mysql-client

依旧问题存在
5、解决2:完成
也许真的是没在一个目录
pip安装指定目录 https://blog.csdn.net/guotong1988/article/details/61196363
[root@IP salt]# pip3 install --target=/usr/lib/python3.6/site-packages/ mysql-client

6、结果:成了

03_已解决 [salt.master :2195][ERROR ][6219] Failed to allocate a jid. The requested returner 'mysql' could not be loaded.的更多相关文章
- 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.本 ...
- git报错error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500
报错 $ git push; Enumerating objects: 1002, done. Counting objects: 100% (1002/1002), done. Delta comp ...
- 使用git提交时报错:error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
Delta compression using up to 4 threads.Compressing objects: 100% (2364/2364), done.Writing objects: ...
- 【Git】error: RPC failed; HTTP 413 curl 22 The requested URL returned error:413 Request Entity Too Large
error: RPC failed; HTTP 413 curl 22 The requested URL returned error:413 Request Entity Too Large fa ...
- 解决:install service error: InstallAsEventCreate() failed: xxx registry key already exists
目录 一.事故现场 二.分析 三.解决方案 一.事故现场 在windows系统下安装服务,cmd窗口执行如下命令: "E:\work\_base\PsUm\PsUser\LdapWebSer ...
- 解决:actual_tessdata_num_entries_ <= TESSDATA_NUM_ENTRIES:Error:Assert failed:in file ..\..\ccutil\tessdatamanager.cp p, line 50
在玩tesseract时,发现如下报错: 这个是因为Tesseract-OCR的版本和chi_sim.traindata字库版本不匹配,由于我的Tesseract-OCR是3.02.02,去googl ...
- 解决Zend OPcache huge_code_pages: mmap(HUGETLB) failed: Cannot allocate memory报错
前几日看到鸟哥介绍的 <让你的PHP7更快之Hugepage>, 于是想试试手给服务器加上,参照格式安装好扩展,调整好配置文件,然后重启php-fpm,结果启动一直报Zend OPcach ...
- android模拟器 一个错误:X Error of failed request: BadRequest (invalid request code or no such operation)
最近ubuntu12.04学习python,python2.7 python3.2所不同的是还是蛮大的.学习思考的新 升级后 结果显示 输入方法不显示 update-manager 和 add- ...
- [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 ...
随机推荐
- django认证01---token
1.登录鉴权跟 Token 的鉴权区别 以 Django 的账号密码登录为例来说明传统的验证鉴权方式是怎么工作的,当我们登录页面输入账号密码提交表单后,会发送请求给服务器,服务器对发送过来的账号密码进 ...
- java输入输出 -- java NIO之缓存区Buffer
一.简介 java NIO相关类在jdk1.4被引入,用于提高I/O的效率.java NIO包含很多东西,但核心的东西不外乎Buffer.channel和selector.本文先来看Buffer的实现 ...
- GoF 的 23 种设计模式的分类和功能
1. 根据目的来分 根据模式是用来完成什么工作来划分,这种方式可分为创建型模式.结构型模式和行为型模式 3 种. 创建型模式:用于描述“怎样创建对象”,它的主要特点是“将对象的创建与使用分离”.GoF ...
- 2,electron 打包
1,全局安装electron-packager npm install electron-packager -g 2,打包,进入要打包的文件夹 electron-packager . app --pl ...
- Scratch 母鸡保护鸡蛋
今天我们一起实现一个“母鸡保护鸡蛋”的小游戏 具体思路是这样滴: 1.鸡蛋会不断的从右往左移动: 2.当母鸡快碰到鸡蛋的时候,按下“空格键”让母鸡跳跃起来: 3.如果母鸡落下没碰到鸡蛋,加一分: 4. ...
- s5p6818 从SD卡启动程序(制作SD启动卡)
背景: 最近在学习uboot,其中有一步很重要的任务就是需要实现uboot 的验证,没有办法验证uboot是不是自己做的,那么整个开发就会收到阻碍.另外,从公司现在开发的板子来看,uboot从sd卡启 ...
- mysql中的锁机制之概念篇
锁的概念 ①.锁,在现实生活中是为我们想要隐藏于外界所使用的一种工具. ②.在计算机中,是协调多个进程或线程并发访问某一资源的一种机制. ③.在数据库当中,除了传统的计算资源(CPU.RAM.I/O等 ...
- linux安装tmux分屏插件
linuxtmux分屏 一.安装tmux 二.基本使用 三.鼠标操作 一.安装tmux yum install -y tmux TMUX2版本以下 二.基本使用 使用tmux一般使用命令和快捷键来操作 ...
- linux 添加硬盘找不到使用/sys/class/scsi_host/host/scan
添加磁盘到dg--首先通知存储管理员划分相应的盘到指定的机器,说明共享--扫描磁盘(两个节点执行)[root@testrac1 ~]# echo "- - -" > /sys ...
- [转载]三十分钟理解:线性插值,双线性插值Bilinear Interpolation算法
[转载]三十分钟理解:线性插值,双线性插值Bilinear Interpolation算法 来源:https://blog.csdn.net/xbinworld/article/details/656 ...