Skip to content

panic when start traefik with bolt backend #1795

@tochti

Description

@tochti

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

bug

What did you do?

I attempted to use the boltdb backend to configure traefik.
I added the following keys to the "traefik" bucket.

/traefik/backends/srv2/servers/server_1/url http://127.0.0.1:32001
/traefik/frontends/srv2/backend srv2
/traefik/frontends/srv2/routes/test_1/rule Host: srv2.test.loop

What did you expect to see?

I expect that traefik starts or returns a error what is wrong in the configuration.

What did you see instead?

panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/containous/traefik/vendor/github.com/docker/libkv/store/boltdb.(*BoltDB).List.func1(0xc42025e000, 0x2c2b410, 0xc42025e000)
	/go/src/github.com/containous/traefik/vendor/github.com/docker/libkv/store/boltdb/boltdb.go:290 +0x4e8
github.com/containous/traefik/vendor/github.com/boltdb/bolt.(*DB).View(0xc4201ce5a0, 0xc4206eb900, 0x0, 0x0)
	/go/src/github.com/containous/traefik/vendor/github.com/boltdb/bolt/db.go:629 +0x9f
github.com/containous/traefik/vendor/github.com/docker/libkv/store/boltdb.(*BoltDB).List(0xc4204c03c0, 0x2b98af6, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0)
	/go/src/github.com/containous/traefik/vendor/github.com/docker/libkv/store/boltdb/boltdb.go:302 +0x1b6
github.com/containous/traefik/vendor/github.com/containous/staert.(*KvSource).ListRecursive(0xc4201c7e00, 0x2b98af6, 0x8, 0xc4202b9200, 0xc4202b9200, 0x0)
	/go/src/github.com/containous/traefik/vendor/github.com/containous/staert/kv.go:290 +0x57
github.com/containous/traefik/vendor/github.com/containous/staert.(*KvSource).LoadConfig(0xc4201c7e00, 0x26e52c0, 0xc42044f540, 0x0, 0x0)
	/go/src/github.com/containous/traefik/vendor/github.com/containous/staert/kv.go:45 +0x7b
github.com/containous/traefik/vendor/github.com/containous/staert.(*KvSource).Parse(0xc4201c7e00, 0xc42003cfa0, 0xc42003cfa0, 0x0, 0x0)
	/go/src/github.com/containous/traefik/vendor/github.com/containous/staert/kv.go:35 +0x46
github.com/containous/traefik/vendor/github.com/containous/staert.(*Staert).parseConfigAllSources(0xc4206ebf38, 0xc42003cfa0, 0x0, 0x0)
	/go/src/github.com/containous/traefik/vendor/github.com/containous/staert/staert.go:41 +0x5f
github.com/containous/traefik/vendor/github.com/containous/staert.(*Staert).LoadConfig(0xc4206ebf38, 0xc42033cf00, 0x2, 0x2, 0x3)
	/go/src/github.com/containous/traefik/vendor/github.com/containous/staert/staert.go:76 +0xbf
main.main()
	/go/src/github.com/containous/traefik/cmd/traefik/traefik.go:158 +0x16c4

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

Version:      v1.3.1
Codename:     raclette
Go version:   go1.8.3
Built:        2017-06-16_11:00:34AM
OS/Arch:      darwin/amd64

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

{
 "GraceTimeOut": 10000000000,
 "Debug": true,
 "CheckNewVersion": true,
 "AccessLogsFile": "",
 "TraefikLogsFile": "",
 "LogLevel": "ERROR",
 "EntryPoints": {
  "http": {
   "Network": "",
   "Address": ":8080",
   "TLS": null,
   "Redirect": null,
   "Auth": null,
   "Compress": false
  }
 },
 "Cluster": null,
 "Constraints": [],
 "ACME": null,
 "DefaultEntryPoints": [
  "http"
 ],
 "ProvidersThrottleDuration": 2000000000,
 "MaxIdleConnsPerHost": 200,
 "IdleTimeout": 180000000000,
 "InsecureSkipVerify": false,
 "Retry": null,
 "HealthCheck": {
  "Interval": 30000000000
 },
 "Docker": null,
 "File": null,
 "Web": {
  "Address": ":8082",
  "CertFile": "",
  "KeyFile": "",
  "ReadOnly": false,
  "Statistics": null,
  "Metrics": null,
  "Path": "",
  "Auth": null
 },
 "Marathon": null,
 "Consul": null,
 "ConsulCatalog": null,
 "Etcd": null,
 "Zookeeper": null,
 "Boltdb": {
  "Watch": true,
  "Filename": "",
  "Constraints": [],
  "Endpoint": "/Users/tochti/aaron/Code/subport/src/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "Prefix": "/traefik",
  "TLS": null,
  "Username": "",
  "Password": ""
 },
 "Kubernetes": null,
 "Mesos": null,
 "Eureka": null,
 "ECS": null,
 "Rancher": null,
 "DynamoDB": null,
 "ConfigFile": "/Users/tochti/Tmp/traefik_test/config.toml"
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions