crowdsec-bouncer-traefik-plugin: discussion: reportMetrics:query crowdsecQuery:unreachable
I get the following error:
ERROR: CrowdsecBouncerTraefikPlugin: 2025/07/04 07:27:46 handleMetricsTicker:reportMetrics reportMetrics:query crowdsecQuery:unreachable url:http://crowdsec:8080/v1/usage-metrics Post "http://crowdsec:8080/v1/usage-metrics": dial tcp 10.0.1.5:8080: connect: connection refused
- running crowdsec 1.6.9 inside docker-swarm on the same host
- crowdsec logs show no error.
possible causes:
- The error is received because the crowdsec container may not be ready yet when traefik starts. or
- During Docker Swarm redeployments, containers may receive different IP addresses. Using persistent volumes for configuration data may lead to stale network references. Old traefikBouncer instances are still present inside the docker volume, although they no longer exist.
As far as I am concerned, everything is working.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17 (7 by maintainers)
I don’t know if it’s because you censured your config but labels on docker swarm have to be under
deploy:to be read by traefik. https://doc.traefik.io/traefik/providers/swarm/ Try, and tell me if it’s working 👍@maxlerebourg Thank you so much, that was it.
Writing out the solution and context for others: I got a bit confused to what counts as a service in the traefik docu and thought for a moment, that I also lack the service configuration.
However, this was not the case, as each of my containers was only running a single service. My replicated app container was running 3 ‘services’, which are all the same.
What docker-compose lists as multiple services is not necessarily multiple services for traefik, especially when you use labels an a per container/service basis.
So this sentence of the docu did not apply to me, even tough I had multiple services inside my docker-compose (did not link the full file)!!
My provider is still listed as docker, not docker swarm, as I only run a single node so far.
However, for traefik running in swarm on a single node it is still an issue to have container labels instead of service labels in the deploy section, as traefik might see my single ‘app’ service as three different services when labels are applied on a container basis.
In case that was not clear, I had to switch my provider to swarm in order to fix the issue and get proper routing for services with traefik.