14.04 / salt '*' test.ping Failed to authenticate, is this user permitted to execute commands?
Since my upgrade to 14.04 and sync of @makinacorpus fork to last develop, something is weird.
I get intermittent total unfunctionnality of the saltmaster , on a period of 1 at 2 minutes, i cant ping any minion, and the next 2 minutes ping is working, and 2 minutes after this does not work.
mastersalt '*' test.ping
Failed to authenticate, is this user permitted to execute commands?
I rebuilded all the eggs locally installed to be sure of the linking, but this seems not to be sufficient.
Ill check tomorow to double check if this is one of our maintainance crons, but i would suspect yet another regression.
This morning everything is operating correctly, i prefer to let this bug open at the moment, but for now, it seems more of an installation temporary problem as during this upgrade:
- DNS changed
- IP changed
- OS changed
- Salt was upgraded
I so also suspect a dns propagation / ip routing propragation problem...
So this may be just a false positive bug and more a big PEBCAK :)
/cc @regilero
Please tell us again if have new ideas what might caused your problems. I also discovered your described behaviour in my setup (Debian 7, Packages from Salt-Repo), but sometimes it works a whole week without any problems
#12246
We'll leave this open for now, but if it doesn't pop up, let's close it in a few days.
Also, unless I'm missing something 14.04 is not a valid salt version. Or it's very very old if it's from the 0.14 release. Did you mean 2014.1.3?
@basepi, ubuntu 14.04 ;)
i mentionned that i used last salt/develop tip yesterday... so f43dfd54780da7401cc8da19e40abe4a45d4f440
@kiorky Wow, that makes wayyyyy more sense. Thanks.
@kiorky We were going to wait and see if you saw this again. Is this safe to close now?
@cachedout I'm seeing this on Trusty 14.04 with Salt 2014.1.4 as well.
Everything works fine on the first box (using VirtualBox), but when I test the box I have packaged from this VM, I see the same error after running salt '*' state.clear_cache; salt-call -l debug state.highstate;. What is interesting is that if I try the highstate command a couple minutes later I do not see the error.
Let me know if there is any information that I can provide to help debug this.
@ifnull Thanks for letting us know. We'll keep this open and try to figure out what's going on here.
Possibly related: https://groups.google.com/forum/#!topic/salt-users/G4PSRZZSwBM
I am having the same problem mentioned here.
Looks like it is failing here: https://github.com/saltstack/salt/blob/develop/salt/client/init.py#L212
There was a recent commit that mentions that there are other reasons for failure here besides authentication: https://github.com/saltstack/salt/commit/4ba20946ae4ad061e6851d2868ddf734ef94e45c
I was able to reduce the problem to the following command.
import salt.client
client = salt.client.LocalClient()
client.cmd(tgt='*', fun='state.highstate', arg=[], timeout=5, expr_form='glob', ret='')
In this example, pub_data returns nothing.
root@vagrant:/var/www# salt --versions-report
Salt: 2014.1.4
Python: 2.7.6 (default, Mar 22 2014, 22:59:56)
Jinja2: 2.7.2
M2Crypto: 0.21.1
msgpack-python: 0.3.0
msgpack-pure: Not Installed
pycrypto: 2.6.1
PyYAML: 3.10
PyZMQ: 14.0.1
ZMQ: 4.0.4
@cachedout @basepi From what I can tell, the problem occurs in the following lines of code. payload appears to be set to an empty string which causes pub() to return an empty string and subsequently fail the _check_pub_data check.
https://github.com/saltstack/salt/blob/develop/salt/client/init.py#L1366-L1371
Payload is unpredictably being set to an empty string:
(Pdb++) payload = sreq.send(payload_kwargs)
(Pdb++) print payload
(Pdb++) payload = sreq.send(payload_kwargs)
(Pdb++) payload = sreq.send(payload_kwargs)
(Pdb++) print payload
{'load': {'jid': '20140617011356196301', 'minions': ['minion']}, 'enc': 'clear'}
(Pdb++) payload = sreq.send(payload_kwargs)
(Pdb++) print payload
{'load': {'jid': '20140617011421541371', 'minions': ['minion']}, 'enc': 'clear'}
(Pdb++) payload = sreq.send(payload_kwargs)
(Pdb++) print payload
{'load': {'jid': '20140617011424300494', 'minions': ['minion']}, 'enc': 'clear'}
(Pdb++) payload = sreq.send(payload_kwargs)
(Pdb++) print payload
(Pdb++) payload = sreq.send(payload_kwargs)
(Pdb++) print payload
{'load': {'jid': '20140617011433539494', 'minions': ['minion']}, 'enc': 'clear'}
(Pdb++) payload = sreq.send(payload_kwargs)
(Pdb++) print payload
{'load': {'jid': '20140617011437036333', 'minions': ['minion']}, 'enc': 'clear'}
(Pdb++) payload = sreq.send(payload_kwargs)
(Pdb++) print payload
{'load': {'jid': '20140617011441100207', 'minions': ['minion']}, 'enc': 'clear'}
(Pdb++) payload = sreq.send(payload_kwargs)
(Pdb++) print payload
(Pdb++)
Very strange, thanks for the updates!
I no longer believe this is related to ZeroMQ 4. I downgraded to ZeroMQ 3 and had the same result.
Uninstall ZMQ
cd /tmp
apt-get remove libzmq3 libzmq3-dev -y
pip uninstall pyzmq -y
Install ZMQ 3
wget http://download.zeromq.org/zeromq-3.2.4.tar.gz
tar xvzf zeromq-3.2.4.tar.gz
cd ./zeromq-3.2.4
./configure
make
make install
ldconfig
pip install pyzmq --install-option="--zmq=/usr/local/"
cd ../
rm -fR ./zeromq-3*
Confirm
salt --versions-report
Salt: 2014.1.4
Python: 2.7.6 (default, Mar 22 2014, 22:59:56)
Jinja2: 2.7.2
M2Crypto: 0.21.1
msgpack-python: 0.3.0
msgpack-pure: Not Installed
pycrypto: 2.6.1
PyYAML: 3.10
PyZMQ: 14.3.1
ZMQ: 3.2.4
Notes
libzmq3installed viaaptis actually ZMQ 4.0.4- If you do not build ZMQ from source,
pyzmqwill try to build ZMQ itself. - easy_install will use the egg which does not contain ZMQ 3
References
- https://github.com/zeromq/pyzmq/wiki/Building-and-Installing-PyZMQ
- https://github.com/zeromq/pyzmq/issues/193
- http://zeromq.org/bindings:python
- https://github.com/saltstack/salt-bootstrap/blob/develop/bootstrap-salt.sh
- http://zeromq.org/intro:get-the-software
- https://github.com/zeromq/libzmq
- https://github.com/saltstack/salt/blob/develop/salt/master.py
- https://github.com/saltstack/salt/blob/develop/salt/transport/init.py
- https://github.com/saltstack/salt/blob/develop/salt/crypt.py
- https://github.com/saltstack/salt/blob/develop/salt/client/init.py#L1366-L1371
I am not encountering this error on the following Ubuntu 14.04 configuration inside an LXC:
Salt: 2014.1.3
Python: 2.7.6 (default, Mar 22 2014, 22:59:56)
Jinja2: 2.7.2
M2Crypto: 0.21.1
msgpack-python: 0.3.0
msgpack-pure: Not Installed
pycrypto: 2.6.1
PyYAML: 3.10
PyZMQ: 14.0.1
ZMQ: 4.0.4
Just tried with 2014.1.3 and I'm still seeing the issue. It may be worth noting that I am using GitFS. I'm going to run a couple tests with GitFS excluded.
@thatch45 made a commit (4ba20946ae4ad061e6851d2868ddf734ef94e45c) that indicates this may be related to inode usage. Maybe he could shed some light here.