# Unable to do mongodump on mongodb 4.2.14 with replica

**URL:** <https://forums.percona.com/t/unable-to-do-mongodump-on-mongodb-4-2-14-with-replica/11276>\
**Category:** Percona Server for MongoDB\
**Created:** [July 10, 2021, 1:35am UTC](https://forums.percona.com/t/unable-to-do-mongodump-on-mongodb-4-2-14-with-replica/11276 "2021-07-10T01:35:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dedelee88](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@dedelee88](https://forums.percona.com/u/dedelee88)\
**Post date:** [July 10, 2021, 1:35am UTC](https://forums.percona.com/t/unable-to-do-mongodump-on-mongodb-4-2-14-with-replica/11276/1 "2021-07-10T01:35:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dedelee88](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@dedelee88](https://forums.percona.com/u/dedelee88)\
**Post date:** [July 10, 2021, 2:35am UTC](https://forums.percona.com/t/unable-to-do-mongodump-on-mongodb-4-2-14-with-replica/11276/2 "2021-07-10T02:35:27Z")

</div>

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.
