Minion losing connection and not returning without a restart of service
I did a test.ping I had handful not responding. The versions reports are below. I can also get at random times 20 clients not responding, but am not right now. I have a cron job which restarts the service on my minions ever hour. Some of these servers are on the other side of a WAN connection. I have configured a TCP keepalive of 60 seconds because of the NAT'ing for them.
Why do I keep loosing my connection with the minions?
Master on CentOS 6 [root@saltstack ~]# salt --versions-report Salt: 0.15.3 Python: 2.6.6 (r266:84292, Jul 10 2013, 22:48:45) Jinja2: unknown 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.3 [root@saltstack ~]# cat /etc/redhat-release CentOS release 6.4 (Final) [root@saltstack ~]#
CentOS 6.4 Minion Salt: 0.15.3 Python: 2.6.6 (r266:84292, Feb 21 2013, 23:54:59) Jinja2: unknown 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.3
CentOS 6.4 Minion Salt: 0.15.3 Python: 2.6.6 (r266:84292, Feb 22 2013, 00:00:18) 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.3
CentOS release 5.9 (Final) Salt: 0.15.3 Python: 2.6.8 (unknown, Nov 7 2012, 14:47:34) Jinja2: unknown M2Crypto: 0.21.1 msgpack-python: 0.1.12 msgpack-pure: Not Installed pycrypto: 2.3 PyYAML: 3.08 PyZMQ: 2.1.9 ZMQ: 2.1.9
Windows 2008 R2 64-bit Minion Salt: 0.16.0 Python: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] Jinja2: 2.6 M2Crypto: 0.21.1 msgpack-python: 0.1.12 msgpack-pure: Not Installed pycrypto: 2.3 PyYAML: 3.10 PyZMQ: 13.1.0 ZMQ: 3.2.2
The primary cause for minions losing their connection is ZMQ2, which I see on at least one of your version reports. Definitely upgrade to ZMQ3 to prevent many of these issues.
However, we have been seeing a few reports of minions losing connection recently. Some problems are solved with a minion restart, some with a master. Is there anything in the logs of the disconnected minions or the master that might clue us into what is happening?
Also, are you using any IPv6? We're wondering if the recent problems are related to re-enabling IPv6 support.
Oh, and I just barely connected you with the other "restarting the master" issue. =P Thanks for creating a separate issue.
Yeah, I am the person who reported my issue incorrectly on another ticket. We are not using IPv6.
I have looked at upgrading to ZMQ3, but I can't find any RPM's for my CentOS 5 machines which work. There are too many version conflicts when I have tried to get ZMQ3 onto my CentOS 5 machines. But I am not that worried since in reality the issue is more widespread and is effecting my ZMQ3 clients just as much. If I can get the ZMQ3 machines work well I would be happy.
Ya, this is high on our priority list. The problem is the difficulty of reproducing issues like this. =\
Good, I am now seeing 20 of my 30 odd minions go offline until the cron job restarts the minion and then they are reachable for about 5-15 minutes then unreachable until the cronjob runs again. I am not finding salt to be that useful in this situation. This is for zmq3 and zmq2 minions.
20 out of 30? that's high, I don't think I've seen anyone with that high of a percentage of disconnects. We'll definitely look into it.
I'm having the same problem, but mine is reproduceable.
If the master server's IP address changes and DNS is updated, the minions have to be restarted to regain connection. There was a fix about a year ago for this where the minion would re-resolve the IP address of the master if it lost connection.
I'm not sure if that is happening correctly now. The IP address of a saltmaster running in EC2 changes often when it's shutdown and brought back up.
This is super annoying because my remote execution to restart the minion process is well...done by salt :)
my master's IP address is not changing. We have a static IP for it. I have 19 servers this morning not responding 30 minutes after the minion service was restarted.
I have a local cron job that runs each at 3 minutes past every hour on each minion server to restart salt-minion. But I can only then reach them right after the service restarts. This is a real pain for actually trying to use this as a possible solution for my organisation.
This is happening for minions that are on the sam LAN, as well as minions connecting over WAN, right?
Same LAN and across a WAN. My Windows box that I have put into salt is usually the first to go and I know it is running ZMQ3. Not bothered putting more machines into salt because of this issue.
Cheers,
Leon Hedding
On 30 Jul 2013 22:54:41, Colton Myers [email protected] wrote:
This is happening for minions that are on the sam LAN, as well as minions connecting over WAN, right?
— Reply to this email directly or view it on GitHubhttps://github.com/saltstack/salt/issues/6231#issuecomment-21825901.
OM International Services (Carlisle) Ltd - Unit B Clifford Court, Cooper Way - Carlisle CA3 0JG - United Kingdom Charity reg no: 1112655 - Company reg no: 5649412 (England and Wales)
Ok, I think I might have a solution for my Linux machines. We run 20 odd CentOS 5 machines and without ZMQ3 installed with its ability to configure TCP Keep-Alive all these machines go offline after some time. I tried using a cron job on the master which did a test.ping ever 5 minutes to all devices as one way to do a poor man's keep alive, but my minions would still go offline occasionally.
I eventually found some time to build my own 32-bit and 64-bit RPM's for PyZMQ 13.1.0 which was the limiter before. There is a public repo for ZMQ3, but none for a version of PyZMQ that supports ZMQ3 on CentOS. I was getting library incompatibilities until I had the latest version of PyZMQ.
It is early days still, but I have yet to loose any minions since getting ZMQ3 onto my CentOS 5 machines. I really wish there was a public repo for ZMQ3 and PyZMQ 13.1.0 because I don't want to have maintain my own RPM's for PyZMQ for both i386 and x64. I saw a ticket open about getting a salt repo setup for CentOS 5. This would be brilliant for others that plan to run CentOS 5 until its support ends in 2017 and also want to run salt.
My Windows machine still keeps dropping after 15 minutes or so. I have enabled keep alives on this Windows machine. I have a number more Windows machines I would like to use Salt on, but am holding off until I can get it working reliably on at least one Windows machine. I have seen that I need to increase the timeout for Windows machines and am doing 45 seconds for a test.ping and still no response.
Windows Server 2008 R2 Datacenter SP1 Machine: C:\salt> salt --versions-report Salt: 0.16.2 Python: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] Jinja2: 2.6 M2Crypto: 0.21.1 msgpack-python: 0.1.12 msgpack-pure: Not Installed pycrypto: 2.3 PyYAML: 3.10 PyZMQ: 13.1.0 ZMQ: 3.2.2
Master running CentOS 6.4 [root@saltstack ~]# salt --versions-report Salt: 0.16.0 Python: 2.6.6 (r266:84292, Jul 10 2013, 22:48:45) Jinja2: unknown 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.3
When I run tcpdump and do a test.ping to my Windows machine absolutely nothing shows in the dump from the masters perspective. I restart the minion and I then see traffic in my tcpdump. Somehow the connection is dropping and I don't know how to test why this is happening.
I talked to @UtahDave (who's in charge of Windows development) and he says he's going to package up a new windows installer with ZMQ 3.2.3 just to make sure that's not the issue. Then we can work from there.
Hi, i have the same problem with my windows minions (0.16.2) .The contact is lost after a few hours except for one minion. It is in the same VLAN as salt-master. I think it's a keepalive problem. A simple restart on the minion has solved this problem. I installed 0.16.3 today. Some news tomorrow ;)
Hello, today contact has been lost with my windows minion :-(. 0.16.3 didn't address this issue.
In master log i can see some minion activity every hour:
2013-08-13 06:29:53,066 [salt.master ][INFO ] Authentication request from XML01.services.sib.fr 2013-08-13 06:29:53,067 [salt.master ][INFO ] Authentication accepted from XML01.services.sib.fr 2013-08-13 07:29:52,619 [salt.master ][INFO ] Authentication request from XML01.services.sib.fr 2013-08-13 07:29:52,619 [salt.master ][INFO ] Authentication accepted from XML01.services.sib.fr 2013-08-13 08:29:52,147 [salt.master ][INFO ] Authentication request from XML01.services.sib.fr 2013-08-13 08:29:52,147 [salt.master ][INFO ] Authentication accepted from XML01.services.sib.fr
But minion doesn't respond to salt-master requests...
More tests:
I can use salt-call on minion without any problems. A salt-call state.sls xxxx is working like a charm. But on master i still have no results.
[root@salt ~]# salt -v 'XML01*' test.version Executing job with jid 20130813100802364942
XML01.services.sib.fr: Minion did not return
Until i restart salt-minion.
Can i help you with pcap capture or advanced logs ?
I think I am having the same or similar issue. Minions stopping responding. I have 50+ minions out of 133 not responding now. I too, cannot update ZMQ everywhere without great massive pain.
@caseybea For ZMQ < 3, we really can't do anything. There are severe bugs in those versions which make the connection very unstable. Some have gotten around it by using cron to restart the minion service. But your best bet is still to upgrade ZMQ, unfortunately.
Damn. I'm not surprised to find out ZMQ 2.x is the main problem, the unfortunate part is there's no clean way to install updates on a RHEL5 box with the zmq repo(s) out there, because there's a twisty maze of ugly dependancies that make upgrading to ZMQ3 more or less unrealistic.
That said, when I have some time I will still try, and see how it goes.
(meanwhile... I'm tossing in my vote to have SSH an option for connectivity. Just in case a crafty developer is listening :-)
SALT is still a really cool deal. I'll get it into production. Eventually.....
@basepi , i did more tests with my windows minions. If i kill tcp connection ( marked as ESTABLISHED on minion but doesn't exist on server side ) with salt server on minion side with an utility like tcpview, everything becomes OK. Do you think it's a Zmq issue (Ver 3.2.2) ?