Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Frame 0 (u'Some exception handling minion...) does not support the buffer interface. #58886

Open
ironman627 opened this issue Nov 4, 2020 · 4 comments
Labels
Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@ironman627
Copy link

Description of Issue

Issued a salt command (see below) and the master does not respond, event bus does not record the command event, and throws the TypeError from above.

Setup

/var/log/salt/master latest relevant entry:
###################################################
2020-11-04 23:28:22,388 [tornado.application:611 ][ERROR ][27706] 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.
##########################################################################

Steps to Reproduce Issue

Issue the following command:
salt -G ‘os:Windows’ service.status W3SVC

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
################################################
[root@ip-172-31-22-154 salt]# salt --versions-report
Salt Version:
Salt: 2019.2.5

Dependency Versions:
cffi: 1.14.0
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: 0.6.4
gitpython: 1.0.1
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: Not Installed
pycparser: 2.14
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: 0.9.0
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4

System Versions:
dist: centos 7.7.1908 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-1062.12.1.el7.x86_64
system: Linux
version: CentOS Linux 7.7.1908 Core
#######################################

@ironman627
Copy link
Author

Here is the salt-master's debug relating to the above command:
########################################
[DEBUG ] LazyLoaded localfs.init_kwargs
[WARNING ] /usr/lib/python2.7/site-packages/salt/utils/data.py:688: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
if key == '*':

[DEBUG ] Attempting to match 'Windows’' in '‘os' using delimiter ':'
[DEBUG ] Attempting to match 'Windows’' in '‘os' using delimiter ':'
[DEBUG ] Attempting to match 'Windows’' in '‘os' using delimiter ':'
[DEBUG ] Attempting to match 'Windows’' in '‘os' using delimiter ':'
[DEBUG ] Attempting to match 'Windows’' in '‘os' using delimiter ':'
[ERROR ] Some exception handling a payload from minion
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 761, 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 1065, in _handle_payload
'clear': self._handle_clear}key
File "/usr/lib/python2.7/site-packages/salt/master.py", line 1097, in _handle_clear
ret = method(load), {'fun': 'send_clear'}
File "/usr/lib/python2.7/site-packages/salt/master.py", line 2171, in publish
'error': 'Master could not resolve minions for target {0}'.format(clear_load['tgt'])
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)
[ERROR ] 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.
[ERROR ] 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.
###############################################################

@sagetherage sagetherage added Bug broken, incorrect, or confusing behavior needs-triage labels Nov 4, 2020
@ironman627
Copy link
Author

If I execute the following: salt *win service.status W3SVC it works fine.
Possibly something to do with the targeting of the grains.

@cmcmarrow cmcmarrow added Confirmed Salt engineer has confirmed bug/feature - often including a MCVE and removed needs-triage labels Nov 12, 2020
@cmcmarrow cmcmarrow removed their assignment Nov 12, 2020
@cmcmarrow
Copy link
Contributor

I ran this on master and got no return as well. The minion or master did not crash and I cant find a stack trace in the logs.

@sagetherage sagetherage added the severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around label Nov 13, 2020
@sagetherage sagetherage added this to the Approved milestone Nov 13, 2020
@thinkst-marco
Copy link

Super late to the party, but the issue is that command includes smart quotes:

salt -G [‘]os:Windows[’] service.status W3SVC
         ^------------^--- these characters

Their UTF-8 values are \xe2\x80\x98 and \xe2\x80\x99... which is why the Unicode error triggers. The error 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128) indicates that position 0 in the targeting string is \xe2, which confirms the hypothesis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

4 participants