Unable to do mongodump on mongodb 4.2.14 with replica

Hi,

We are running percona mongodb v4.2.14 with replica. We have 3 servers to run the 3 instances.
When we tried to do mongodump, we hit with the following error :-

mongodump --uri=“mongodb://:@host1:27017,host2:27017,host3:27017/mydb?replicaSet=mongodb-uat-re&authMechanism=PLAIN&authSource=%24external” –ssl

2021-07-08T22:55:41.944+0800 Failed: can’t create session: could not connect to server: server selection error: server selection timeout, current topology: { Type: ReplicaSetNoPrimary, Servers: [{ Addr: host1:27017, Type: Unknown, State: Connected, Average RTT: 0, Last error: connection() : EOF }, { Addr: host2:27017, Type: Unknown, State: Connected, Average RTT: 0, Last error: connection() : EOF }, { Addr: host3:27017, Type: Unknown, State: Connected, Average RTT: 0, Last error: connection() : EOF }, ] }

In the mongodb log file, we saw many lines of the following error msg before it failed with the above error message:-

2021-07-08T22:55:12.444+0800 I NETWORK [listener] connection accepted from xx.xx.xx.xx:48500 #9977 (1138 connections now open)
2021-07-08T22:55:12.445+0800 I NETWORK [conn9977] end connection xx.xx.xx.xx:48500 (1137 connections now open)
2021-07-08T22:55:12.944+0800 I NETWORK [listener] connection accepted from xx.xx.xx.xx:48506 #9978 (1138 connections now open)
2021-07-08T22:55:12.945+0800 I NETWORK [conn9978] end connection xx.xx.xx.xx:48506 (1137 connections now open)
2021-07-08T22:55:13.444+0800 I NETWORK [listener] connection accepted from xx.xx.xx.xx:48512 #9979 (1138 connections now open)
2021-07-08T22:55:13.445+0800 I NETWORK [conn9979] end connection xx.xx.xx.xx:48512 (1137 connections now open)
….

When we ran the same command with -vvvvv option, we only saw 2 extra lines, ie.
… initialising mongodump object
… will listen for SIGTERM, SIGINT, and SIGKILL

We can connect to the db using mongo cli and our app can also make the DB connection successfully.

We have other server running with older version of v4.0.13 and somehow we could run its version of mongodump to backup the abovementioned DB instance of v4.2.14
Would appreciate any input on how to further debug and what may cause the issue?

Best Regards

1 Like

Hi,
Another observation we found that when we ran mongodump --version, we saw different output between v4.2.14 than the older v4.0.13 …

mongodump --version
mongodump version: 4.0.13-7
git version: 2aeced60bec4310f9d87fd0c2dd535945e253126
Go version: go1.11.4
os: linux
arch: amd64
compiler: gc
OpenSSL version: OpenSSL 1.0.2k-fips 26 Jan 2017

… whereas in version 4.2.14, we did not see git version and openssl version in the output…
mongodump --version
mongodump version: 4.2.14-15
git version:
Go version: go1.11.4
os: linux
arch: amd64
compiler: gc

However the mongo --version output, from the same server, seems to show both info…
mongo --version
Percona Server for MongoDB shell version v4.2.14-15
git version: cc848425157a91da95fbc343b344380efbb03806
OpenSSL version: OpenSSL 1.0.2k-fips 26 Jan 2017
allocator: tcmalloc
modules: none
build environment:
distarch: x86_64
target_arch: x86_64

Not sure if this is relevant to the issue. If yes, did we miss anything?

Thank you.

1 Like