Getting i/o timeout when trying to adding MongoDB monitoring

Is there a “hidden” timeout option when adding MongoDB exporter?

I am trying to monitor a pretty large sharded cluster - I have set up PMM in our staging environments without any problems but I get a timeout from the client when trying to do the same in production

/usr/bin/pmm-admin add mongodb --username=my_monitoring --password=my_password --port=27017
Connection check failed: connection(myhost.com:27017[-88]) incomplete read of message header: read tcp x.x.x.x:53990->x.x.x.x:27017: i/o timeout.

From Mongos log
09:08:09.883 “msg”:“Successful authentication”

09:08:12.865 “msg”:“Interrupted operation as its client disconnected”

Hi Nicolai,

Welcome to Percona Community Forum — thanks for contributing!

I don’t see any timeout that we default in exporter itself.
What version do you use?

mongo-driver that is used by exporter could have some timeouts, but they are quite high, like 30 sec.

Checking the logs you provided, it looks something none standard happened. Maybe something during tls handshake (but successful auth message doesn’t prove that) or with connection.

Maybe you could provide a little bit more logs (from exporter and mongos) that could clarify what is going on. Maybe also rise log level to debug to see more details from exporter.

Thanks,
Denys

1 Like

Hello Denys

Thank you for your reply - I of course should have provided a bit more context

Given the nature of the business I work for I can not send complete logs - sorry about that.

Context:
MongoDB: 4.4.5
OS: CentOS Linux release 7.9.2009 (Core)
Yum: pmm2-client-2.15.1

Bonus info :slight_smile:
I can connect and list all databases given the information that I provide to pmm-admin

mongo admin --port 27017 --authenticationDatabase admin --username my_monitoring --password my_password --host myhost.com --eval “db.adminCommand( { listDatabases: 1 } )”

I have attached part of the mongos and percona trace logspercona_trace.log (5.2 KB) mongos.log (2.9 KB)

1 Like

Hi Nicolai,

sorry for long response.

Those logs don’t show much because it is agent logs. Could you please try to run mongodb_exporter from the command line with option --log.level="debug" additionally to connection options.

Thanks,
Denys

1 Like

if that wouldn’t show us the issue - we would need issue opened on jira.percona.com.

1 Like

Hello Denys
Jira

1 Like

Thanks! looks like some connectivity issue between agent and server, we will check in the bug.

1 Like

It might be between the server and the agent - but what is really strange it only happens when trying to connect to a Mongos instance - I am able to connect and monitor all mongo config and data instances.

1 Like

https://jira.percona.com/browse/PMM-8020: verified this issue as a bug.

1 Like