Commands failing
Randomly salt stopped working. I restarted the master and local minion to no avail. (All minions were failing to receive commands, not just the local minion but my testing was primarily done with the local minion)
I eventually managed to fix it after numerous restarts by restarting every minion, removing the /var/cache/salt/master/jobs directory and restarting the master.
I am not sure if what fixed it was restarting of all other minions (ie, if one of the minions was in a bad state which was making the master crap out) or if nuking the cache/salt/master/jobs directory is what resolved it as I had done both at the same time (I was getting a little desperate at that point).
Logs didn't reveal anything of interest in either the master or minion even with the logging level set to trace.
Plenty of disk space and memory was available.
# salt --versions-report
Salt: 0.17.2
Python: 2.6.6 (r266:84292, May 27 2013, 05:35:12)
Jinja2: 2.2.1
M2Crypto: 0.20.2
msgpack-python: 0.1.13
msgpack-pure: Not Installed
pycrypto: 2.0.1
PyYAML: 3.10
PyZMQ: 2.2.0.1
ZMQ: 3.2.4
# salt localminion test.ping
[DEBUG ] Reading configuration from /etc/salt/master
[DEBUG ] Including configuration from '/etc/salt/master.d/ldap.conf'
[DEBUG ] Reading configuration from /etc/salt/master.d/ldap.conf
[DEBUG ] Including configuration from '/etc/salt/master.d/reactor.conf'
[DEBUG ] Reading configuration from /etc/salt/master.d/reactor.conf
[DEBUG ] Missing configuration file: /root/.salt
[DEBUG ] loading log_handlers in ['/var/cache/salt/master/extmods/log_handlers', '/usr/lib/python2.6/site-packages/salt/log/handlers']
[DEBUG ] Skipping /var/cache/salt/master/extmods/log_handlers, it is not a directory
[DEBUG ] None of the required configuration sections, 'logstash_udp_handler' and 'logstash_zmq_handler', were found the in the configuration. Not loading the Logstash logging handlers module.
[DEBUG ] Configuration file path: /etc/salt/master
[DEBUG ] Reading configuration from /etc/salt/master
[DEBUG ] Including configuration from '/etc/salt/master.d/ldap.conf'
[DEBUG ] Reading configuration from /etc/salt/master.d/ldap.conf
[DEBUG ] Including configuration from '/etc/salt/master.d/reactor.conf'
[DEBUG ] Reading configuration from /etc/salt/master.d/reactor.conf
[DEBUG ] Missing configuration file: /root/.salt
[DEBUG ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[ERROR ] An un-handled exception was caught by salt's global exception handler:
SaltReqTimeoutError: Waited 60 seconds
Traceback (most recent call last):
File "/usr/bin/salt", line 10, in <module>
salt_main()
File "/usr/lib/python2.6/site-packages/salt/scripts.py", line 117, in salt_main
client.run()
File "/usr/lib/python2.6/site-packages/salt/cli/__init__.py", line 133, in run
for full_ret in cmd_func(**kwargs):
File "/usr/lib/python2.6/site-packages/salt/client/__init__.py", line 471, in cmd_cli
**kwargs)
File "/usr/lib/python2.6/site-packages/salt/client/__init__.py", line 228, in run_job
**kwargs)
File "/usr/lib/python2.6/site-packages/salt/client/__init__.py", line 1216, in pub
payload = sreq.send('clear', payload_kwargs)
File "/usr/lib/python2.6/site-packages/salt/payload.py", line 193, in send
timeout * tried
SaltReqTimeoutError: Waited 60 seconds
Traceback (most recent call last):
File "/usr/bin/salt", line 10, in <module>
salt_main()
File "/usr/lib/python2.6/site-packages/salt/scripts.py", line 117, in salt_main
client.run()
File "/usr/lib/python2.6/site-packages/salt/cli/__init__.py", line 133, in run
for full_ret in cmd_func(**kwargs):
File "/usr/lib/python2.6/site-packages/salt/client/__init__.py", line 471, in cmd_cli
**kwargs)
File "/usr/lib/python2.6/site-packages/salt/client/__init__.py", line 228, in run_job
**kwargs)
File "/usr/lib/python2.6/site-packages/salt/client/__init__.py", line 1216, in pub
payload = sreq.send('clear', payload_kwargs)
File "/usr/lib/python2.6/site-packages/salt/payload.py", line 193, in send
timeout * tried
salt.exceptions.SaltReqTimeoutError: Waited 60 seconds
So, to clarify, salt got into some sort of weird state that you haven't been able to reproduce since? Hate these kinds of bugs. =P
Thanks for the report, please keep us posted if it happens again.
Pretty much.
Was mainly posting in case someone else runs into the same issue perhaps there might be some commonality between setups.
@nvx The same bug gets already discussed here:
Intermittent connection problems to 0.17.1 minions (#8295)
It seems you are not the only one with this problem.
That does seem to be the same issue.
So interestingly enough, I encountered this same issue on a separate salt master installation. This time a FreeBSD machine (ZMQ 2 unfortunately) but only with some minions (the minion on the salt master was working in this case). Restarting minions and masters fixed nothing. The first time I encountered this it was on a RHEL6 salt master.
A quick rm -rf of my jobs directory (with the master stopped just in case) and she started working again instantly.
Same line 193 of payload.py and same error.
Salt: 0.17.2
Python: 2.7.6 (default, Nov 29 2013, 16:22:38)
Jinja2: 2.7.1
M2Crypto: 0.21.1
msgpack-python: 0.2.2
msgpack-pure: Not Installed
pycrypto: 2.6.1
PyYAML: 3.10
PyZMQ: 2.2.0
ZMQ: 2.2.0
@nvx Are you using a mixed environment of physical and virtual hardware?
I have some beliefs that this intermittent connections problems arise somewhere in the virtualized layer of VMware.
cc @holmboe, @kinware, @s0l4r
In the first instance all minions (bar one or two) and the minion are VMware VMs (ESXi/vSphere 5.1 if memory serves).
In the second instance the master is a running FreeBSD 10 Beta3 on bare metal, while all minions are FreeBSD jails running on the same physical host. (It's actually my home server).
I just don't know what we can do here to try and reproduce this issue. There have been so many changes since 17.2 that unless we hear about this happening on a more recent version of Salt+ZMQ, I'm not sure what we can do here. I'm inclined to close this issue for the time being unless there are any objections.
All 3 of my salt my installations are now on 2014.1 and I haven't encountered this issue in a while. Looking at the PR that mentions this issue (which I presume made it to 2014.1?) that may in fact have been the problem I was encountering as I do run all my salt-masters as non-root although I can't say I recall ever running jobs with it as non-root but who knows.
The initial issue actually happened with ZMQ3, it was only the second install that it happened on that was ZMQ2 (which is now on ZMQ4.0.4) thanks to FreeBSD ports updating their ZMQ version.
I'm happy to leave this closed for now and will open a new issue (referencing this one) if I encounter it again but so far so good!
@nvx Thanks very much for the reply and update here. I'm going to go ahead and close this then but please do let us know if this occurs again for you. Thanks again!