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