Mongorestore error encountered server selection timeout

Hi ,

Just wanted to ask regarding mongorestore error that i encountered ,

" error connecting to host: could not connect to server: server selection error: server selection timeout, current topology: { Type: Single, Servers: [{ Addr: 127.0.0.1:37027, Type: Unknown, State: Connected, Average RTT: 0, Last error: connection() : connection(127.0.0.1:37027[-61]) incomplete read of message header: EOF }, ] }"

command used

mongorestore -h 127.0.0.1 --gzip --archive=/home/mongodbadm/advisory_dump.gz --port 37027 -u testuser -p ‘testpassw’ --authenticationDatabase admin

the dump only contains a specific database.

Hi @Daniel_Inciong,

It looks like no process is listenning on 127.0.0.1:37027…

Can you verify that this is actually the correct port and host?

Try a mongo shell connection to verify…

Additionally, what is the mongorestore version and the server version on 37027 port?

Best regards,
Pavel