jittering / traefik-kop

A dynamic docker->redis->traefik discovery agent
MIT License
179 stars 13 forks source link

Go Crash in hostedtoolcache #15

Closed hongkongkiwi closed 1 year ago

hongkongkiwi commented 1 year ago

I'm getting the following crash:

time="2022-09-09T04:17:55Z" level=info msg="creating new redis store at 10.0.0.1:6379 for hostname solarflare"
time="2022-09-09T04:17:55Z" level=info msg="Starting provider aggregator *traefikkop.MultiProvider"
time="2022-09-09T04:17:55Z" level=info msg="starting polling provider with 15s interval"
time="2022-09-09T04:17:55Z" level=info msg="Starting provider *docker.Provider"
time="2022-09-09T04:17:55Z" level=error msg="Undefined rule" providerName=docker routerName=jellyfin
time="2022-09-09T04:17:55Z" level=info msg="refreshing traefik-kop configuration"
time="2022-09-09T04:17:55Z" level=warning msg="found more than one host-port binding for container '/jellyfin'"
time="2022-09-09T04:18:10Z" level=error msg="Error in Go routine: runtime error: invalid memory address or nil pointer dereference"
time="2022-09-09T04:18:10Z" level=error msg="Stack: goroutine 51 [running]:\nruntime/debug.Stack()\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/debug/stack.go:24 +0x65\ngithub.com/traefik/traefik/v2/pkg/safe.defaultRecoverGoroutine({0x22e8360, 0x3f34520})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:66 +0xa5\ngithub.com/traefik/traefik/v2/pkg/safe.OperationWithRecover.func1.1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:74 +0x35\npanic({0x22e8360, 0x3f34520})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/panic.go:1038 +0x215\ntext/template.errRecover(0xc0005672c0)\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:163 +0x15b\npanic({0x22e8360, 0x3f34520})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/panic.go:1038 +0x215\ntext/template.(*Template).execute(0x0, {0x2b022e0, 0xc000c4acc0}, {0x239f960, 0xc000c47500})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:214 +0x239\ntext/template.(*Template).Execute(...)\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:200\ngithub.com/traefik/traefik/v2/pkg/provider.BuildRouterConfiguration({0x2b4c9e8, 0xc000c35f80}, 0xc000c4aab0, {0xc000c36978, 0xc000c3db80}, 0x9, {0x239f960, 0xc000c47500})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/configuration.go:404 +0x2d1\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).buildConfiguration(0xc00034e000, {0x2b4c9e8, 0xc000c35f80}, {0xc000c507e0, 0x2, 0xc000c3d860})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/config.go:83 +0x7a5\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).Provide.func1.1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/docker.go:230 +0x69a\ngithub.com/traefik/traefik/v2/pkg/safe.OperationWithRecover.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:78 +0x63\ngithub.com/cenkalti/backoff/v4.RetryNotifyWithTimer(0xc000412890, {0x7fad5b3e2258, 0xc000092200}, 0xc000567f20, {0x0, 0x0})\n\t/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:55 +0x12a\ngithub.com/cenkalti/backoff/v4.RetryNotify(...)\n\t/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:34\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).Provide.func1({0x2b4c940, 0xc0000585c0})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/docker.go:330 +0x305\ngithub.com/traefik/traefik/v2/pkg/safe.(*Pool).GoCtx.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:36 +0x66\ngithub.com/traefik/traefik/v2/pkg/safe.GoWithRecover.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:59 +0x5b\ncreated by github.com/traefik/traefik/v2/pkg/safe.GoWithRecover\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:53 +0x77\n"
time="2022-09-09T04:18:10Z" level=error msg="Provider connection error panic in operation: %!w(<nil>), retrying in 688.725732ms" providerName=docker
time="2022-09-09T04:18:11Z" level=error msg="Error in Go routine: runtime error: invalid memory address or nil pointer dereference"
time="2022-09-09T04:18:11Z" level=error msg="Stack: goroutine 51 [running]:\nruntime/debug.Stack()\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/debug/stack.go:24 +0x65\ngithub.com/traefik/traefik/v2/pkg/safe.defaultRecoverGoroutine({0x22e8360, 0x3f34520})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:66 +0xa5\ngithub.com/traefik/traefik/v2/pkg/safe.OperationWithRecover.func1.1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:74 +0x35\npanic({0x22e8360, 0x3f34520})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/panic.go:1038 +0x215\ntext/template.errRecover(0xc0005672c0)\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:163 +0x15b\npanic({0x22e8360, 0x3f34520})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/panic.go:1038 +0x215\ntext/template.(*Template).execute(0x0, {0x2b022e0, 0xc000c4b890}, {0x239f960, 0xc000c76498})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:214 +0x239\ntext/template.(*Template).Execute(...)\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:200\ngithub.com/traefik/traefik/v2/pkg/provider.BuildRouterConfiguration({0x2b4c9e8, 0xc000c35f80}, 0xc000c4b680, {0xc000c36e58, 0xc000c5c6b5}, 0x9, {0x239f960, 0xc000c76498})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/configuration.go:404 +0x2d1\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).buildConfiguration(0xc00034e000, {0x2b4c9e8, 0xc000c35f80}, {0xc000c7a000, 0x2, 0xc00081bd40})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/config.go:83 +0x7a5\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).Provide.func1.1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/docker.go:230 +0x69a\ngithub.com/traefik/traefik/v2/pkg/safe.OperationWithRecover.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:78 +0x63\ngithub.com/cenkalti/backoff/v4.RetryNotifyWithTimer(0xc000412890, {0x7fad5b3e2258, 0xc000092200}, 0xc000567f20, {0x0, 0x0})\n\t/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:55 +0x12a\ngithub.com/cenkalti/backoff/v4.RetryNotify(...)\n\t/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:34\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).Provide.func1({0x2b4c940, 0xc0000585c0})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/docker.go:330 +0x305\ngithub.com/traefik/traefik/v2/pkg/safe.(*Pool).GoCtx.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:36 +0x66\ngithub.com/traefik/traefik/v2/pkg/safe.GoWithRecover.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:59 +0x5b\ncreated by github.com/traefik/traefik/v2/pkg/safe.GoWithRecover\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:53 +0x77\n"
time="2022-09-09T04:18:11Z" level=error msg="Provider connection error panic in operation: %!w(<nil>), retrying in 428.49889ms" providerName=docker
time="2022-09-09T04:18:11Z" level=error msg="Error in Go routine: runtime error: invalid memory address or nil pointer dereference"
time="2022-09-09T04:18:11Z" level=error msg="Stack: goroutine 51 [running]:\nruntime/debug.Stack()\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/debug/stack.go:24 +0x65\ngithub.com/traefik/traefik/v2/pkg/safe.defaultRecoverGoroutine({0x22e8360, 0x3f34520})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:66 +0xa5\ngithub.com/traefik/traefik/v2/pkg/safe.OperationWithRecover.func1.1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:74 +0x35\npanic({0x22e8360, 0x3f34520})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/panic.go:1038 +0x215\ntext/template.errRecover(0xc0005672c0)\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:163 +0x15b\npanic({0x22e8360, 0x3f34520})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/panic.go:1038 +0x215\ntext/template.(*Template).execute(0x0, {0x2b022e0, 0xc000c8c6f0}, {0x239f960, 0xc000c77380})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:214 +0x239\ntext/template.(*Template).Execute(...)\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:200\ngithub.com/traefik/traefik/v2/pkg/provider.BuildRouterConfiguration({0x2b4c9e8, 0xc000c35f80}, 0xc000c8c4e0, {0xc000c37428, 0xc000c5d1f0}, 0x9, {0x239f960, 0xc000c77380})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/configuration.go:404 +0x2d1\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).buildConfiguration(0xc00034e000, {0x2b4c9e8, 0xc000c35f80}, {0xc000c7bc20, 0x2, 0xc000c5ced0})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/config.go:83 +0x7a5\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).Provide.func1.1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/docker.go:230 +0x69a\ngithub.com/traefik/traefik/v2/pkg/safe.OperationWithRecover.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:78 +0x63\ngithub.com/cenkalti/backoff/v4.RetryNotifyWithTimer(0xc000412890, {0x7fad5b3e2258, 0xc000092200}, 0xc000567f20, {0x0, 0x0})\n\t/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:55 +0x12a\ngithub.com/cenkalti/backoff/v4.RetryNotify(...)\n\t/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:34\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).Provide.func1({0x2b4c940, 0xc0000585c0})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/docker.go:330 +0x305\ngithub.com/traefik/traefik/v2/pkg/safe.(*Pool).GoCtx.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:36 +0x66\ngithub.com/traefik/traefik/v2/pkg/safe.GoWithRecover.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:59 +0x5b\ncreated by github.com/traefik/traefik/v2/pkg/safe.GoWithRecover\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:53 +0x77\n"
time="2022-09-09T04:18:11Z" level=error msg="Provider connection error panic in operation: %!w(<nil>), retrying in 1.26916156s" providerName=docker
time="2022-09-09T04:18:12Z" level=error msg="Error in Go routine: runtime error: invalid memory address or nil pointer dereference"
time="2022-09-09T04:18:12Z" level=error msg="Stack: goroutine 51 [running]:\nruntime/debug.Stack()\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/debug/stack.go:24 +0x65\ngithub.com/traefik/traefik/v2/pkg/safe.defaultRecoverGoroutine({0x22e8360, 0x3f34520})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:66 +0xa5\ngithub.com/traefik/traefik/v2/pkg/safe.OperationWithRecover.func1.1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:74 +0x35\npanic({0x22e8360, 0x3f34520})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/panic.go:1038 +0x215\ntext/template.errRecover(0xc0005672c0)\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:163 +0x15b\npanic({0x22e8360, 0x3f34520})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/panic.go:1038 +0x215\ntext/template.(*Template).execute(0x0, {0x2b022e0, 0xc000c8d530}, {0x239f960, 0xc000cb8270})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:214 +0x239\ntext/template.(*Template).Execute(...)\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:200\ngithub.com/traefik/traefik/v2/pkg/provider.BuildRouterConfiguration({0x2b4c9e8, 0xc000c35f80}, 0xc000c8d320, {0xc000c379f8, 0xc000c5dd20}, 0x9, {0x239f960, 0xc000cb8270})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/configuration.go:404 +0x2d1\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).buildConfiguration(0xc00034e000, {0x2b4c9e8, 0xc000c35f80}, {0xc000c957a0, 0x2, 0xc000c5da00})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/config.go:83 +0x7a5\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).Provide.func1.1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/docker.go:230 +0x69a\ngithub.com/traefik/traefik/v2/pkg/safe.OperationWithRecover.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:78 +0x63\ngithub.com/cenkalti/backoff/v4.RetryNotifyWithTimer(0xc000412890, {0x7fad5b3e2258, 0xc000092200}, 0xc000567f20, {0x0, 0x0})\n\t/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:55 +0x12a\ngithub.com/cenkalti/backoff/v4.RetryNotify(...)\n\t/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:34\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).Provide.func1({0x2b4c940, 0xc0000585c0})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/docker.go:330 +0x305\ngithub.com/traefik/traefik/v2/pkg/safe.(*Pool).GoCtx.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:36 +0x66\ngithub.com/traefik/traefik/v2/pkg/safe.GoWithRecover.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:59 +0x5b\ncreated by github.com/traefik/traefik/v2/pkg/safe.GoWithRecover\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:53 +0x77\n"
time="2022-09-09T04:18:12Z" level=error msg="Provider connection error panic in operation: %!w(<nil>), retrying in 1.094560521s" providerName=docker
time="2022-09-09T04:18:14Z" level=error msg="Error in Go routine: runtime error: invalid memory address or nil pointer dereference"
time="2022-09-09T04:18:14Z" level=error msg="Stack: goroutine 51 [running]:\nruntime/debug.Stack()\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/debug/stack.go:24 +0x65\ngithub.com/traefik/traefik/v2/pkg/safe.defaultRecoverGoroutine({0x22e8360, 0x3f34520})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:66 +0xa5\ngithub.com/traefik/traefik/v2/pkg/safe.OperationWithRecover.func1.1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:74 +0x35\npanic({0x22e8360, 0x3f34520})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/panic.go:1038 +0x215\ntext/template.errRecover(0xc0005672c0)\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:163 +0x15b\npanic({0x22e8360, 0x3f34520})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/panic.go:1038 +0x215\ntext/template.(*Template).execute(0x0, {0x2b022e0, 0xc000cc8390}, {0x239f960, 0xc000cb9158})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:214 +0x239\ntext/template.(*Template).Execute(...)\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:200\ngithub.com/traefik/traefik/v2/pkg/provider.BuildRouterConfiguration({0x2b4c9e8, 0xc000c35f80}, 0xc000cc8180, {0xc000c37fc8, 0xc000cb6870}, 0x9, {0x239f960, 0xc000cb9158})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/configuration.go:404 +0x2d1\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).buildConfiguration(0xc00034e000, {0x2b4c9e8, 0xc000c35f80}, {0xc000cbb440, 0x2, 0xc000cb6550})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/config.go:83 +0x7a5\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).Provide.func1.1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/docker.go:230 +0x69a\ngithub.com/traefik/traefik/v2/pkg/safe.OperationWithRecover.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:78 +0x63\ngithub.com/cenkalti/backoff/v4.RetryNotifyWithTimer(0xc000412890, {0x7fad5b3e2258, 0xc000092200}, 0xc000567f20, {0x0, 0x0})\n\t/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:55 +0x12a\ngithub.com/cenkalti/backoff/v4.RetryNotify(...)\n\t/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:34\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).Provide.func1({0x2b4c940, 0xc0000585c0})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/docker.go:330 +0x305\ngithub.com/traefik/traefik/v2/pkg/safe.(*Pool).GoCtx.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:36 +0x66\ngithub.com/traefik/traefik/v2/pkg/safe.GoWithRecover.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:59 +0x5b\ncreated by github.com/traefik/traefik/v2/pkg/safe.GoWithRecover\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:53 +0x77\n"
time="2022-09-09T04:18:14Z" level=error msg="Provider connection error panic in operation: %!w(<nil>), retrying in 2.887338751s" providerName=docker
time="2022-09-09T04:18:16Z" level=error msg="Error in Go routine: runtime error: invalid memory address or nil pointer dereference"
time="2022-09-09T04:18:16Z" level=error msg="Stack: goroutine 51 [running]:\nruntime/debug.Stack()\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/debug/stack.go:24 +0x65\ngithub.com/traefik/traefik/v2/pkg/safe.defaultRecoverGoroutine({0x22e8360, 0x3f34520})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:66 +0xa5\ngithub.com/traefik/traefik/v2/pkg/safe.OperationWithRecover.func1.1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:74 +0x35\npanic({0x22e8360, 0x3f34520})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/panic.go:1038 +0x215\ntext/template.errRecover(0xc0005672c0)\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:163 +0x15b\npanic({0x22e8360, 0x3f34520})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/runtime/panic.go:1038 +0x215\ntext/template.(*Template).execute(0x0, {0x2b022e0, 0xc000d0a630}, {0x239f960, 0xc0008d9b48})\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:214 +0x239\ntext/template.(*Template).Execute(...)\n\t/opt/hostedtoolcache/go/1.17.11/x64/src/text/template/exec.go:200\ngithub.com/traefik/traefik/v2/pkg/provider.BuildRouterConfiguration({0x2b4c9e8, 0xc000c35f80}, 0xc000d0a420, {0xc000133b90, 0xc0008f4935}, 0x9, {0x239f960, 0xc0008d9b48})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/configuration.go:404 +0x2d1\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).buildConfiguration(0xc00034e000, {0x2b4c9e8, 0xc000c35f80}, {0xc000d14240, 0x2, 0xc000918d10})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/config.go:83 +0x7a5\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).Provide.func1.1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/docker.go:230 +0x69a\ngithub.com/traefik/traefik/v2/pkg/safe.OperationWithRecover.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:78 +0x63\ngithub.com/cenkalti/backoff/v4.RetryNotifyWithTimer(0xc000412890, {0x7fad5b3e2258, 0xc000092200}, 0xc000567f20, {0x0, 0x0})\n\t/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:55 +0x12a\ngithub.com/cenkalti/backoff/v4.RetryNotify(...)\n\t/home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.1.1/retry.go:34\ngithub.com/traefik/traefik/v2/pkg/provider/docker.(*Provider).Provide.func1({0x2b4c940, 0xc0000585c0})\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/provider/docker/docker.go:330 +0x305\ngithub.com/traefik/traefik/v2/pkg/safe.(*Pool).GoCtx.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:36 +0x66\ngithub.com/traefik/traefik/v2/pkg/safe.GoWithRecover.func1()\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:59 +0x5b\ncreated by github.com/traefik/traefik/v2/pkg/safe.GoWithRecover\n\t/home/runner/go/pkg/mod/github.com/traefik/traefik/v2@v2.7.1/pkg/safe/routine.go:53 +0x77\n"
time="2022-09-09T04:18:16Z" level=error msg="Provider connection error panic in operation: %!w(<nil>), retrying in 2.881082061s" providerName=docker
hongkongkiwi commented 1 year ago

This seems to be an issue when using a remote redis server, if using local server so far I havn't seen this crash.

dorianim commented 1 year ago

I'm using a remote redis server without any problems

chetan commented 1 year ago

@hongkongkiwi I am using it successfully with a remote redis server as well, so I don't think that directly is the issue here.

According to the logs you provided, the crash is within traefik's docker config parsing. It seems to be panicking when looking for the container port binding. Can you provide your full compose file? Is anything else changing in the service config when you switch to using the remote redis server for traefik-kop?

chetan commented 1 year ago

@hongkongkiwi give the latest version a try and see if the upgraded traefik lib fixes your issue. If not, please provide more details on your config.

chetan commented 1 year ago

This actually looks similar to #20 and should now be fixed in v0.13. Let me know if you still see an issue.