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

vCenter failed to receive VMs metrics panic runtime error invalid memory address or nil pointer dereference #34343

Open
shacharSirotkin opened this issue Jul 31, 2024 · 3 comments
Labels
bug Something isn't working needs triage New item requiring triage receiver/vcenter

Comments

@shacharSirotkin
Copy link

shacharSirotkin commented Jul 31, 2024

Component(s)

vCenter receiver

What happened?

Description

I tried to config a vcenterreciver and got a stack trace of runtime error saying:
panic: runtime error: invalid memory address or nil pointer dereference.

Steps to Reproduce

Install otel-collector-contrib on your PC and use a config.yaml to receive metrics from vCenter in version 7.0.3

Expected Result

normal metrics of vcenter

Actual Result

panic: runtime error: invalid memory address or nil pointer dereference.

github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver.(*vcenterMetricScraper).buildVMMetrics()
.....

Collector version

0.105.0

Environment information

Environment

Windows 10 Enterprise

OpenTelemetry Collector configuration

receivers:
    vecenter/vc1:
        endpoint: https://dev-vc1.my.domain
        username: vm_mgr_svc
        password: **************
        collection_interval: 1m
        tls:
            insecure: false
            insecure_skip_verify: true

exporters:
     file/myfile:
         path: metrics

service:
     pipelines:
          metrics:
               receivers:
                    - vcenter/vc1
               exporters:
                   - file/myfile
      telemetry:
          metrics:
                address: 0.0.0.0:8993

Log output

panic: runtime error: invalid memory address or nil pointer dereference.

github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver.(*vcenterMetricScraper).buildVMMetrics()
.....

Additional context

No response

@shacharSirotkin shacharSirotkin added bug Something isn't working needs triage New item requiring triage labels Jul 31, 2024
Copy link
Contributor

Pinging code owners for receiver/vcenter: @djaglowski @schmikei @StefanKurek. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1
Copy link
Member

Thanks for filing @shacharSirotkin, is that the full stack trace from the panic? It would be helpful to have more specific information about where the panic occurred in buildVMMetrics.

@BominRahmani
Copy link
Contributor

@shacharSirotkin Hey! I'd love to take a look at this, if you could please supply the full stack trace from the panic you see.

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 receiver/vcenter
Projects
None yet
Development

No branches or pull requests

3 participants