Failed: londonbikes.rides_other: error restoring from /datasets/londonbikes/dump/londonbikes/rides_other.bson: this MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string

When i ran the mongoimport from mongos an error:

oot@chalapathi01:/data/shard/config1/db# mongorestore --port 30000 -d londonbikes /datasets/londonbikes/dump/londonbikes/ -u “mroot” -p “mroot” --authenticationDatabase “admin”
2020-10-25T00:03:22.121+0800 The --db and --collection flags are deprecated for this use-case; please use --nsInclude instead, i.e. with --nsInclude={DATABASE}.{COLLECTION}
2020-10-25T00:03:22.121+0800 building a list of collections to restore from /datasets/londonbikes/dump/londonbikes dir
2020-10-25T00:03:22.380+0800 reading metadata for londonbikes.rides_dropoff from /datasets/londonbikes/dump/londonbikes/rides_dropoff.metadata.json
2020-10-25T00:03:22.566+0800 reading metadata for londonbikes.rides_both from /datasets/londonbikes/dump/londonbikes/rides_both.metadata.json
2020-10-25T00:03:22.566+0800 restoring londonbikes.rides_dropoff from /datasets/londonbikes/dump/londonbikes/rides_dropoff.bson
2020-10-25T00:03:22.569+0800 restoring londonbikes.rides_other from /datasets/londonbikes/dump/londonbikes/rides_other.bson
2020-10-25T00:03:22.585+0800 restoring londonbikes.rides_both from /datasets/londonbikes/dump/londonbikes/rides_both.bson
2020-10-25T00:03:22.589+0800 finished restoring londonbikes.rides_other (0 documents, 0 failures)
2020-10-25T00:03:22.589+0800 Failed: londonbikes.rides_other: error restoring from /datasets/londonbikes/dump/londonbikes/rides_other.bson: this MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string
2020-10-25T00:03:22.589+0800 0 document(s) restored successfully. 0 document(s) failed to restore.
root@chalapathi01:/data/shard/config1/db#

Is this standalone or clustered environment?
Did you try with retryWrites=false

sharded cluster – 30000 is mongos port
root@chalapathi01:~# mongorestore --uri=“mongodb://localhost:30000/?retryWrites=false” -d londonbikes3 /datasets/londonbikes/dump/londonbikes/ -u “mroot” -p “mroot” --authenticationDatabase “admin”
2020-10-25T00:51:16.267+0800 The --db and --collection flags are deprecated for this use-case; please use --nsInclude instead, i.e. with --nsInclude={DATABASE}.{COLLECTION}
2020-10-25T00:51:16.267+0800 building a list of collections to restore from /datasets/londonbikes/dump/londonbikes dir
2020-10-25T00:51:16.297+0800 reading metadata for londonbikes3.rides_dropoff from /datasets/londonbikes/dump/londonbikes/rides_dropoff.metadata.json
2020-10-25T00:51:16.509+0800 reading metadata for londonbikes3.rides_both from /datasets/londonbikes/dump/londonbikes/rides_both.metadata.json
2020-10-25T00:51:16.517+0800 restoring londonbikes3.rides_other from /datasets/londonbikes/dump/londonbikes/rides_other.bson
2020-10-25T00:51:16.525+0800 restoring londonbikes3.rides_dropoff from /datasets/londonbikes/dump/londonbikes/rides_dropoff.bson
2020-10-25T00:51:16.545+0800 finished restoring londonbikes3.rides_other (0 documents, 0 failures)
2020-10-25T00:51:16.545+0800 Failed: londonbikes3.rides_other: error restoring from /datasets/londonbikes/dump/londonbikes/rides_other.bson: this MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string
2020-10-25T00:51:16.546+0800 0 document(s) restored successfully. 0 document(s) failed to restore.
root@chalapathi01:~#

It could be issue with deprecated storage or mongo tools version
Please check these links


ok. thanks for info