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

error log when debugging on k3s cluster #156

Open
DiveInto opened this issue Sep 18, 2020 · 3 comments
Open

error log when debugging on k3s cluster #156

DiveInto opened this issue Sep 18, 2020 · 3 comments
Assignees
Labels
k3s issues when using k3s

Comments

@DiveInto
Copy link
Contributor

DiveInto commented Sep 18, 2020

version: v0.1.0-alpha.5

panic: runtime error: invalid memory address or nil pointer dereference
 [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x197e49a]
 goroutine 40070 [running]:
 github.com/kalmhq/kalm/api/resources.(*Builder).List(...)
     /workspace/api/resources/common.go:266
 github.com/kalmhq/kalm/api/resources.(*Builder).GetProtectedEndpointsChannel.func1(0x0, 0x0, 0x0, 0x0, 0xc001b2cb90)
     /workspace/api/resources/sso.go:59 +0x4a
 created by github.com/kalmhq/kalm/api/resources.(*Builder).GetProtectedEndpointsChannel
     /workspace/api/resources/sso.go:57 +0xe0
 stream closed

echo: http: panic serving 127.0.0.1:35600: runtime error: invalid memory address or nil pointer dereference
goroutine 40582 [running]:
net/http.(*conn).serve.func1(0xc0002f30e0)
	/usr/local/go/src/net/http/server.go:1795 +0x139
panic(0x1d03fe0, 0x31dfe40)
	/usr/local/go/src/runtime/panic.go:679 +0x1b2
github.com/kalmhq/kalm/api/resources.(*Builder).List(...)
	/workspace/api/resources/common.go:266
github.com/kalmhq/kalm/api/resources.(*Builder).ListNodes(0x0, 0x22dbce0, 0xc0005d05a0, 0x0)
	/workspace/api/resources/node.go:164 +0x4a
github.com/kalmhq/kalm/api/handler.(*ApiHandler).handleListNodes(0xc00026e5a0, 0x22dbce0, 0xc0005d05a0, 0xc0005d0620, 0xc0005d0620)
	/workspace/api/handler/nodes.go:8 +0x51
github.com/kalmhq/kalm/api/handler.(*ApiHandler).AuthClientMiddleware.func1(0x22dbce0, 0xc0005d05a0, 0xc0000ba040, 0xc0000ba040)
	/workspace/api/handler/middleware.go:31 +0x13e
github.com/labstack/echo/v4.(*Echo).add.func1(0x22dbce0, 0xc0005d05a0, 0x223a440, 0xc0000ba040)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.1.16/echo.go:512 +0x8a
github.com/labstack/echo/v4/middleware.StaticWithConfig.func1.1(0x22dbce0, 0xc0005d05a0, 0x1fa77c8, 0x20)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.1.16/middleware/static.go:169 +0x2b9
github.com/labstack/echo/v4/middleware.CORSWithConfig.func1.1(0x22dbce0, 0xc0005d05a0, 0xf, 0xc000b43980)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.1.16/middleware/cors.go:121 +0x477
github.com/kalmhq/kalm/api/server.middlewareLogging.func1(0x22dbce0, 0xc0005d05a0, 0xffffffffffffffff, 0xc0011451e0)
	/workspace/api/server/server.go:72 +0x233
github.com/labstack/echo/v4/middleware.GzipWithConfig.func1.1(0x22dbce0, 0xc0005d05a0, 0x0, 0x0)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.1.16/middleware/compress.go:92 +0x1eb
github.com/labstack/echo/v4.(*Echo).ServeHTTP.func1(0x22dbce0, 0xc0005d05a0, 0x1, 0x0)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.1.16/echo.go:617 +0x110
github.com/labstack/echo/v4/middleware.RemoveTrailingSlashWithConfig.func1.1(0x22dbce0, 0xc0005d05a0, 0x1, 0x1)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.1.16/middleware/slash.go:118 +0x19f
github.com/labstack/echo/v4.(*Echo).ServeHTTP(0xc00000c1e0, 0x2282640, 0xc00099f340, 0xc000035200)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.1.16/echo.go:623 +0x16c
golang.org/x/net/http2/h2c.h2cHandler.ServeHTTP(0x223b320, 0xc00000c1e0, 0xc0000978c0, 0x2282640, 0xc00099f340, 0xc000035200)
	/go/pkg/mod/golang.org/x/net@v0.0.0-20200707034311-ab3426394381/http2/h2c/h2c.go:98 +0x44b
net/http.serverHandler.ServeHTTP(0xc00012a0e0, 0x2282640, 0xc00099f340, 0xc000035200)
	/usr/local/go/src/net/http/server.go:2831 +0xa4
net/http.(*conn).serve(0xc0002f30e0, 0x2288b80, 0xc0002e7940)
	/usr/local/go/src/net/http/server.go:1919 +0x875
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2957 +0x384
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x197d2da]

goroutine 44500 [running]:
github.com/kalmhq/kalm/api/resources.(*Builder).List(...)
	/workspace/api/resources/common.go:266
github.com/kalmhq/kalm/api/resources.(*Builder).getRoleBindingListChannel.func1(0x0, 0x0, 0x0, 0xc000dca270)
	/workspace/api/resources/rolebinding.go:25 +0xba
created by github.com/kalmhq/kalm/api/resources.(*Builder).getRoleBindingListChannel
	/workspace/api/resources/rolebinding.go:23 +0xd6
@nikhiljha
Copy link

2020-11-06T06:03:50.769Z        ERROR   build res message error {"error": "Post https://10.43.0.1:443/apis/authorization.k8s.io/v1/selfsubjectaccessreviews: read tcp 10.42.0.26:42242->10.43.0.1:443: read: connection reset by peer"}
github.com/go-logr/zapr.(*zapLogger).Error
        /go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128
github.com/kalmhq/kalm/api/log.Error
        /workspace/api/log/logger.go:42
github.com/kalmhq/kalm/api/ws.registerWatchHandler.func1
        /workspace/api/ws/watcher.go:56
k8s.io/client-go/tools/cache.ResourceEventHandlerFuncs.OnAdd
        /go/pkg/mod/k8s.io/client-go@v0.18.4/tools/cache/controller.go:218
k8s.io/client-go/tools/cache.(*processorListener).run.func1
        /go/pkg/mod/k8s.io/client-go@v0.18.4/tools/cache/shared_informer.go:744
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:155
k8s.io/apimachinery/pkg/util/wait.BackoffUntil
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:156
k8s.io/apimachinery/pkg/util/wait.JitterUntil
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:133
k8s.io/apimachinery/pkg/util/wait.Until
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:90
k8s.io/client-go/tools/cache.(*processorListener).run
        /go/pkg/mod/k8s.io/client-go@v0.18.4/tools/cache/shared_informer.go:738
k8s.io/apimachinery/pkg/util/wait.(*Group).Start.func1
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:73
W1106 06:03:50.769566       1 reflector.go:404] pkg/mod/k8s.io/client-go@v0.18.4/tools/cache/reflector.go:125: watch of *v1alpha1.SingleSignOnConfig ended with: very short watch: pkg/mod/k8s.io/client-go@v0.18.4/tools/cache/reflector.go:125: Unexpected watch close - watch lasted less than a second and no items received
2020-11-06T06:03:51.391Z        ERROR   channels to resources error     {"error": "Get https://10.43.0.1:443/api/v1/namespaces/kalm-system/pods?labelSelector=kalm-component%3Dkalm: dial tcp 10.43.0.1:443: connect: connection refused"}
github.com/go-logr/zapr.(*zapLogger).Error
        /go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128
github.com/kalmhq/kalm/api/resources.(*Builder).BuildComponentDetails
        /workspace/api/resources/component.go:121
github.com/kalmhq/kalm/api/ws.componentToResMessage
        /workspace/api/ws/watcher.go:111
github.com/kalmhq/kalm/api/ws.buildComponentResMessage
        /workspace/api/ws/watcher.go:130
github.com/kalmhq/kalm/api/ws.registerWatchHandler.func1
        /workspace/api/ws/watcher.go:54
k8s.io/client-go/tools/cache.ResourceEventHandlerFuncs.OnAdd
        /go/pkg/mod/k8s.io/client-go@v0.18.4/tools/cache/controller.go:218
k8s.io/client-go/tools/cache.(*processorListener).run.func1
        /go/pkg/mod/k8s.io/client-go@v0.18.4/tools/cache/shared_informer.go:744
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:155
k8s.io/apimachinery/pkg/util/wait.BackoffUntil
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:156
k8s.io/apimachinery/pkg/util/wait.JitterUntil
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:133
k8s.io/apimachinery/pkg/util/wait.Until
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:90
k8s.io/client-go/tools/cache.(*processorListener).run
        /go/pkg/mod/k8s.io/client-go@v0.18.4/tools/cache/shared_informer.go:738
k8s.io/apimachinery/pkg/util/wait.(*Group).Start.func1
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:73
2020-11-06T06:03:51.391Z        ERROR   build res message error {"error": "Get https://10.43.0.1:443/api/v1/namespaces/kalm-system/pods?labelSelector=kalm-component%3Dkalm: dial tcp 10.43.0.1:443: connect: connection refused"}
github.com/go-logr/zapr.(*zapLogger).Error
        /go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128
github.com/kalmhq/kalm/api/log.Error
        /workspace/api/log/logger.go:42
github.com/kalmhq/kalm/api/ws.registerWatchHandler.func1
        /workspace/api/ws/watcher.go:56
k8s.io/client-go/tools/cache.ResourceEventHandlerFuncs.OnAdd
        /go/pkg/mod/k8s.io/client-go@v0.18.4/tools/cache/controller.go:218
k8s.io/client-go/tools/cache.(*processorListener).run.func1
        /go/pkg/mod/k8s.io/client-go@v0.18.4/tools/cache/shared_informer.go:744
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:155
k8s.io/apimachinery/pkg/util/wait.BackoffUntil
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:156
k8s.io/apimachinery/pkg/util/wait.JitterUntil
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:133
k8s.io/apimachinery/pkg/util/wait.Until
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:90
k8s.io/client-go/tools/cache.(*processorListener).run
        /go/pkg/mod/k8s.io/client-go@v0.18.4/tools/cache/shared_informer.go:738
k8s.io/apimachinery/pkg/util/wait.(*Group).Start.func1
        /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:73
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x197aa3a]

goroutine 4976 [running]:
github.com/kalmhq/kalm/api/resources.(*Builder).List(...)
        /workspace/api/resources/common.go:266
github.com/kalmhq/kalm/api/resources.(*Builder).GetComponentPluginBindingListChannel.func1(0x0, 0xc000986f60, 0x2, 0x2, 0xc002610b70)
        /workspace/api/resources/component_plugin_binding.go:33 +0x4a
created by github.com/kalmhq/kalm/api/resources.(*Builder).GetComponentPluginBindingListChannel
        /workspace/api/resources/component_plugin_binding.go:31 +0xe0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x197cf66]

goroutine 4973 [running]:
github.com/kalmhq/kalm/api/resources.(*Builder).List(...)
        /workspace/api/resources/common.go:266
github.com/kalmhq/kalm/api/resources.(*Builder).GetPodListChannel.func1(0x0, 0xc000986f00, 0x2, 0x2, 0xc002610a20)
        /workspace/api/resources/pod.go:72 +0x56
created by github.com/kalmhq/kalm/api/resources.(*Builder).GetPodListChannel
        /workspace/api/resources/pod.go:70 +0xe0

Kalm does not seem to like k3s :(

@geraldoandradee
Copy link

I'm having this problem as well. I'm using K3s v1.18.12+k3s1 and Kalm v0.1.0-alpha.5. This causes kalm pod restart and make the interface unusable.

Here the logs:

2021-01-13T23:40:52.379Z	ERROR	request error	{"error": "Get https://10.43.0.1:443/apis/core.kalm.dev/v1alpha1/httproutes: dial tcp 10.43.0.1:443: connect: connection refused"}
github.com/go-logr/zapr.(*zapLogger).Error
	/go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128
github.com/kalmhq/kalm/api/log.Error
	/workspace/api/log/logger.go:42
github.com/kalmhq/kalm/api/errors.CustomHTTPErrorHandler
	/workspace/api/errors/handler.go:24
github.com/labstack/echo/v4.(*Echo).ServeHTTP
	/go/pkg/mod/github.com/labstack/echo/v4@v4.1.16/echo.go:624
golang.org/x/net/http2/h2c.h2cHandler.ServeHTTP
	/go/pkg/mod/golang.org/x/net@v0.0.0-20200707034311-ab3426394381/http2/h2c/h2c.go:98
net/http.serverHandler.ServeHTTP
	/usr/local/go/src/net/http/server.go:2831
net/http.(*conn).serve
	/usr/local/go/src/net/http/server.go:1919
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x197d2da]

goroutine 10013 [running]:
github.com/kalmhq/kalm/api/resources.(*Builder).List(...)
	/workspace/api/resources/common.go:266
github.com/kalmhq/kalm/api/resources.(*Builder).getRoleBindingListChannel.func1(0x0, 0x0, 0x0, 0xc000bcbaf0)
	/workspace/api/resources/rolebinding.go:25 +0xba
created by github.com/kalmhq/kalm/api/resources.(*Builder).getRoleBindingListChannel
	/workspace/api/resources/rolebinding.go:23 +0xd6

@iAladdin iAladdin added k3s issues when using k3s need to investigate and removed need to investigate labels Feb 24, 2021
@iAladdin
Copy link
Contributor

We have updated the readme file and make a new installation flow, and I have installed kalm with k3s on mac, it should work😄
please try again, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k3s issues when using k3s
Projects
None yet
Development

No branches or pull requests

4 participants