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

K8sevents receiver panics #26528

Closed
datsabk opened this issue Sep 8, 2023 · 1 comment
Closed

K8sevents receiver panics #26528

datsabk opened this issue Sep 8, 2023 · 1 comment
Labels
bug Something isn't working needs triage New item requiring triage

Comments

@datsabk
Copy link
Contributor

datsabk commented Sep 8, 2023

Component(s)

No response

What happened?

Description

K8s events receiver causing pod to crash

Nil pointer reference

Steps to Reproduce

  1. Use the provided configuration for the K8s events pipeline.
  2. Try to start the pod

Expected Result

Successful start of Otel agent pod

Actual Result

CrashLoopBackoff

Collector version

0.82.0

Environment information

Environment

Docker image from Otel

OpenTelemetry Collector configuration

exporters:
      loki:
        auth:
          authenticator: basicauth/logs
        compression: gzip
        endpoint: https://xxxxx.grafana.net/loki/api/v1/push
    extensions:
      basicauth/logs:
        client_auth:
          password: ${LOKI_PASSWORD}
          username: ${LOKI_USERNAME}
      health_check: {}
      memory_ballast:
        size_in_percentage: 40
    processors:
      attributes:
        actions:
        - action: insert
          key: cluster
          value: argocd-infra-test
        - action: insert
          key: env
          value: stage
        - action: insert
          key: environment
          value: stage
      attributes/2:
        actions:
        - action: insert
          key: cluster
          value: argocd-infra-test
        - action: insert
          key: env
          value: stage
        - action: insert
          key: environment
          value: stage
        - action: insert
          key: loki.attribute.labels
          value: cluster, env, environment
      batch: {}
      memory_limiter:
        check_interval: 1s
        limit_mib: 1024
        spike_limit_mib: 256
      resource:
        attributes:
        - action: insert
          key: loki.resource.labels
          value: service.name, service.namespace
    receivers:
      k8s_events:
        auth_type: serviceAccount
        namespaces:
        - all
    service:
      extensions:
      - sigv4auth
      - health_check
      pipelines:
        logs:
          exporters:
          - loki
          processors:
          - attributes/2
          - resource
          receivers:
          - k8s_events
      telemetry:
        metrics:
          address: 0.0.0.0:8888

Log output

panic: runtime error: invalid memory address or nil pointer dereference
27
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x452310c]
26
25
goroutine 1 [running]:
24
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver.(*k8seventsReceiver).Shutdown(0xc00078e600, {0x1, 0xc000a8bb30})
23
	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver@v0.82.0/receiver.go:82 +0x6c
22
go.opentelemetry.io/collector/service/internal/graph.(*Graph).ShutdownAll(0x0?, {0x8234b68, 0xc0000c2030})
21
	go.opentelemetry.io/collector@v0.82.0/service/internal/graph/graph.go:358 +0xc9
20
go.opentelemetry.io/collector/service.(*Service).Shutdown(0xc000164100, {0x8234b68, 0xc0000c2030})
19
	go.opentelemetry.io/collector@v0.82.0/service/service.go:164 +0xd4
18
go.opentelemetry.io/collector/otelcol.(*Collector).setupConfigurationComponents(0xc00059b140, {0x8234b68, 0xc0000c2030})
17
	go.opentelemetry.io/collector@v0.82.0/otelcol/collector.go:174 +0x628
16
go.opentelemetry.io/collector/otelcol.(*Collector).Run(0xc00059b140, {0x8234b68, 0xc0000c2030})
15
	go.opentelemetry.io/collector@v0.82.0/otelcol/collector.go:207 +0x65
14
go.opentelemetry.io/collector/otelcol.NewCommand.func1(0xc000005200, {0x74871cf?, 0x1?, 0x1?})
13
	go.opentelemetry.io/collector@v0.82.0/otelcol/command.go:27 +0x96
12
github.com/spf13/cobra.(*Command).execute(0xc000005200, {0xc0000b4070, 0x1, 0x1})
11
	github.com/spf13/cobra@v1.7.0/command.go:940 +0x862
10
github.com/spf13/cobra.(*Command).ExecuteC(0xc000005200)
9
	github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd
8
github.com/spf13/cobra.(*Command).Execute(0xc0006b3da0?)
7
	github.com/spf13/cobra@v1.7.0/command.go:992 +0x19
6
main.runInteractive({{0xc0006b3da0, 0xc00076b080, 0xc00076a240, 0xc0006b3950, 0xc00076b140}, {{0x74b3139, 0xf}, {0x753e7f7, 0x1f}, {0x74807ea, ...}}, ...})
5
	github.com/open-telemetry/opentelemetry-collector-releases/contrib/main.go:31 +0x5d
4
main.run(...)
3
	github.com/open-telemetry/opentelemetry-collector-releases/contrib/main_others.go:11
2
main.main()
1
	github.com/open-telemetry/opentelemetry-collector-releases/contrib/main.go:24 +0x1d9

Additional context

No response

@datsabk datsabk added bug Something isn't working needs triage New item requiring triage labels Sep 8, 2023
@datsabk
Copy link
Contributor Author

datsabk commented Sep 8, 2023

Turned out to be an issue with my exporter - Closing the issue !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New item requiring triage
Projects
None yet
Development

No branches or pull requests

1 participant