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

[21.05.3-2] Start panic with InfluxDB exporter #284

Closed
albinpopote opened this issue Jul 1, 2021 · 2 comments
Closed

[21.05.3-2] Start panic with InfluxDB exporter #284

albinpopote opened this issue Jul 1, 2021 · 2 comments
Labels
bug Something isn't working status/done

Comments

@albinpopote
Copy link

Describe the bug
Harvest seems to launch Prometeus exporter even if it is not configured on harvest.xml and panic

Environment

  • Harvest version: harvest version 21.05.3-2 (commit b482aff) (build date 2021-06-28T21:07:14+0530) linux/amd64
  • Command line arguments used: systemctl start harvest or bin/harvest start --config harvest.yml
  • OS: Debian 10.9
  • Install method: apt from DEB package
  • ONTAP Version: 9.5

To Reproduce
Configure the YAML configuration file with only InfluxDB as exporter

Expected behavior
Harvest should launch and polling

Actual behavior
Got a panic message

Datacenter            Poller                PID        PromPort        Status
+++++++++++++++++++++ +++++++++++++++++++++ ++++++++++ +++++++++++++++ ++++++++++++++++++++
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x717f9b]

goroutine 1 [running]:
goharvest2/pkg/conf.loadPrometheusExporterPortRangeMapping()
        goharvest2/pkg/conf/conf.go:261 +0xdb
goharvest2/pkg/conf.GetPrometheusExporterPorts(0xc000195b28, 0xd, 0xd, 0xc000195b28, 0xd)
        goharvest2/pkg/conf/conf.go:201 +0x607
main.getPollerPrometheusPort(0xc0001687e0, 0xbf2060, 0xc0000b9580)
        command-line-arguments/harvest.go:565 +0x77
main.doManageCmd(0xc00015b900, 0xc0000d0c40, 0x0, 0x2)
        command-line-arguments/harvest.go:199 +0x9bc
github.com/spf13/cobra.(*Command).execute(0xc00015b900, 0xc0000d0c20, 0x2, 0x2, 0xc00015b900, 0xc0000d0c20)
        github.com/spf13/cobra@v1.1.3/command.go:856 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xbf6000, 0x0, 0xbb5768, 0xc00008e058)
        github.com/spf13/cobra@v1.1.3/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.1.3/command.go:897
main.main()
        command-line-arguments/harvest.go:679 +0x34

Additional context
YAML configuration file:

Exporters:
    my_influxdb:
        exporters: InfluxDB
        addr: -REDACTED-
        bucket: NetApp
        org: OBS
        token: -REDACTED-
Defaults:
    collectors:
        - ZapiPerf
    use_insecure_tls: true
Pollers:
    DC-01:
        datacenter: Secret
        addr: -REDACTED-
        auth_style: basic_auth
        username: -REDACTED-
        password: -REDACTED-
        exporters:
            - my_influxdb
@cgrinds
Copy link
Collaborator

cgrinds commented Jul 2, 2021

Thanks for the clear reproduction steps @albinpopote. 👍 Fixed by #286

@rahulguptajss rahulguptajss changed the title Start panic with InfluxDB exporter [21.05.3-2] Start panic with InfluxDB exporter Jul 2, 2021
@albinpopote
Copy link
Author

Tested with a new deb package compilation. Works fine. Thanks for your rapidity ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status/done
Projects
None yet
Development

No branches or pull requests

2 participants