Let's Encrypt dnsChallenge with exec "exec format error"

Unfortunately I have another question. I hope that you can help me here too.

I'm trying to create a shell script for dnsChallenge all day because my DNS provider is not supported.

My traefik.toml part:

    address = ":80"

    address = ":443"
  email = "my@mail.tld"
  storage = "acme.json"
  caServer = "https://acme-staging-v02.api.letsencrypt.org/directory"
    provider = "exec"

My docker-compose.yml part

      - "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
      - "traefik.http.routers.traefik-secure.service=api@internal"
      - "traefik.http.routers.traefik-secure.entrypoints=https"
      - "traefik.http.routers.traefik-secure.rule=Host(`${TRAEFIK_URL}`)"
      - "traefik.http.routers.traefik-secure.tls=true"
      - "traefik.http.routers.traefik-secure.tls.certresolver=http"

      - /var/run/docker.sock:/var/run/docker.sock
      - ./traefik.toml:/traefik.toml:ro
      - /dns.sh:/etc/traefik/dns.sh

      - "EXEC_PATH=/etc/traefik/dns.sh"

In my dns.sh I currently have only one output of all parameters to an temote URL because I don't know with which parameters the file is called

The error

time="2020-09-04T17:15:20+02:00" level=info msg="Configuration loaded from file: /traefik.toml"
time="2020-09-04T17:15:25+02:00" level=error msg="Unable to obtain ACME certificate for domains \"www.mydomain.tld\": unable to generate a certificate for the domains [www.mydomain.tld]: error: one or more domains had a problem:\n[www.mydomain.tld] [www.mydomain.tld] acme: error presenting token: fork/exec /etc/traefik/dns.sh: exec format error\n" routerName=traefik-secure@docker rule="Host(`www.mydomain.tld`)" providerName=http.acme

When I connect to the container with docker exec and run the dns.sh it works


your script must follows the contract defines in exec/#commands

Remember that the script in executed inside the Traefik container, not inside another container.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.