Verified Production Fix
[docker/cli] Docker stack: no suitable node (scheduling constraints not satisfied on 14 nodes; host-m…
GH-docker/cli#6604 • Mar 07, 2026
### ROOT CAUSE
The issue arises because the Docker scheduler cannot find any nodes that meet the specified placement constraints. The services `edge-de1` and `edge-nl1` require nodes with labels `location == de1` and `location == nl1`, respectively. However, none of the 14 available nodes have these labels, leading to the scheduling failure.
### CODE FIX
1. **Verify Node Labels**: Ensure that the nodes in your cluster have the correct `location` labels (`de1` and `nl1`). You can check node labels using:
bash
docker node ls --detail
2. **Update Constraints or Node Labels**:
- If nodes exist with `de1` or `nl1`, adjust the service constraints to match existing labels.
- If labels are incorrect, correct them on the nodes.
3. **Adjust Service Configuration**:
- Modify the `placement` constraints in `docker-compose.yml` to use existing node labels or remove constraints if they're not needed.
Here's the corrected `docker-compose.yml` without constraints:
yaml
services:
edge-de1:
image: test-private/test:1.1.3
ports:
- target: 80
published: 9090
mode: host
deploy:
mode: replicated
replicas: 1
environment:
NODE_ID: 123
NODE_KEY: "123123123123123123123"
TEST: V1
configs:
- source: test_index_v1
target: /usr/share/nginx/html/index.html
- source: base_config_v1
target: /etc/xxxx/config.yml
edge-nl1:
image: test-private/test:1.1.3
ports:
- target: 80
published: 9090
mode: host
deploy:
mode: replicated
replicas: 1
environment:
NODE_ID: 1234
NODE_KEY: "1234123412341234123412341234"
TEST: V1
configs:
- source: test_index_v1
target: /usr/share/nginx/html/index.html
- source: base_config_v1
target: /etc/xxxx/config.yml
**Note**: Remove or adjust the `placement` constraints based on your node labels.
Deploy with DigitalOcean
Use this fix in production instantly. Claim your $200 developer credit.
Get Started →
digital