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

version: pmm-admin 1.17.1

sudo pmm-admin add mongodb:queries --uri “mongodb://root:db-password@10.110.8.23:27017/?replicaSet=mongo_cluster&authSource=admin” ip-10-110-8-23

I get this error:

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

goroutine 1 [running]:
main.glob…func15(0xc3b220, 0xc4200f2e80, 0x0, 0x2)
/tmp/go/src/github.com/percona/pmm-client/pmm-admin.go:610 +0x1a5
github.com/percona/pmm-client/vendor/github.com/spf13/cobra.(*Command).execute(0xc3b220, 0xc4200f2e40, 0x2, 0x2, 0xc3b220, 0xc4200f2e40)
/tmp/go/src/github.com/percona/pmm-client/vendor/github.com/spf13/cobra/command.go:654 +0x2a2
github.com/percona/pmm-client/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc39720, 0x973200, 0x97631b, 0x1f)
/tmp/go/src/github.com/percona/pmm-client/vendor/github.com/spf13/cobra/command.go:729 +0x2d4
github.com/percona/pmm-client/vendor/github.com/spf13/cobra.(*Command).Execute(0xc39720, 0xc62fcc, 0x965489)
/tmp/go/src/github.com/percona/pmm-client/vendor/github.com/spf13/cobra/command.go:688 +0x2b
main.main()
/tmp/go/src/github.com/percona/pmm-client/pmm-admin.go:1642 +0x145d

I am having exactly the same problem


[root@9e8ea15a9110 opt]# pmm-admin add mongodb:queries --uri "mongodb://root:db-password@dbhost:27017/dbname?ssl=true&replicaSet=repl-set-name&authSource=admin"

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

goroutine 1 [running]:
main.glob..func15(0xc3b220, 0xc420116fc0, 0x0, 0x2)
/tmp/go/src/github.com/percona/pmm-client/pmm-admin.go:610 +0x1a5
github.com/percona/pmm-client/vendor/github.com/spf13/cobra.(*Command).execute(0xc3b220, 0xc420116f80, 0x2, 0x2, 0xc3b220, 0xc420116f80)
/tmp/go/src/github.com/percona/pmm-client/vendor/github.com/spf13/cobra/command.go:654 +0x2a2
github.com/percona/pmm-client/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc39720, 0x973200, 0x97631b, 0x1f)
/tmp/go/src/github.com/percona/pmm-client/vendor/github.com/spf13/cobra/command.go:729 +0x2d4
github.com/percona/pmm-client/vendor/github.com/spf13/cobra.(*Command).Execute(0xc39720, 0xc62fcc, 0x965489)
/tmp/go/src/github.com/percona/pmm-client/vendor/github.com/spf13/cobra/command.go:688 +0x2b
main.main()
/tmp/go/src/github.com/percona/pmm-client/pmm-admin.go:1642 +0x145d

Hi both, thanks for your queries and I apologize for the delay in response.

It looks as though you have run into this known issue: [URL][PMM-3473] Mongodb_exporter panic & run time error - Percona JIRA which should be fixed in the next release by the look of that report. The best thing to do would be to subscribe to the blog and/or subscribe to that JIRA report, then you should be among the first to hear that a fix is available for this.

Hi, thanks for the feedback.

It seems to me that they are talking about mongodb metrics, while we both are talking about QAN for mongodb.
Our stacktraces are different from the ones mentioned in that issue.

Ah, apologies, let me check in with the engineering team, it may be that we could use a JIRA on this if there’s not already something in place.

They may have a solution of course! Will be back to you today, hopefully.

So this has been created in our bugs system now (thank you!) as an issue. It has been addressed in PMM2 beta versions but the team can see now they need to backport the solution.

Here is the link to the report, [url][PMM-4375] Mongodb_exporter panic & run time error (pmm1) - Percona JIRA the most efficient way for you to receive status updates on that would be to create an account in JIRA and add this to your watch list.

We appreciate the time you’ve taken to report this issue, hopefully there will be a resolution for you in the not too distant future.