When using the mongodb connection string on a replica set, make sure you DO NOT PUT A SPACE between the servers.
IE. mongodb://db1.example.com:27017, db2.example.com:27017 will throw an error, but mongodb://db1.example.com:27017,db2.example.com:27017 will work correctly.