No basic example will run

Just spent an afternoon comparing Nginx, Haproxy and Traefik. The first 2 were no problem to get up and running but, after 2 hours sweat and tears, I cannot get even the most basic traefik configuration running (Windows 10 - no Docker). Any advice will be muchly appreciated.

(Initial confusion was around me first downloading v2 and then reading docs and examples for v1.)

When I later switched to v1.7 I was unable to find a single, simple example of Traefik running on port 80 and reverse proxying say to localhost:xxxx Even the basic examples in the docs are IMHO way too complex. All the examples assume Docker or assume we want complex HTTPS setups with load balancing.

Anyhoo, enough ranting. Here is my config which will not produce anything except a 503 (when calling localhost:81) although localhost:9000 is running just fine.

traefik.toml

[api]
  dashboard = true

[file]
  filename = "rules.toml"
  watch = true

defaultEntryPoints = ["http"]

[entryPoints]
  [entryPoints.http]
    address = ":81"

rules.toml

[frontends]
  [frontends.frontend1]
  entrypoints = ["http"]
  backend = "backend1"

[backends]
  [backends.backend1]
    url = "http://127.0.0.1:9000"

Rant continued... the dashboard shows the backend in red although it's not clear (without inspecting the css) that this means something is wrong.

Even with debug logging, there is not a single message that the backend is not reachable. Even with [backends.backend1.healthcheck] configured it just says it's checking the backend but no OK/FAIL status is shown. Windows firewall has been excluded as a problem.

2019/09/03 18:10:47 Using high precision timer
INFO[2019-09-03T18:10:47+02:00] Using TOML configuration file W:\reverseproxy\traefik1.7\traefik.toml
INFO[2019-09-03T18:10:47+02:00] Traefik version v1.7.14 built on 2019-08-14_09:46:58AM
DEBU[2019-09-03T18:10:47+02:00] Global configuration loaded {"LifeCycle":{"RequestAcceptGraceTimeout":0,"GraceTimeOut":10000000000},"GraceTimeOut":0,"Debug":true,"CheckNewVersion":true,"SendAnonymousUsage":false,"AccessLogsFile":"","AccessLog":{"format":"common"},"TraefikLogsFile":"","TraefikLog":null,"Tracing":null,"LogLevel":"","EntryPoints":{"http":{"Address":":81","TLS":null,"Redirect":null,"Auth":null,"WhitelistSourceRange":null,"WhiteList":null,"Compress":false,"ProxyProtocol":null,"ForwardedHeaders":{"Insecure":true,"TrustedIPs":null}},"traefik":{"Address":":8080","TLS":null,"Redirect":null,"Auth":null,"WhitelistSourceRange":null,"WhiteList":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,"AllowMinWeightZero":false,"KeepTrailingSlash":false,"Web":null,"Docker":null,"File":{"Watch":true,"Filename":"rules.toml","Constraints":null,"Trace":false,"TemplateVersion":0,"DebugLogGeneratedTemplate":false,"Directory":"","TraefikFile":"W:\\reverseproxy\\traefik1.7\\traefik.toml"},"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":{"EntryPoint":"traefik","Dashboard":true,"Debug":true,"CurrentConfigurations":null,"Statistics":null},"Metrics":null,"Ping":null,"HostResolver":null}
INFO[2019-09-03T18:10:47+02:00]
Stats collection is disabled.
Help us improve Traefik by turning this feature on :)
More details on: https://docs.traefik.io/basics/#collected-data
INFO[2019-09-03T18:10:47+02:00] Preparing server traefik &{Address::8080 TLS:<nil> Redirect:<nil> Auth:<nil> WhitelistSourceRange:[] WhiteList:<nil> Compress:false ProxyProtocol:<nil> ForwardedHeaders:0xc0000967e0} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s
INFO[2019-09-03T18:10:47+02:00] Starting server on :8080
INFO[2019-09-03T18:10:47+02:00] Preparing server http &{Address::81 TLS:<nil> Redirect:<nil> Auth:<nil> WhitelistSourceRange:[] WhiteList:<nil> Compress:false ProxyProtocol:<nil> ForwardedHeaders:0xc0000967c0} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s
INFO[2019-09-03T18:10:47+02:00] Starting server on :81
INFO[2019-09-03T18:10:47+02:00] Starting provider configuration.ProviderAggregator {}
INFO[2019-09-03T18:10:47+02:00] Starting provider *file.Provider {"Watch":true,"Filename":"rules.toml","Constraints":null,"Trace":false,"TemplateVersion":0,"DebugLogGeneratedTemplate":false,"Directory":"","TraefikFile":"W:\\reverseproxy\\traefik1.7\\traefik.toml"}
DEBU[2019-09-03T18:10:47+02:00] Configuration received from provider file: {"backends":{"backend1":{"loadBalancer":{"method":"drr"},"healthCheck":{"path":"/app/health","interval":"30s"}}},"frontends":{"frontend1":{"entryPoints":["http"],"backend":"backend1","passHostHeader":true,"priority":0,"basicAuth":null}}}
DEBU[2019-09-03T18:10:47+02:00] Wiring frontend frontend1 to entryPoint http 
DEBU[2019-09-03T18:10:47+02:00] Creating backend backend1
DEBU[2019-09-03T18:10:47+02:00] Creating load-balancer drr
DEBU[2019-09-03T18:10:47+02:00] Setting up backend health check [Hostname:  Headers: map[] Path: /app/health Port: 0 Interval: 30s]
INFO[2019-09-03T18:10:47+02:00] Server configuration reloaded on :81
INFO[2019-09-03T18:10:47+02:00] Server configuration reloaded on :8080
DEBU[2019-09-03T18:10:47+02:00] Initial health check for backend: "backend1"

Finally, the access log seems to be missing a status column (browser get's 503 but this is not logged):

::1 - - [03/Sep/2019:16:12:14 +0000] "GET / HTTP/1.1" - - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36" 1 - - 0ms

Self solved. The missing line is:

    [backends.backend1.servers.server1]
      url = "http://127.0.0.1:9000"

rules.toml

[frontends]
  [frontends.frontend1]
  entrypoints = ["http"]
  backend = "backend1"

[backends]
  [backends.backend1]
    [backends.backend1.servers.server1]
      url = "http://127.0.0.1:9000"
    [backends.backend1.healthcheck]
      path = "/app/health"
      interval = "30s"
    [backends.backend1.LoadBalancer]
      method = "drr"