Invalid BSONSize: 0 bytes - mongorestore error

Hi, I would be grateful if someone could help me with this problem, I’ve an error when trey to restore a mongodump file, my conf is:

OS centos 7
Mongodb-org 3.4

For the backup I’ve used remote machine: mongodump --host IP --port 27017 --username xxx --password xxx --out /dumpdir

Compressed the dumpdir with tar czvf db.tgz

Extracted the db.tgz on another server with the same configuration of mongodb-org 3.4

When I try to restore with: mongorestore -d dbname --dir=/dumpdir/dbname -v -j 1 -u=xxx -p=xxx

After few minutes fail with this error:
[…] db.fs.chunks 5.36GB/309GB (1.7%)
Failed: repository.fs.chunks: error restoring from /dumpdir/dbname/fs.chunks.bson: reading bson input: invalid BSONSize: 0 bytes

what can it be?
thanks in advance

Hi @Dario_De_Simon

Are you using the mongorestore from the 3.4 era or the more modern version.
You could try with the newer mongodb tools.