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

No default value for mesos.RefreshSeconds #1248

Closed
lcottereau opened this issue Mar 7, 2017 · 1 comment
Closed

No default value for mesos.RefreshSeconds #1248

lcottereau opened this issue Mar 7, 2017 · 1 comment

Comments

@lcottereau
Copy link

lcottereau commented Mar 7, 2017

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

  • Version: v1.2.0-rc2
  • Codename: morbier
  • Go version: go1.7.5
  • Built: 2017-03-01_01:13:09PM
  • OS/Arch: linux/amd64

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

Linux RHEL 7.2

my configuration file

    debug = true
    accessLogsFile = "log/access.log"
    logLevel = "INFO"
    defaultEntryPoints = ["http"]
    [entryPoints]
       [entryPoints.http]
       address = "infra-q-i-mes01:8008"
    [web]
    address = ":8009"
    [web.statistics]
       RecentErrors = 10
    [mesos]
    endpoint = "infra-q-i-mes01:5050"
    watch = true
    domain = "infra-q-i-mes01"

What did you do?

launch the traefik binary

What did you expect to see?

correct parsing of the configuration file

What did you see instead?

    [root@infra-q-i-mes01 traefik]# ./traefik_linux-amd64 -c conf.toml 
    INFO[2017-03-07T16:26:53+01:00] Traefik version v1.2.0-rc2 built on 2017-03-01_01:13:09PM 
    INFO[2017-03-07T16:26:53+01:00] Using TOML configuration file /root/traefik/conf.toml 
    DEBU[2017-03-07T16:26:53+01:00] Global configuration loaded {"GraceTimeOut":10,"Debug":true,"CheckNewVersion":true,"AccessLogsFile":"log/access.log","TraefikLogsFile":"","LogLevel":"DEBUG","EntryPoints":{"http":{"Network":"","Address":"infra-q-i-mes01:8008","TLS":null,"Redirect":null,"Auth":null,"Compress":false}},"Cluster":null,"Constraints":[],"ACME":null,"DefaultEntryPoints":["http"],"ProvidersThrottleDuration":2000000000,"MaxIdleConnsPerHost":200,"InsecureSkipVerify":false,"Retry":null,"Docker":null,"File":null,"Web":{"Address":":8009","CertFile":"","KeyFile":"","ReadOnly":false,"Statistics":{"RecentErrors":10},"Metrics":null,"Auth":null},"Marathon":null,"Consul":null,"ConsulCatalog":null,"Etcd":null,"Zookeeper":null,"Boltdb":null,"Kubernetes":null,"Mesos":{"Watch":true,"Filename":"","Constraints":[],"Endpoint":"infra-q-i-mes01:5050","Domain":"infra-q-i-mes01","ExposedByDefault":true,"GroupsAsSubDomains":false,"ZkDetectionTimeout":0,"RefreshSeconds":0,"IPSources":"","StateTimeoutSecond":0,"Masters":null},"Eureka":null,"ECS":null,"Rancher":null} 
    INFO[2017-03-07T16:26:53+01:00] Preparing server http &{Network: Address:infra-q-i-mes01:8008 TLS:<nil> Redirect:<nil> Auth:<nil> Compress:false} 
    INFO[2017-03-07T16:26:53+01:00] Starting provider *main.WebProvider {"Address":":8009","CertFile":"","KeyFile":"","ReadOnly":false,"Statistics":{"RecentErrors":10},"Metrics":null,"Auth":null} 
    INFO[2017-03-07T16:26:53+01:00] Starting provider *provider.Mesos {"Watch":true,"Filename":"","Constraints":[],"Endpoint":"infra-q-i-mes01:5050","Domain":"infra-q-i-mes01","ExposedByDefault":true,"GroupsAsSubDomains":false,"ZkDetectionTimeout":0,"RefreshSeconds":0,"IPSources":"","StateTimeoutSecond":0,"Masters":null} 
    INFO[2017-03-07T16:26:53+01:00] 0s                                           
    INFO[2017-03-07T16:26:53+01:00] Starting server on infra-q-i-mes01:8008      
    DEBU[2017-03-07T16:26:53+01:00]                                              
    ERRO[2017-03-07T16:26:53+01:00] Error in Go routine: non-positive interval for NewTicker 
    goroutine 16 [running]:
    runtime/debug.Stack(0x4e834f, 0xc420014280, 0x1d9b2aa)
    	/usr/local/go/src/runtime/debug/stack.go:24 +0x79
    runtime/debug.PrintStack()
    	/usr/local/go/src/runtime/debug/stack.go:16 +0x22
    github.com/containous/traefik/safe.defaultRecoverGoroutine(0x1a89f00, 0xc420265370)
    	/go/src/github.com/containous/traefik/safe/routine.go:147 +0x7d
    github.com/containous/traefik/safe.OperationWithRecover.func1.1(0xc4207dfe58)
    	/go/src/github.com/containous/traefik/safe/routine.go:155 +0x56
    panic(0x1a89f00, 0xc420265370)
    	/usr/local/go/src/runtime/panic.go:458 +0x243
    time.NewTicker(0x0, 0x0)
    	/usr/local/go/src/time/tick.go:23 +0x18d
    github.com/containous/traefik/provider.(*Mesos).Provide.func1(0x0, 0x0)
    	/go/src/github.com/containous/traefik/provider/mesos.go:65 +0x1e6
    github.com/containous/traefik/safe.OperationWithRecover.func1(0x0, 0x0)
    	/go/src/github.com/containous/traefik/safe/routine.go:159 +0x75
    github.com/containous/traefik/vendor/github.com/cenk/backoff.RetryNotify(0xc4202652c0, 0x2a74a80, 0xc4202652d0, 0x1e982e0, 0x0, 0x0)
    	/go/src/github.com/containous/traefik/vendor/github.com/cenk/backoff/retry.go:32 +0x3f
    github.com/containous/traefik/provider.(*Mesos).Provide(0xc420207400, 0xc4203c7200, 0xc42044b800, 0x2b8ddd8, 0x0, 0x0, 0xc4207ab790, 0x65e50f)
    	/go/src/github.com/containous/traefik/provider/mesos.go:116 +0x10f
    main.(*Server).startProviders.func1()
    	/go/src/github.com/containous/traefik/server.go:392 +0x70
    github.com/containous/traefik/safe.GoWithRecover.func1(0x1e98348, 0xc4207b8a00)
    	/go/src/github.com/containous/traefik/safe/routine.go:141 +0x4d
    created by github.com/containous/traefik/safe.GoWithRecover
    	/go/src/github.com/containous/traefik/safe/routine.go:142 +0x49
    ERRO[2017-03-07T16:26:53+01:00] mesos connection error Panic in operation: %!s(<nil>), retrying in 593.243621ms 

Looking at the code at /go/src/github.com/containous/traefik/provider/mesos.go:65 I had the idea of setting an explicit value for mesos.RefreshSeconds in config file. And it worked. So it seems this only needs a default value to be provided.

Unfortunately I don't know go (and the correction wasn't obvious) so I am not able to provide with a pull request.

@emilevauge emilevauge added bug priority/P1 need to be fixed in next release labels Mar 9, 2017
@emilevauge emilevauge added this to the 1.2 milestone Mar 9, 2017
@timoreimann
Copy link
Contributor

Fixed by #1291.

@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.
Projects
None yet
Development

No branches or pull requests

5 participants