Repository navigation
Description
Description
A clear and concise description of what the bug is.
I am seeing a weird connection issue in my salt setup. there are ~30 minions registered with the master. for a few of them, master couldn't connect to them anymore after a while. salt '*' test.ping failed with the following error message:
Minion did not return. [No response]
The minions may not have all finished running and any remaining minions will return upon completion. To look up the return data for this job later, run the following command:
salt-run jobs.lookup_jid 20230920213139507242
here are a few observations:
- restarting the salt-minion service helped but the same minion lost connection again after a while.
salt-call test.pingworks fine on minion side. other commands likesalt-call state.applyalso works fine. this indicates minion to master communication is fine but master to minion communication is not- below is the error message i found from minion log. i tried to bump up the timeout param like salt '*' -t 600 test.ping . but it doesn't help
2023-09-20 13:00:08,121 [salt.minion :2733][ERROR ][821760] Timeout encountered while sending {'cmd': '_return', 'id': 'minion', 'success': True, 'return': True, 'retcode': 0, 'jid': '20230920195941006337', 'fun': 'test.ping', 'fun_args': [], 'user': 'root', '_stamp': '2023-09-20T19:59:41.114944', 'nonce': '3b23a38761fc4e98a694448d36ac7f97'} request
Does anyone have any idea what's wrong here and how to debug this issue?
Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
- minion was installed by
sudo ./bootstrap-salt.sh -A <master-ip-address> -i $(hostname) stable 3006.3. no custom config on minion - master runs inside a container using image
saltstack/salt:3006.3. master configs:
nodegroups:
prod-early-adopter: L@minion-hostname-1
prod-general-population: L@minion-hostname-2
release: L@minion-hostname-3
custom: L@minion-hostname-4
file_roots:
base:
- <path/to/custom/state/file>
state file:
pull_state_job:
schedule.present:
- function: state.apply
- maxrunning: 1
- when: 8:00pm
deploy:
cmd.run:
- name: '<custom-command-here>'
- runas: ubuntu
Please be as specific as possible and give set-up details.
- on-prem machine
- VM (Virtualbox, KVM, etc. please specify)
- VM running on a cloud service, please be explicit and add details
- container (Kubernetes, Docker, containerd, etc. please specify)
- or a combination, please be explicit
- jails if it is FreeBSD
- classic packaging
- onedir packaging
- used bootstrap to install
Steps to Reproduce the behavior
(Include debug logs if possible and relevant)
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Salt Version:
Salt: 3006.3
Python Version:
Python: 3.10.4 (main, Apr 20 2022, 01:21:48) [GCC 10.3.1 20210424]
Dependency Versions:
cffi: 1.14.6
cherrypy: unknown
dateutil: 2.8.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.2
libgit2: Not Installed
looseversion: 1.0.2
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 22.0
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: Not Installed
python-gnupg: 0.4.8
PyYAML: 6.0.1
PyZMQ: 23.2.0
relenv: Not Installed
smmap: Not Installed
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: alpine 3.14.6
locale: utf-8
machine: x86_64
release: 5.11.0-1022-aws
system: Linux
version: Alpine Linux 3.14.6 Additional context
Add any other context about the problem here.
Activity
welcome commentedon Sep 21, 2023
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!
brettgilmer commentedon Dec 21, 2023
HI - I am seeing this same issue.
I am also seeing on the periodic pings configured by the "ping_interval" minion configuration parameter.
Running salt 3006.5 on both minon and master.
darkpixel commentedon Dec 22, 2023
It seems worse with 3006.5 with Linux as the master when managing Windows minions.
brettgilmer commentedon Dec 26, 2023
This is affecting many of our endpoints. I can get them to re-establish communication by restarting the minion or the master, but they lose communication again.
brettgilmer commentedon Dec 28, 2023
Restarting the saltmaster seems to fix the issue for all minions, for a while, but the issue will return after about 12 hours on a different seemingly random selection of minions.
raddessi commentedon Jan 25, 2024
I seem to have a very similar issue with 3006.x but in my case restarting the master does not have any effect and only a minion restart resolves the issue.
Another oddity is that I can see in the minion logs that the minion is still receiving commands from the master and is able to execute them just fine but the master seemingly never receives the response data. If I issue a
salt '*' service.restart salt-minionfrom the master all of the minions receive the command and restart and pop back up just fine and then communication will work for probably another 12 hours or so.I don't recall having this issue on 3005.x but I have not downgraded that far yet.. so far both 3006.5 and 3006.4 minions have the problem for me. I'll try to run a tcpdump if I have time
ReubenM commentedon Jan 29, 2024
I am encountering similar issues. Everything is 3006.5.
I've spent two day's thinking I broke something in some recent changes I made, but I've found that the minions jobs are succeeding, but they timeout trying to communicate back to the master. I'm thinking this may be related to concurrency + load. I use this for testing environment automation, and during tests I have concurrent jobs fired off by the scheduler for test data collections. And that is where the issues start to show up in the logs. When this happens, the minions seem to try to re-send the data which just compounds the problem. The logs on the master show that it is getting the messages because it is flagging duplicate messages, but something seems to be getting lost processing the return data.
The traces all look the same and seem to indicate something is getting dropped in concurrency related code:
darkpixel commentedon Feb 13, 2024
I just discovered something.
At any random time I might have 25-50 minions that don't appear to respond to jobs. They may or may not respond to
test.ping, but definitely won't respond to something likestate.sls somestate....buuuut they ARE actually are listening to the master.
So my workflow is stupidly:
raddessi commentedon Feb 13, 2024
@darkpixel Yes I have found the same thing and have the same workflow. Something just gets stuck and responses get lost somewhere. They are always receiving events however as you say, in my experience
raddessi commentedon Feb 23, 2024
This seems to still be an issue on 3006.7 when both minion and master are the same version
darkpixel commentedon Mar 11, 2024
3007.0 is...worse?
Woke up to all ~600 minions in an environment being offline.
salt '*' test.pingfailed for every minion.The log showed returns from every minion, but the master spit out
Minion did not return: [Not connected]for every single one.Restarted the salt-master service, got distracted for ~15 minutes, ran another
test.pingand several hundred failed to respond.Used Cluster SSH to connect in to every machine I can reach across the internet and restarted the salt-minion service and I'm down to a mix of ~60 (Windows, Linux, and BSD) that don't respond and I can't reach. Maybe 10 of them are 3006.7.
I'd love to test/switch to a different transport like websockets that would probably be more stable, but it appears to be "all or nothing". If I switch to websockets on the master, it looks like every minion will disconnect unless I also update them to use websockets...and if I update them to use websockets and something breaks, I'm going to have to spend the next month trying to get access to hosts to fix salt-minion.
185 remaining items
dwoz commentedon Aug 1, 2025
@gou177 Is there any chance you can validate the changes in #68222 properly address this issue?
darkpixel commentedon Aug 27, 2025
Here's something new I just noticed. When minions stop responding (at least on the Linux side of things), I can call
service salt-minion stopand then runps uaxwww | grep saltand there are a handful of processes still running...something related to returns I think. Unfortunately I just noticed while fixing a bunch of my b0rked minions but didn't grab the output.I should be able to grab it in a few days.
darkpixel commentedon Sep 5, 2025
Caught it on my salt master.
All the minions stopped getting certificates complaining "ca_server did not respond. Salt master must permit peers to call the sign_remote_certificate function."
Stopped the salt-master, salt-minion, and salt-api services on the master and processes were left running:
Restarting the master and master's minion were no help, but stopping them and doing a
pkill -f salt-minionand then restarting them fixed the issue.Ikramromdhani commentedon Sep 17, 2025
Any idea if this issue maybe included in 3006.16? and if yes do we have a timeline for it? I can see this issue happening with 3006.10 and it is occurring more frequently in big salt infra. I also think it sensitive to keep restarting thousands minions just to work around this issue.
dwoz commentedon Sep 18, 2025
@qianguih @darkpixel @gou177 @dnessett
This along with #68297 should now be resolved in
3006.16. Please confirm.darkpixel commentedon Sep 26, 2025
Found the processes that were having a problem.
On the salt master after stopping the salt-master, salt-minion, and salt-api, the following salt-minion processes are left running:
Unless you manually kill those processes, and sort of remote communication will fail. i.e. having a minion (my-customer-minion) try to get the salt master's minion to sign a certificate and return it.
Doing a 'service salt-minion stop' or service 'salt-minion restart' won't remove those gorked processes.
The master's minion log is full of:
I'm not entirely certain if those errors are related, but they seem to coincide with remote communication breaking.
Once I kill those processes and restart the minion, everything works beautifully.
dwoz commentedon Sep 30, 2025
@darkpixel Can you confirm this is on 3006.16 and can you please open a new issue for this?
dwoz commentedon Oct 10, 2025
@darkpixel ping.
ldav1s commentedon Oct 15, 2025
I seem to have reproduced @darkpixel 's problem on 3006.16. I attempted a
sudo systemctl restart salt-minionabout an hour ago. That command returned without error. I then attempted atest.pingfrom the master which timed out. So I logged into the host:According to
ps auxprocess 1079760 was from the time I installed 3006.16 on this minion or later that same day:As part of the job I use to install the
salt-miniononedir packages, I do attempt to restart the service post-install shortly after the install completes. I tended to get less unstarted minions that way in the past (and currently).After killing the old process:
and
sudo systemctl restart salt-minion.serviceon the node I was able totest.pingfrom the minion's salt master again and receive a response.The salt master is running 3006.16 (onedir, Ubuntu 20.04, installed through apt, with additions for gitfs remote pillars and state repos) and manages minions also on 3006.16 (onedir, Ubuntu 20.04, installed through apt). The minions themselves are a mix of on-prem hosts (2 datacenters; salt connects through a public interface) the and VMs (same 2 datacenters as on-prem; salt connects through a private interface).
ldav1s commentedon Oct 15, 2025
Also observing
Minion._thread_returnprocesses hanging around inappropriately postsudo systemctl stop salt-minion.ldav1s commentedon Oct 15, 2025
Noticed that
/lib/systemd/system/salt-minion.servicehas:instead of the default
control-group. I might be trying that with a drop-in.barneysowood commentedon Oct 15, 2025
@ldav1s - please open a new issue and put all the details in that. Thanks!