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

Traefik unable to create logs folder in docker swarm #1217

Closed
keshavpeswani opened this issue Mar 2, 2017 · 2 comments
Closed

Traefik unable to create logs folder in docker swarm #1217

keshavpeswani opened this issue Mar 2, 2017 · 2 comments

Comments

@keshavpeswani
Copy link

keshavpeswani commented Mar 2, 2017

What version of Traefik are you using (traefik version)?

1.1.2

What is your environment & configuration (arguments, toml...)?

We are running traefik as docker service in swarm mode.

What did you do?

The following docker command is used to run traefik

sudo docker service create \
    --name traefik \
    --replicas=1 \
    --constraint=node.role==manager \
    --publish 80:80 --publish 8080:8080 \
    --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
    --network swarm-demo-overlay-net \
    traefik:v1.1.2 \
    --docker \
    --docker.swarmmode \
    --docker.domain=abc.com \
    --docker.watch \
    --logLevel=INFO \
    --traefikLogsFile='/app/logs/traefik.log' \
    --accessLogsFile='/app/logs/access.log' \
    --web

What did you expect to see?

Traefik should create the log folder '/app/logs/' if not present.

What did you see instead?

Traefik throws following error at stdout and then redirects the logs to stdout

time="2017-03-02T04:13:55Z" level=error msg="Error opening fileopen \"/app/logs/access.log\": no such file or directory" 
time="2017-03-02T04:13:55Z" level=error msg="Error opening fileopen \"/app/logs/traefik.log\": no such file or directory" 
time="2017-03-02T04:13:55Z" level=info msg="Traefik version v1.1.2 built on 2016-12-15_10:21:15AM" 
time="2017-03-02T04:13:55Z" level=error msg="Error opening fileopen \"/app/logs/access.log\": no such file or directory" 
@DaBlitzStein
Copy link

Same here

@ldez
Copy link
Member

ldez commented Jun 9, 2017

Fixed by #1507

@ldez ldez closed this as completed Jun 9, 2017
@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

4 participants