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

[rancher] invalid memory address or nil pointer dereference #1134

Closed
rafaelgaspar opened this issue Feb 7, 2017 · 2 comments
Closed

[rancher] invalid memory address or nil pointer dereference #1134

rafaelgaspar opened this issue Feb 7, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@rafaelgaspar
Copy link

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

v1.2.0-rc1

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

--etcd --etcd.endpoint=etcd:2379 --rancher --logLevel=DEBUG

On etcd I have this keys:
/traefik/web/address = ":8080"
/traefik/entryPoints/entryPoints.http/address = ":80"
/traefik/leader = "b6cb798d-e055-4b8d-8e6e-59f9374063e2"

What did you do?

I run the container with options above.

What did you expect to see?

I expected to see Rancher as one of the providers.

What did you see instead?

No Rancher provider and an invalid memory address or nil pointer dereference error on the log bellow.

2/7/2017 1:32:29 PMINFO[2017-02-07T15:32:29Z] Traefik version v1.2.0-rc1 built on 2017-02-06_08:45:49PM
2/7/2017 1:32:29 PMDEBU[2017-02-07T15:32:29Z] Global configuration loaded {"GraceTimeOut":10,"Debug":false,"CheckNewVersion":true,"AccessLogsFile":"","TraefikLogsFile":"","LogLevel":"DEBUG","EntryPoints":{"entryPoints.http":{"Network":"","Address":":80","TLS":null,"Redirect":null,"Auth":null,"Compress":false}},"Cluster":{"Node":"bc0d16de-e5bf-4b48-95f7-83c8a0b1ff3a","Store":{"Store":{},"Prefix":"/traefik"}},"Constraints":[],"ACME":null,"DefaultEntryPoints":[],"ProvidersThrottleDuration":2000000000,"MaxIdleConnsPerHost":200,"InsecureSkipVerify":false,"Retry":null,"Docker":null,"File":null,"Web":{"Address":":8080","CertFile":"","KeyFile":"","ReadOnly":false,"Statistics":null,"Metrics":null,"Auth":null},"Marathon":null,"Consul":null,"ConsulCatalog":null,"Etcd":{"Watch":true,"Filename":"","Constraints":[],"Endpoint":"etcd:2379","Prefix":"/traefik","TLS":null},"Zookeeper":null,"Boltdb":null,"Kubernetes":null,"Mesos":null,"Eureka":null,"ECS":null,"Rancher":{"Watch":true,"Filename":"","Constraints":null,"Endpoint":"","AccessKey":"","SecretKey":"","ExposedByDefault":true,"Domain":""}}
2/7/2017 1:32:29 PMINFO[2017-02-07T15:32:29Z] Preparing server entryPoints.http &{Network: Address::80 TLS:<nil> Redirect:<nil> Auth:<nil> Compress:false}
2/7/2017 1:32:29 PMINFO[2017-02-07T15:32:29Z] Starting provider *main.WebProvider {"Address":":8080","CertFile":"","KeyFile":"","ReadOnly":false,"Statistics":null,"Metrics":null,"Auth":null}
2/7/2017 1:32:29 PMINFO[2017-02-07T15:32:29Z] Starting provider *provider.Etcd {"Watch":true,"Filename":"","Constraints":[],"Endpoint":"etcd:2379","Prefix":"/traefik","TLS":null}
2/7/2017 1:32:29 PMINFO[2017-02-07T15:32:29Z] Starting provider *provider.Rancher {"Watch":true,"Filename":"","Constraints":null,"Endpoint":"","AccessKey":"","SecretKey":"","ExposedByDefault":true,"Domain":""}
2/7/2017 1:32:29 PMDEBU[2017-02-07T15:32:29Z] Node bc0d16de-e5bf-4b48-95f7-83c8a0b1ff3a running for election
2/7/2017 1:32:29 PMINFO[2017-02-07T15:32:29Z] 0s
2/7/2017 1:32:29 PMINFO[2017-02-07T15:32:29Z] Starting server on :80
2/7/2017 1:32:29 PMINFO[2017-02-07T15:32:29Z] Node bc0d16de-e5bf-4b48-95f7-83c8a0b1ff3a elected slave ♝
2/7/2017 1:32:29 PMERRO[2017-02-07T15:32:29Z] Error in Go routine: runtime error: invalid memory address or nil pointer dereference
2/7/2017 1:32:29 PMgoroutine 46 [running]:
2/7/2017 1:32:29 PMruntime/debug.Stack(0x4e808f, 0xc420016280, 0x1d9a271)
2/7/2017 1:32:29 PM	/usr/local/go/src/runtime/debug/stack.go:24 +0x79
2/7/2017 1:32:29 PMruntime/debug.PrintStack()
2/7/2017 1:32:29 PM	/usr/local/go/src/runtime/debug/stack.go:16 +0x22
2/7/2017 1:32:29 PMgithub.com/containous/traefik/safe.defaultRecoverGoroutine(0x1ada8e0, 0xc420010020)
2/7/2017 1:32:29 PM	/go/src/github.com/containous/traefik/safe/routine.go:147 +0x7d
2/7/2017 1:32:29 PMgithub.com/containous/traefik/safe.GoWithRecover.func1.1(0x1e96ec8)
2/7/2017 1:32:29 PM	/go/src/github.com/containous/traefik/safe/routine.go:138 +0x57
2/7/2017 1:32:29 PMpanic(0x1ada8e0, 0xc420010020)
2/7/2017 1:32:29 PM	/usr/local/go/src/runtime/panic.go:458 +0x243
2/7/2017 1:32:29 PMgithub.com/containous/traefik/provider.listRancherEnvironments(0x0, 0x0, 0x2a6f540, 0xc4202ada40)
2/7/2017 1:32:29 PM	/go/src/github.com/containous/traefik/provider/rancher.go:277 +0x5e
2/7/2017 1:32:29 PMgithub.com/containous/traefik/provider.(*Rancher).Provide.func1.1(0xc420777620, 0x42b198)
2/7/2017 1:32:29 PM	/go/src/github.com/containous/traefik/provider/rancher.go:211 +0x9e
2/7/2017 1:32:29 PMgithub.com/containous/traefik/vendor/github.com/cenk/backoff.RetryNotify(0xc420787a80, 0x2a73a80, 0xc4207b64b0, 0x1e96e68, 0xc42001f748, 0x65d94f)
2/7/2017 1:32:29 PM	/go/src/github.com/containous/traefik/vendor/github.com/cenk/backoff/retry.go:32 +0x3f
2/7/2017 1:32:29 PMgithub.com/containous/traefik/provider.(*Rancher).Provide.func1()
2/7/2017 1:32:29 PM	/go/src/github.com/containous/traefik/provider/rancher.go:264 +0x132
2/7/2017 1:32:29 PMgithub.com/containous/traefik/safe.GoWithRecover.func1(0x1e96ec8, 0xc420787a60)
2/7/2017 1:32:29 PM	/go/src/github.com/containous/traefik/safe/routine.go:141 +0x4d
2/7/2017 1:32:29 PMcreated by github.com/containous/traefik/safe.GoWithRecover
2/7/2017 1:32:29 PM	/go/src/github.com/containous/traefik/safe/routine.go:142 +0x49
2/7/2017 1:32:29 PMDEBU[2017-02-07T15:32:29Z] Cannot get key /traefik/alias Key not found in store, setting default /traefik
2/7/2017 1:32:29 PMDEBU[2017-02-07T15:32:29Z] Cannot get keys /traefik/frontends/ Key not found in store
2/7/2017 1:32:29 PMDEBU[2017-02-07T15:32:29Z] Cannot get key /traefik/alias Key not found in store, setting default /traefik
2/7/2017 1:32:29 PMDEBU[2017-02-07T15:32:29Z] Cannot get keys /traefik/backends/ Key not found in store
2/7/2017 1:32:29 PMDEBU[2017-02-07T15:32:29Z] Configuration received from provider etcd: {}
2/7/2017 1:32:29 PMDEBU[2017-02-07T15:32:29Z] Last etcd config received more than 2s, OK
2/7/2017 1:32:29 PMINFO[2017-02-07T15:32:29Z] Server configuration reloaded on :80
2/7/2017 1:32:29 PMDEBU[2017-02-07T15:32:29Z] Cannot get keys /traefik/frontends/ Key not found in store
2/7/2017 1:32:29 PMDEBU[2017-02-07T15:32:29Z] Cannot get keys /traefik/backends/ Key not found in store
2/7/2017 1:32:29 PMDEBU[2017-02-07T15:32:29Z] Configuration received from provider etcd: {}
2/7/2017 1:32:29 PMINFO[2017-02-07T15:32:29Z] Skipping same configuration for provider etcd
@SantoDE
Copy link
Collaborator

SantoDE commented Feb 7, 2017

hey @rafaelgaspar ,

as long as the PR #1127 is not merged yet, you also need to provide --rancher.endpoint=XX, --rancher.accesskey=XXand --rancher.secretkey=XX.

However, having a nil adress is not very good (shame on me). I'll look into this :)

@SantoDE SantoDE self-assigned this Feb 7, 2017
@SantoDE SantoDE added bug priority/P1 need to be fixed in next release labels Feb 7, 2017
@SantoDE SantoDE added this to the 1.2 milestone Feb 7, 2017
@SantoDE
Copy link
Collaborator

SantoDE commented Feb 8, 2017

Hey @rafaelgaspar,

I fixed that issue in the PR #1127 mentioned above. After merge, this issue will be resolved. Thanks! :)

@SantoDE SantoDE closed this as completed Feb 8, 2017
@ldez ldez added the kind/bug/confirmed a confirmed bug (reproducible). label Apr 29, 2017
@ldez ldez removed the priority/P1 need to be fixed in next release label May 30, 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.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants