Sporadic problem/error with middleware

Dear all,

I have the following configs:


      - "traefik.http.routers.influxdb.tls=true"
      - "traefik.http.routers.influxdb.tls.options=mintls13@file"
      - "traefik.http.routers.influxdb.tls.certresolver=production"    # production, staging
      - "traefik.http.routers.influxdb.middlewares=secure-headers@file"


      minVersion: VersionTLS12
      minVersion: VersionTLS13

Sometimes it just works fine, sometimes I get this in the logs (and the secure-headers middleware doesn't show up in traefik:

level=error msg="building router handler: unknown TLS options: mintls13@file" entryPointName=websecure routerName=influxdb@docker
level=error msg="unknown TLS options: mintls13@file" entryPointName=websecure routerName=influxdb@docker

When it doesn't work, I restart traefik and it solves the problem. When it works, it works indefinitely.

Any idea what might be the issue?

I am having the exact same issue on Traefik 3.0 beta
This might be one of the changes between versions or something else, but I've been racking my brains as well to no avail.

Actually scratch that, I have figured out the issue I've been facing.

Not sure if it's helpful in your situation, but in my files there were two main issues:

  • Using default as one of the values for tls.options collection (seemed to break my config. I changed it to mintls12 and it worked (I guess this might be the most helpful)
  • The other thing, that I think is only relevant to my case, is that during the tls shenanigans I've messed up my dynamic config and some spacing became incorrect, which was apparent by the error messages in traefik log saying that entrypoints, middlewares, etc were not found.

Also, in your case there is no need to explicitly set tls=true as presence of items in tls collection indicates it as "trie"

@MNeverOff You are spot on. The name default caused the problem. Now, I have to monitor it for a while to make sure, and then I will mark it as a solution.

Thanks for the tip on TLS, too!

I appreciate the help!!!

I'm afraid, the issues stays...
I think I can observe that when Traefik starts everything works just fine, but when I modify dynamic.yml and the config gets updated, that's when the errors happen. No matter how many times I ry changing dynamic.yml. But if I restart Traefik, the issue goes away.
This seems to be consistent across several installations (from scratch) I have done in the past few days.