PMM QAN Agent timeout problem and QAN meet SASL auth failed at MongoDB

First problem is, when create first mongodb:queries at PMM, my machine is slow to start agent (15s), but timeout is 10s, i will never add queries because it will request me to repair (mean remove) it.

example log here
https://gist.github.com/adaam/d3abb6fce44fb71fe6fb1d4e989ece73

Second problem, my mongodb need to use username and password to login, I provide it use --uri mongodb://username: password@localhost , but QAN shows “server returned error on SASL authentication step: Authentication failed.”
I’m sure it’s username and password correct bacause at System Summery tab, both system summery and mongodb summery show information correct.

Image missing, add back.

Hey, sorry for late answer.

As a workaround, if your auth db is default admin you should use:

pmm-admin add mongodb --uri mongodb://user:pass@localhost:27017/?authSource=admin

Hi Kamil,

This solution is worked when use Query Profile, but after add authSource, System Summery for Mongo Summery failed.

There has little problem, at our environment (for testing), we use one machine(one IP) to start 2 shard and 1 mongos, each shard with 2 mongod node and 1 arbiter.

IP | role | port
127.0.0.1 | shard1_n1 | 20010
127.0.0.1 | shard1_n2 | 20011
127.0.0.1 | shard1_arb | 20012
127.0.0.1 | shard1_n1 | 20020
127.0.0.1 | shard2_n2 | 20021
127.0.0.1 | shard2_arb | 20022
127.0.0.1 | mongos | 27017

There has 2 scenario

  1. If I add mongos and shard1_n1 to PMM, when select instance shard1_n1, At Setting -> Status, there will double the databases status, if I have a database named “bill”, will show two line of “bill”, one auth failed (because mongos, obviously), but it should not show these two at one page.

  2. If I add shard1_n1 and shard2_n1 to PMM, no matter which instance I select, Setting -> Status will not show anything, just the circle running.

I’m not test yet, but I think these two problem may has same root cause, and will not happened with instance has different IP.

Anyone meet this problem as I do ?