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

Unable to comply with mongodb 4.2.2, error: panic: runtime error: invalid memory address or nil pointer dereference #122

Open
Atangwy opened this issue Dec 20, 2019 · 9 comments

Comments

@Atangwy
Copy link

Atangwy commented Dec 20, 2019

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x508228]

goroutine 32 [running]:
panic(0x73d340, 0xc42000a0e0)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/dcu/mongodb_exporter/collector.(*PreloadStats).Export(0x0, 0xc42010c4e0)
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/collector/metrics.go:363 +0x38
github.com/dcu/mongodb_exporter/collector.(*ReplStats).Export(0xc4202875c0, 0xc42010c4e0)
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/collector/metrics.go:352 +0x90
github.com/dcu/mongodb_exporter/collector.(*MetricsStats).Export(0xc4201ebdc0, 0xc42010c4e0)
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/collector/metrics.go:435 +0x4c7
github.com/dcu/mongodb_exporter/collector.(*ServerStatus).Export(0xc4200f28c0, 0xc42010c4e0)
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/collector/server_status.go:111 +0x1f9
github.com/dcu/mongodb_exporter/collector.(*MongodbCollector).collectServerStatus(0xc4200f4500, 0xc4200ddd40, 0xc42010c4e0, 0x7235e0)
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/collector/mongodb_collector.go:85 +0xe3
github.com/dcu/mongodb_exporter/collector.(*MongodbCollector).Collect(0xc4200f4500, 0xc42010c4e0)
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/collector/mongodb_collector.go:64 +0x2d4
github.com/dcu/mongodb_exporter/vendor/github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func2(0xc4200ef540, 0xc42010c4e0, 0x928900, 0xc4200f4500)
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/vendor/github.com/prometheus/client_golang/prometheus/registry.go:433 +0x63
created by github.com/dcu/mongodb_exporter/vendor/github.com/prometheus/client_golang/prometheus.(*Registry).Gather
/Users/dc/code/go/src/github.com/dcu/mongodb_exporter/vendor/github.com/prometheus/client_golang/prometheus/registry.go:434 +0x326

@rkm
Copy link

rkm commented Jan 7, 2020

Hi, I'm also seeing this. Is there a fix available?

@WilliamThh
Copy link

+1

@rkm
Copy link

rkm commented Jan 8, 2020

Seems like this project is no longer under development. I'm planning migrating to this fork: https://github.com/percona/mongodb_exporter

@liying6600
Copy link

+1

1 similar comment
@jnet06
Copy link

jnet06 commented Apr 30, 2020

+1

@ShawnGoethe
Copy link

4.2.6 also has the same problem , someone know how to solve it?
cause we can't downgrade our mongo version

@mongsil1025
Copy link

just like @rkm said, try use mongodb_exporter that percona made
I had same error, after switching exporter from dcu to percona, it solved

@rgaufman
Copy link

rgaufman commented Jun 3, 2022

+1 Not getting much data, only Oplog lag and getting the same error.

Screenshot 2022-06-03 at 10 30 50

Going to try the fork thank you! (https://github.com/percona/mongodb_exporter)

@hloeung
Copy link

hloeung commented Sep 12, 2022

Looks like it might be similar to #127 with PR #128 fixing it.

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

No branches or pull requests

9 participants