Error while backing up MongoDB instance using mongodump utility


trying to take a backup using mongodump utility and using an account that is granted backup role…every time i execute the mongodump command the following error is thrown:

could not connect to server: server selection error: server selection timeout, current topology: { Type: Single, Servers: [{ Addr: XXXXXXX:270171, Type: Unknown, Last error: connection() error occured during connection handshake: connection(XXXXXX:27017[-64]) socket was unexpectedly closed: EOF }, ] }


looks like connection to the server failed. Did you find any error messages in mongodb log file?

are you able to connect to the server with mongo shell?

what’s the command you run for mongodump?

1 Like

65535 is the max tcp port. You have 270171

1 Like