Traefik cert error

Been trying to get this figured out for the past day, haven't seemed to be able to get it.
ERR Unable to obtain ACME certificate for domains error="unable to generate a certificate for the domains [zip.doare.dev]: error: one or more domains had a problem:\n[zip.doare.dev] [zip.doare.dev] acme: error presenting token: cloudflare: failed to find zone doare.dev.: ListZonesContext command failed: Invalid request headers (6003)\n" ACME CA=https://acme-v02.api.letsencrypt.org/directory acmeCA=https://acme-v02.api.letsencrypt.org/directory domains=["zip.doare.dev"] providerName=production.acme routerName=zipline@file rule=Host(`zip.doare.dev`)
ERR Unable to obtain ACME certificate for domains error="unable to generate a certificate for the domains [zip.doare.dev]: error: one or more domains had a problem:\n[zip.doare.dev] [zip.doare.dev] acme: error presenting token: cloudflare: failed to find zone doare.dev.: ListZonesContext command failed: Invalid request headers (6003)\n" ACME CA=https://acme-v02.api.letsencrypt.org/directory acmeCA=https://acme-v02.api.letsencrypt.org/directory domains=["zip.doare.dev"] providerName=production.acme routerName=zipline@file rule=Host(`zip.doare.dev`)
this is the error I am getting, I've passed the correct information according to the traefik docs, but I keep getting Invalid request headers
1 Reply
door
doorOP2w ago
When messing around with the environment variables for the docker container, I did end up getting invalid environment variables, and fixed those according to the error but even after fixing those I was getting the Invalid request headers docker-compose.yml
GNU nano 6.2 docker-compose.yml
services:
traefik:
image: "traefik:v3.1"
container_name: "traefik"
command:
# - "--api.insecure=true"
- "--providers.docker=true"
# - "--providers.docker.exposedbydefault=false"
# - "--entryPoints.web.address=:80"
# - "--entryPoints.websecure.address=:443"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./config/traefik.yaml:/traefik.yaml"
- "./config/conf/:/etc/traefik/conf/"
- "./config/certs/:/etc/traefik/certs/"
environment:
- CLOUDFLARE_EMAIL="xxxxx"
- CLOUDFLARE_API_KEY=xxxxx
networks:
- frontend

networks:
frontend:
external: true
GNU nano 6.2 docker-compose.yml
services:
traefik:
image: "traefik:v3.1"
container_name: "traefik"
command:
# - "--api.insecure=true"
- "--providers.docker=true"
# - "--providers.docker.exposedbydefault=false"
# - "--entryPoints.web.address=:80"
# - "--entryPoints.websecure.address=:443"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./config/traefik.yaml:/traefik.yaml"
- "./config/conf/:/etc/traefik/conf/"
- "./config/certs/:/etc/traefik/certs/"
environment:
- CLOUDFLARE_EMAIL="xxxxx"
- CLOUDFLARE_API_KEY=xxxxx
networks:
- frontend

networks:
frontend:
external: true
I'm only having issues for the zip.doare.dev I do already have one working for my portainer which works fine, but that was moved over from another server to this new one, which could be the reason it worked without it erroring Okay, not sure exactly how, but I fixed it.

Did you find this page helpful?