When restore shards using MongoDB MMS backup files, if the new shard IP addresses are not the same as the IPs from where you do backup, MongoDB will raise the error “11002 exception: socket exception [CONNECT_ERROR] for <shard id/ip:port>” since the old IPs is stored in config server DB.
Solution: Open a shell to MongoDB config server(s) and update the shard cluster IP in config DB:
use config;
db.shards.find()
db.shards.update({_id: “shard_id”}, {$set: {“host”: “shard_id/new_ip:port”}} })