Invalid memory address or nil pointer dereference after updating to 2.4.11

Watchtower updated my traefik instance to 2.4.11 last night, this morning no more websites.

Logs show:

time="2021-07-16T02:00:37-07:00" level=error msg="Error in Go routine: runtime error: invalid memory address or nil pointer dereference",time="2021-07-16T02:00:37-07:00" level=info msg="Configuration loaded from file: /config/traefik.yml",
time="2021-07-16T02:00:37-07:00" level=error msg="Stack: goroutine 85 [running]:\nruntime/debug.Stack(0xc000194000, 0x343c2ba, 0x17)\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0x9f\ngithub.com/traefik/traefik/v2/pkg/safe.defaultRecoverGoroutine(0x2e89ec0, 0x546faf0)\n\t/go/src/github.com/traefik/traefik/pkg/safe/routine.go:66 +0xb4\ngithub.com/traefik/traefik/v2/pkg/safe.GoWithRecover.func1.1(0x3557b00)\n\t/go/src/github.com/traefik/traefik/pkg/safe/routine.go:56 +0x5a\npanic(0x2e89ec0, 0x546faf0)\n\t/usr/local/go/src/runtime/panic.go:965 +0x1b9\ngithub.com/traefik/traefik/v2/pkg/provider/file.(*Provider).loadFileConfig(0xc0005a94d0, 0x3999d80, 0xc0008a5b00, 0xc000057068, 0x13, 0x3999d01, 0xc0008a5b00, 0x18, 0x18)\n\t/go/src/github.com/traefik/traefik/pkg/provider/file/file.go:194 +0xb20\ngithub.com/traefik/traefik/v2/pkg/provider/file.(*Provider).BuildConfiguration(0xc0005a94d0, 0x18, 0x7faf07565f18, 0x18)\n\t/go/src/github.com/traefik/traefik/pkg/provider/file/file.go:85 +0xf8\ngithub.com/traefik/traefik/v2/pkg/provider/file.(*Provider).Provide(0xc0005a94d0, 0xc000590780, 0xc0008a4c90, 0xc000594f20, 0x2)\n\t/go/src/github.com/traefik/traefik/pkg/provider/file/file.go:49 +0x32\ngithub.com/traefik/traefik/v2/pkg/provider/aggregator.launchProvider(0xc000590780, 0xc0008a4c90, 0x3959690, 0xc0005a94d0)\n\t/go/src/github.com/traefik/traefik/pkg/provider/aggregator/aggregator.go:151 +0x1c2\ngithub.com/traefik/traefik/v2/pkg/provider/aggregator.ProviderAggregator.Provide(0x3959de8, 0xc0003d7f80, 0x3959690, 0xc0005a94d0, 0xc000594a80, 0x2, 0x2, 0xc000590780, 0xc0008a4c90, 0x0, ...)\n\t/go/src/github.com/traefik/traefik/pkg/provider/aggregator/aggregator.go:123 +0x1bb\ngithub.com/traefik/traefik/v2/pkg/server.(*ConfigurationWatcher).startProvider.func1()\n\t/go/src/github.com/traefik/traefik/pkg/server/configurationwatcher.go:96 +0x68\ngithub.com/traefik/traefik/v2/pkg/safe.GoWithRecover.func1(0x3557b00, 0xc0008a5a10)\n\t/go/src/github.com/traefik/traefik/pkg/safe/routine.go:59 +0x4f\ncreated by github.com/traefik/traefik/v2/pkg/safe.GoWithRecover\n\t/go/src/github.com/traefik/traefik/pkg/safe/routine.go:53 +0x49\n"

Config file:

global:
  sendAnonymousUsage: true

log:
  level: "WARN" # DEBUG, PANIC, FATAL, ERROR, WARN, and INFO

api:
  dashboard: true
  insecure: true # Enable dashboard on http 8080 for direct access

serversTransport:
  insecureSkipVerify: true # Ignore downstream SSL cert errors
  
providers:
  docker:
    exposedByDefault: false
    network: "localnet" # {{ docker_local_network }}
  file:
    filename: "/config/dynamic.yml"

# https://docs.traefik.io/routing/entrypoints/
entryPoints:
  web:
    address: ":80"
    http:
      redirections:
        entryPoint:
          to: websecure
          scheme: https
  websecure:
    address: ":443"
    http:
      # --entrypoints.websecure.http.tls=true
      # --entrypoints.websecure.http.tls.certresolver=dns-cloudflare
      # --certificatesresolvers.dns-cloudflare.acme.email={{ cloudflare_email }}
      # --certificatesresolvers.dns-cloudflare.acme.storage=/config/acme.json
      # --certificatesresolvers.dns-cloudflare.acme.dnschallenge.provider=cloudflare
      # CF_DNS_API_TOKEN: "{{ cloudflare_dns_api_token }}"
      tls:
        domains:
          - main: "home.insanegenius.net" # {{ ansible_domain }}
            sans:
              - "*.home.insanegenius.net" #*.{{ ansible_domain }}
          - main: "insanegenius.net" # {{ external_domain }}
            sans:
              - "*.insanegenius.net" # *.{{ external_domain }}

I run two instances of traefik, different configs, both show the same go error.

Reverting to 2.4.9 vs. latest and all is well again (there is no 2.4.10 tag on docker hub)

Any ideas?

Hello @ptr727,

Can you please open a github issue for this? Panics should never occur from a user configuration, and need to be resolved by the Traefik team.

It appears to be related to a change made in the latest release.

Done:

1 Like