Server selection timeout using mongodump


I am facing while restoring mongodump . i got below error could you please help me out.

error connecting to host: could not connect to server: server selection error: server selection timeout, current topology:

Type: Unknown, Last error: connection() error occured during connection handshake: Post “”: context deadline exceeded }, ] }

Provide us more details
Are you restoring to local host or remote
What command you issued
Can you connect to the target db?

i am using restore in local host only

mongorestore --ssl --host hostname --username --password --gzip dump location

Is your mongod up and running
Is this standalone or replica?

we are using replication

If it is replica your --host should be of the form --host replicaset/seedlist
Please refer mongo documentation command for standalone/replica/sharded

Your suggestion doesn’t answer OP’s issue. mongodump is timing out after sometime even with the accurate command.

What is the version of your mongodump?
Sometimes version related issues can cause this
Try with latest mongodump from mongodb tools