Skip to content

Traefik does not fail when the configuration file does not exist #2927

@aymericbeaumet

Description

@aymericbeaumet

Do you want to request a feature or report a bug?

bug

What did you do?

I tried to start Traefik with a invalid configuration path (the file does not exist).

What did you expect to see?

I expect Traefik to throw an error indicating the configuration could not be loaded.

What did you see instead?

Traefik failed silently and fell back to the default configuration.

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

$ traefik version
Version:      dev
Codename:     cheddar
Go version:   go1.9.4
Built:        I don't remember exactly
OS/Arch:      darwin/amd64
$ brew info traefik
traefik: stable 1.5.2 (bottled), HEAD

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

No need for a configuration file

If applicable, please paste the log output in debug mode (--debug switch)

$ traefik -c /tmp/foo/bar --debug
INFO[2018-02-25T04:22:15+01:00] Traefik version dev built on I don't remember exactly
INFO[2018-02-25T04:22:15+01:00]
Stats collection is disabled.
Help us improve Traefik by turning this feature on :)
More details on: https://docs.traefik.io/basics/#collected-data

DEBU[2018-02-25T04:22:15+01:00] Global configuration loaded {"LifeCycle":{"RequestAcceptGraceTimeout":0,"GraceTimeOut":0},"GraceTimeOut":0,"Debug":true,"CheckNewVersion":true,"SendAnonymousUsage":false,"AccessLogsFile":"","AccessLog":null,"TraefikLogsFile":"","TraefikLog":null,"LogLevel":"DEBUG","EntryPoints":{"http":{"Network":"","Address":":80","TLS":null,"Redirect":null,"Auth":null,"WhitelistSourceRange":null,"Compress":false,"ProxyProtocol":null,"ForwardedHeaders":{"Insecure":true,"TrustedIPs":null}}},"Cluster":null,"Constraints":[],"ACME":null,"DefaultEntryPoints":["http"],"ProvidersThrottleDuration":2000000000,"MaxIdleConnsPerHost":200,"IdleTimeout":0,"InsecureSkipVerify":false,"RootCAs":null,"Retry":null,"HealthCheck":{"Interval":30000000000},"RespondingTimeouts":null,"ForwardingTimeouts":null,"Web":null,"Docker":null,"File":null,"Marathon":null,"Consul":null,"ConsulCatalog":null,"Etcd":null,"Zookeeper":null,"Boltdb":null,"Kubernetes":null,"Mesos":null,"Eureka":null,"ECS":null,"Rancher":null,"DynamoDB":null,"ServiceFabric":null,"Rest":null,"API":null,"Metrics":null,"Ping":null}
INFO[2018-02-25T04:22:15+01:00] Preparing server http &{Network: Address::80 TLS:<nil> Redirect:<nil> Auth:<nil> WhitelistSourceRange:[] Compress:false ProxyProtocol:<nil> ForwardedHeaders:0xc4206ea160} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s
ERRO[2018-02-25T04:22:15+01:00] Error opening listener listen tcp :80: bind: permission denied
FATA[2018-02-25T04:22:15+01:00] Error preparing server: listen tcp :80: bind: permission denied

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bug/confirmeda confirmed bug (reproducible).priority/P2need to be fixed in the future

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions