traefik / traefik

The Cloud Native Application Proxy
https://traefik.io
MIT License
51.28k stars 5.1k forks source link

AutoUpdate to V3.0.0, docker won't start, swarmModeRefreshSeconds field not found #10671

Closed F117aDriver closed 6 months ago

F117aDriver commented 6 months ago

Welcome!

What did you do?

Docker running on Unraid server, auto updated 15 hours ago. Traefik image won't start.

What did you see instead?

Woke up to an auto update to v3.0.0 and traefik container not started. Latest tag was being used and running fine 15 hours ago. Log has error "command traefik error: field not found, node: swarmModeRefreshSeconds." This field is set in the yml file to 15s.

What version of Traefik are you using?

Version: 3.0.0 Codename: beaufort Go version: go1.22.2 Built: 2024-04-29T14:25:59Z OS/Arch: linux/amd64

What is your environment & configuration?

global:
  checkNewVersion: true
  sendAnonymousUsage: false
serversTransport:
  insecureSkipVerify: true

entryPoints:
  # Not used in apps, but redirect everything from HTTP to HTTPS
  http:
    address: :80
    # forwardedHeaders:
    #   trustedIPs: &trustedIps
    #     # Start of Clouflare public IP list for HTTP requests, remove this if you don't use it
    #     - 173.245.48.0/20
    #     - 103.21.244.0/22
    #     - 103.22.200.0/22
    #     - 103.31.4.0/22
    #     - 141.101.64.0/18
    #     - 108.162.192.0/18
    #     - 190.93.240.0/20
    #     - 188.114.96.0/20
    #     - 197.234.240.0/22
    #     - 198.41.128.0/17
    #     - 162.158.0.0/15
    #     - 104.16.0.0/12
    #     - 172.64.0.0/13
    #     - 131.0.72.0/22
    #     - 2400:cb00::/32
    #     - 2606:4700::/32
    #     - 2803:f800::/32
    #     - 2405:b500::/32
    #     - 2405:8100::/32
    #     - 2a06:98c0::/29
    #     - 2c0f:f248::/32
    #     # End of Cloudlare public IP list
    http:
      redirections:
        entryPoint:
          to: https
          scheme: https

  # HTTPS endpoint, with domain wildcard
  https:
    address: :443
    # forwardedHeaders:
    #   # Reuse list of Cloudflare Trusted IP's above for HTTPS requests
    #   trustedIPs: *trustedIps
    http:
      tls:
        # Generate a wildcard domain certificate
        certResolver: letsencrypt
        domains:
          - main: redacted.com
            sans:
              - '*.redacted.com'
      middlewares:
        - securityHeaders@file

providers:
  providersThrottleDuration: 2s

  # File provider for connecting things that are outside of docker / defining middleware
  file:
    filename: /etc/traefik/fileConfig.yml
    watch: true

  # Docker provider for connecting all apps that are inside of the docker network
  docker:
    watch: true
    network: changednetworkname    # Add Your Docker Network Name Here
    # Default host rule to containername.domain.example
    defaultRule: "Host(`{{ lower (trimPrefix `/` .Name )}}.redacted.com`)"    # Replace with your domain
    swarmModeRefreshSeconds: 15s
    exposedByDefault: false
    endpoint: "tcp://dockersocket:2375"

# Enable traefik ui
api:
  dashboard: true
  insecure: true

# Log level INFO|DEBUG|ERROR
log:
  level: INFO

# Use letsencrypt to generate ssl serficiates
certificatesResolvers:
  letsencrypt:
    acme:
      email: admin@redacted.com
      storage: /etc/traefik/acme.json
      dnsChallenge:
        provider: cloudflare
        # Used to make sure the dns challenge is propagated to the rights dns servers
        resolvers:
          - "1.1.1.1:53"
          - "1.0.0.1:53"

If applicable, please paste the log output in DEBUG level

{"log":"{\"level\":\"error\",\"error\":\"command traefik error: field not found, node: swarmModeRefreshSeconds\",\"time\":\"2024-04-30T09:33:01-07:00\",\"message\":\"Command error\"}\n","stream":"stderr","time":"2024-04-30T16:33:01.345334377Z"}
{"log":"{\"level\":\"error\",\"error\":\"command traefik error: field not found, node: swarmModeRefreshSeconds\",\"time\":\"2024-04-30T09:42:01-07:00\",\"message\":\"Command error\"}\n","stream":"stderr","time":"2024-04-30T16:42:01.321524514Z"}
avidflyer17 commented 6 months ago

I was having the same issue, I have removed this line and it worked :)

swarmModeRefreshSeconds: 15s
F117aDriver commented 6 months ago

Thanks for the heads up. I reverted to 2.11.2 and it started fine. So I just tried also removing that config and it does indeed start. Now Authelia won't start, with no log errors anywhere that I can find. Update days never go well...

ldez commented 6 months ago

Hello,

swarm is now a dedicated provider:

swarmModeRefreshSeconds was a Swarm-only option, so it has been removed from the Docker provider: