Traefik "the service ... does not exist" in CI
A Traefik router references a service that is not defined anywhere in the dynamic config. The name is present on the router but has no matching http.services entry, so routing fails.
What this error means
Traefik logs "the service X does not exist" and the affected router returns 404 or 502 instead of reaching a backend.
traefik
level=error msg="the service my-service does not exist" routerName=my-router@file
Common causes
The service name is misspelled
The router references my-service but the services block defines myservice, so no match is found.
The service lives in a provider that was not loaded
The service is defined in a file or provider Traefik did not load, so from the router's view it does not exist.
How to fix it
Define the referenced service
- Confirm the exact service name the router uses.
- Add or correct the matching entry under
http.services. - Reload and verify the router resolves to a backend.
traefik-dynamic.yml
http:
services:
my-service:
loadBalancer:
servers:
- url: "http://backend:8080"Ensure the provider that holds it is loaded
If the service is in another file, make sure the file provider watches that directory so Traefik sees it.
traefik.yml
providers:
file:
directory: /etc/traefik/dynamic
watch: trueHow to prevent it
- Keep router service references in sync with defined services.
- Load every dynamic config file via the file provider directory.
- Validate the merged config in CI before deploying.
Related guides
Traefik "router ... has no service" in CIFix Traefik "error while building configuration: router ... has no service" in CI - a router was defined with…
Traefik "middleware ... does not exist" in CIFix Traefik "middleware ... does not exist" in CI - a router references a middleware that is not defined, or…
Traefik "entryPoint ... doesn't exist" in CIFix Traefik "entryPoint ... doesn't exist" in CI - a router binds to an entrypoint that is not declared in th…