Skip to content
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

File Watcher for rules does not work #683

Closed
SvenAbels opened this issue Sep 18, 2016 · 6 comments
Closed

File Watcher for rules does not work #683

SvenAbels opened this issue Sep 18, 2016 · 6 comments

Comments

@SvenAbels
Copy link

SvenAbels commented Sep 18, 2016

I started traefik like this:

docker service create \
     -p 80:80 -p 443:443 \
    --mount type=bind,src=/ds/rtsync/traefik/etc,dst=/etc/traefik \
    --name traefik \
    traefik:v1.0.2

The config lists:

[file]
filename = "/etc/traefik/rules.toml"
watch = true

This works fine and the rules.toml is located outside the container. However, if I modify it, traefik does not automatically reload the rules.

Is there a way to make traefik manually reload the rules?

@emilevauge
Copy link
Member

emilevauge commented Sep 19, 2016

@ascora which architecture are you using? #595 (comment)

Are you on a bare metal Ubuntu, or are ou using a VM ?

@SvenAbels
Copy link
Author

It's a bare metal server. I'm using the latest docker version 1.12.1 in docker swarm mode.

I also tested it on a second server from digital ocrean (I assume that those are VMs) with the same result

@SvenAbels
Copy link
Author

SvenAbels commented Sep 19, 2016

@emilevauge As an intermediate solution: Is there a manual way to make traefik reload the file - e.g. via a curl call?

@cheiff
Copy link

cheiff commented Sep 23, 2016

I am having the same issue. I have to stop and start the traefik container for getting configuration updated.
I have this in my traefik.toml

[file]
filename = "/etc/traefik/rules.toml"
watch = true

The file works and is found, because the rules are loaded.
It also happens that the rules do not work, give bad gateway all the time. Could that be related?
Many thanks

@SvenAbels
Copy link
Author

SvenAbels commented Oct 17, 2016

I found the reason for this. In our case, the rules.toml have been mapped to a shared drive (gluster) and it seems that Traefik uses inotofy to detect changes for the rules-file. But gluster doesn't support inotify yet...

@sunnysideocean
Copy link

I can confirm this with our gluster drive as well.

@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants