Error: use of closed network connection

Hello,

i run traefik (2.5.5) in a portainer stack (docker compose).
If I start the container manually, everything is allright.
Because I made bad experience with restart:always i use the on-failure:5 policy.
When traefik tries to start after a reboot, it throws 5 errors and does not get up.
I dont know, why these errors appear.

I only use the file-provider.
Someone can tell me whats wrong here?

Errors:

time="2021-12-17T06:26:47Z" level=error msg="Error while starting server: accept tcp [::]:80: use of closed network connection" entryPointName=web
time="2021-12-17T06:26:47Z" level=error msg="accept tcp [::]:80: use of closed network connection" entryPointName=web
time="2021-12-17T06:26:47Z" level=error msg="Error while starting server: accept tcp [::]:443: use of closed network connection" entryPointName=websecure
time="2021-12-17T06:26:47Z" level=error msg="accept tcp [::]:443: use of closed network connection" entryPointName=websecure
time="2021-12-17T06:25:30Z" level=info msg="Configuration loaded from file: /config/traefik.yml"

Here are my config files (replaced my domain)

traefik.yml (redirection commented for test use:

api:
  dashboard: true
  
entryPoints:
  web:
    address: ":80"
#    http:
#      redirections:
#        entryPoint:
#          to: websecure
#          scheme: https
  websecure:
    address: ":443"

providers:
  file:
    directory: /config
    watch: true



serversTransport:
  insecureSkipVerify: true

api.yml:

http:
  routers:
    api:
      entryPoints:
        - "web"      
      rule: Host(`traefik.tld`)
      service: api@internal

portainer.yml:

http:
  routers:
    portainer:
      entryPoints:
        - "web"
      rule: Host(`portainer.tld`)
      service: portainer-web
      


  services:
    portainer-web:
      loadBalancer:
        servers:
          - url: "http://portainer:9000/"

I just changed the loglevel to debug and now i get the following:
(removed all dynamic configs before)

time="2021-12-17T16:17:49Z" level=info msg="Configuration loaded from file: /config/traefik.yml"
time="2021-12-17T16:17:49Z" level=info msg="Traefik version 2.5.5 built on 2021-12-10T17:00:35Z"
time="2021-12-17T16:17:49Z" level=debug msg="Static configuration loaded {\"global\":{\"checkNewVersion\":true},\"serversTransport\":{\"maxIdleConnsPerHost\":200},\"entryPoints\":{\"web\":{\"address\":\":80\",\"transport\":{\"lifeCycle\":{\"graceTimeOut\":\"10s\"},\"respondingTimeouts\":{\"idleTimeout\":\"3m0s\"}},\"forwardedHeaders\":{},\"http\":{},\"udp\":{\"timeout\":\"3s\"}}},\"providers\":{\"providersThrottleDuration\":\"2s\",\"file\":{\"directory\":\"/config\",\"watch\":true}},\"log\":{\"level\":\"DEBUG\",\"format\":\"common\"},\"pilot\":{\"dashboard\":true}}"
time="2021-12-17T16:17:49Z" level=info msg="\nStats collection is disabled.\nHelp us improve Traefik by turning this feature on :)\nMore details on: https://doc.traefik.io/traefik/contributing/data-collection/\n"
time="2021-12-17T16:17:49Z" level=info msg="Starting provider aggregator.ProviderAggregator {}"
time="2021-12-17T16:17:49Z" level=debug msg="Start TCP Server" entryPointName=web
time="2021-12-17T16:17:49Z" level=info msg="Starting provider *file.Provider {\"directory\":\"/config\",\"watch\":true}"
time="2021-12-17T16:17:49Z" level=info msg="Starting provider *traefik.Provider {}"
time="2021-12-17T16:17:49Z" level=info msg="Starting provider *acme.ChallengeTLSALPN {\"Timeout\":4000000000}"
time="2021-12-17T16:17:49Z" level=debug msg="Configuration received from provider file: {\"http\":{},\"tcp\":{},\"udp\":{},\"tls\":{}}" providerName=file
time="2021-12-17T16:17:49Z" level=debug msg="Configuration received from provider internal: {\"http\":{\"services\":{\"noop\":{}},\"serversTransports\":{\"default\":{\"maxIdleConnsPerHost\":200}}},\"tcp\":{},\"tls\":{}}" providerName=internal
time="2021-12-17T16:17:49Z" level=debug msg="No default certificate, generating one" tlsStoreName=default
time="2021-12-17T16:18:30Z" level=info msg="I have to go..."
time="2021-12-17T16:18:30Z" level=info msg="Stopping server gracefully"
time="2021-12-17T16:18:30Z" level=debug msg="Waiting 10s seconds before killing connections." entryPointName=web
time="2021-12-17T16:18:30Z" level=error msg="accept tcp [::]:80: use of closed network connection" entryPointName=web
time="2021-12-17T16:18:30Z" level=error msg="Error while starting server: accept tcp [::]:80: use of closed network connection" entryPointName=web
time="2021-12-17T16:18:31Z" level=debug msg="Entry point web closed" entryPointName=web
time="2021-12-17T16:18:31Z" level=info msg="Server stopped"
time="2021-12-17T16:18:31Z" level=info msg="Shutting down"

Traefik is exiting with Code 0 so the on-failure policy does not work and traefik is down.
Why it says "I have to go" !?

did you fixed this issue? I am facing the same issue.