alibaba / MongoShake

MongoShake is a universal data replication platform based on MongoDB's oplog. Redundant replication and active-active replication are two most important functions. 基于mongodb oplog的集群复制工具,可以满足迁移和同步的需求,进一步实现灾备和多活功能。
GNU General Public License v3.0
1.72k stars 441 forks source link

两个都有认证的集群进行同步 需要对源的每个shard设置用户名密码么? #319

Closed steedyu closed 3 years ago

steedyu commented 4 years ago

源 集群,mongos,mongo-config设置了密码,shard上都使用keyfile,开启auth,每个shard上其实没有用户密码登录 但是如果要作为源同步,看了下配置文件 是需要 对每个shard都设置一个用户密码,不然在开启auth的情况下访问失败吧

报如下日志 Connect to mongodb://user:xxxxx@a:27000,b:27000,c:27000 failed. server returned error on SASL authentication step: Authentication failed. a,b,c为三台mongo分片实例ip,user和xxx代表用户,密码

在开启auth得情况,这个是不是一定得对每个shard进行设置用户密码,才可以进行集群到集群的同步。

vinllen commented 4 years ago

是的,每个shard都需要。shard是以分号分割的。类型下面格式:

mongodb://user:password@xxxx:1000,xxx:1001,xxx:1002;mongodb://user2:password2@xxxx:2000,xxx:2001,xxx:2002

SSL的认证现在还不支持,2.4下面的小版本会考虑支持,请关注后续版本。

vinllen commented 3 years ago

236 ssl支持