-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traefik (1.6.5 and 1.7.1) stops watching file after it detects Marathon is down #3974
Comments
Hi @daltonmatos, |
Sure @jbdoumenjou, I will re-run the tests and post it here. Thanks. |
Here is the raw log, just copied from the terminal. All I changed was to redact the domain name.
Every |
@daltonmatos could you provide the full content (redacted) of your |
Hello @ldez, Here is the config: MaxIdleConnsPerHost = 10000
logLevel = "debug"
[lifeCycle]
graceTimeOut = 10
defaultEntryPoints = ["http"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[entryPoints.traefik]
address = ":8082"
[file]
watch = true
fileName = "/etc/ssl.toml"
[api]
dashboard = true
[metrics]
[metrics.prometheus]
entrypoint = "traefik"
buckets = [0.1,0.3,1.2,5.0]
[marathon]
endpoint = "http://172.18.0.31:8080"
watch = true
domain = "marathon"
groupsAsSubDomains = true
|
It's a problem in the logic, I debuged and reproduce the issue. If the first configuration loaded in [1] is The fix might be to add a loop trying to reload the first configuration from time to time if the initial was null and the watch is on. I'll try make a pr for this change. |
If Traefik can't load the configuration when starting it will give up doing so until a new Marathon event gets fired. If no new event is fired then no configuration will ever be loaded, no matter if the watch is true or not. fix traefik#3974
If Traefik can't load the configuration when starting it will give up doing so until a new Marathon event gets fired. If no new event is fired then no configuration will ever be loaded, no matter if the watch is true or not. fix traefik#3974
If Traefik can't load the configuration when starting it will give up doing so until a new Marathon event gets fired. If no new event is fired then no configuration will ever be loaded, no matter if the watch is true or not. fix traefik#3974
Closed by #4230. |
Do you want to request a feature or report a bug?
Bug
What did you do?
I'm trying to use the
file.watch
feature. The idea is to be able to reload SSL certificates without restaring traefik.I have the TLS config on a separated file, and here is my main config file (the part that matters):
I have two copies of "/etc/ssl.toml", each one with a different certificate, like this:
ssl1.toml
:and
ssl2.toml
:And then what I do is just a simple
cp
, like this:And check the certificates were reloaded with a simple curl to localhost.
What did you expect to see?
I expected to see traefik change the certificates every time I did the
cp
.What did you see instead?
Traefik changes the certificates correctly, until this message appears in the debug log:
As soon as this message appears, traefik does not detect the file change anymore and then the certificates stop being reloaded.
Output of
traefik version
: (What version of Traefik are you using?)The version here is
1.6.5
but this same behavior happens with1.7.1
.What is your environment & configuration (arguments, toml, provider, platform, ...)?
If applicable, please paste the log output at DEBUG level (
--logLevel=DEBUG
switch)For now on, even changing the contents of
/etc/ssl.toml
, traefik does not detect this change and does not reload the certificates.Important Note: I was only able to reproduce this when I started Traefik with Marathon Turned off. When I started traefik with Matathon already started, all works. Even when I remove every app from Marathon and then stop it. but if I later start marathon, Traefik does not start to detect the file changes, although it receives new updates from Marathon:
Let me see if you need any new information and I will provide it.
The text was updated successfully, but these errors were encountered: