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

fix(adapter): fix elk client panic issue due to uninitialized waitgroup, ctx #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rksharma95
Copy link
Contributor

{"level":"info","ts":"2024-12-16 15:17:16.180767","caller":"log/logger.go:54","msg":"Created a relay server (:32767)"}
{"level":"info","ts":"2024-12-16 15:17:16.180927","caller":"log/logger.go:49","msg":"Started to serve gRPC-based log feeds"}
{"level":"info","ts":"2024-12-16 15:17:16.180945","caller":"log/logger.go:49","msg":"Started to receive log feeds from each node"}
{"level":"info","ts":"2024-12-16 15:17:16.182049","caller":"log/logger.go:49","msg":"Initialized the Kubernetes client"}
{"level":"info","ts":"2024-12-16 15:17:16.185508","caller":"log/logger.go:54","msg":"Added a new client (f12f3795-2e9f-4181-bf6a-2c5d26093aa6, policy) for WatchAlerts"}
{"level":"info","ts":"2024-12-16 15:17:16.185648","caller":"log/logger.go:54","msg":"Added a new client (b70fb7af-10a7-488f-bf63-eca88e583699, system) for WatchLogs"}
{"level":"info","ts":"2024-12-16 15:17:16.186195","caller":"log/logger.go:54","msg":"Checked the liveness of the gRPC server"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1a287fc]

goroutine 63 [running]:
golang.org/x/sync/errgroup.(*Group).Go(0x0, 0xc000652030)
        /go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:70 +0x1c
github.com/kubearmor/kubearmor-relay-server/relay-server/elasticsearch.(*ElasticsearchClient).Start(0xc000506740)
        /usr/src/kubearmor-relay-server/relay-server/elasticsearch/adapter.go:126 +0x13f
created by main.main in goroutine 1
        /usr/src/kubearmor-relay-server/relay-server/main.go:91 +0x388

Copy link
Member

@daemon1024 daemon1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we check other parts of the code? what's the below for loop for? how are client disconnects handled.

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

Successfully merging this pull request may close these issues.

2 participants