Task: We need to replicate certain channels to remote SG instances. IMO the easiest way to do this is over the public api using a user that only has access to the channels we want replicated. This way it is a pull action and replication definition are on the target SG, but the access is controlled at the source SG.
example user in source SG config
"users": {
"all_content": {
"password": "passwordabc",
"admin_channels": [
"content"
],
"admin_roles": [
"adminrole"
],
"disabled": false
}
},
example replication definition on target:
"replications": [
{
"replication_id": "continuous-filtered",
"source": "http://all_content:passwordabc@sourceurl.com:4984/sync_gateway",
"target": "sync_gateway",
"continuous": true,
"changes_feed_limit": 1000
}
]
I have two questions:
-
Does anyone know if the TLS handshake is performed prior to passing the full url over with username and password?
-
I’ve been working with Couchbase support for almost a week without getting anywhere, so I thought I would ask it here too. I am getting the following error on the target when it is trying to perform the replication work:
2019-05-21T11:58:56.016Z [DBG] Replicate+: Got notification CATCHING_UP
2019-05-21T11:58:56.016Z [INF] HTTP: #014: GET /sync_gateway/_local/e778eab791bc2f3270e33febf36048709fd21f03 (as ADMIN)
2019-05-21T11:58:56.017Z [INF] HTTP: #014: --> 404 missing (0.4 ms)
2019-05-21T11:59:56.115Z [DBG] Replicate+: Got notification ABORTED_WAITING_TO_RETRY
2019-05-21T11:59:56.615Z [DBG] Replicate+: Got notification CATCHING_UP
2019-05-21T11:59:56.616Z [INF] HTTP: #015: GET /sync_gateway/_local/e778eab791bc2f3270e33febf36048709fd21f03 (as ADMIN)
2019-05-21T11:59:56.617Z [INF] HTTP: #015: --> 404 missing (0.5 ms)
2019-05-21T12:00:56.716Z [DBG] Replicate+: Got notification ABORTED_WAITING_TO_RETRY
2019-05-21T12:00:57.216Z [DBG] Replicate+: Got notification CATCHING_UP
2019-05-21T12:00:57.216Z [INF] HTTP: #016: GET /sync_gateway/_local/e778eab791bc2f3270e33febf36048709fd21f03 (as ADMIN)
2019-05-21T12:00:57.217Z [INF] HTTP: #016: --> 404 missing (0.6 ms)
Things I’ve tried. Using a very simple sync function on both sides. It had no impact. I’ve also tried this on two different target SG databases with different target databases and a very similar error message was given.
Any help would be appreciated.