Running replications via Sync Gateway config not working


#1

Hi,

Couchbase server 4.1.1
sync-gateway 1.2.0

We are trying to implement replication between two couchbase buckets but we are not able to replicate.

2016-06-14T14:58:05.850+05:30 CRUD+: Invalid sync metadata (may be expected): Current rev: , Sequence: 0
2016-06-14T14:58:05.869+05:30 WARNING: changeCache: Error unmarshaling doc “qwe”: – db.(*changeCache).DocChanged.func1() at change_cache.go:327

Please have a look at our sync config:

{
“log”:["*"],
“replications”:[
{
“source”: “test1”,
“target”: “test2”
},
{
“source”: “test2”,
“target”: “test1”
}
],

"databases": {
    "test1": {
        "server": "http://127.0.0.1:8091",
        "bucket": "test1"
        
    },
    "test2": {
        "server": "http://127.0.0.1:8091",
        "bucket": "test2"

    }

}}

We have tried all the example given in documention () but it does not seem to work. Our use is does not allow us to use XCDR.

Thanks
Arjun


#2

@arjunblue

Have you only created docs in your buckets via the Sync Gateway REST API (or via sync with CBL), or have any of the docs been created using one of the Couchbase Server SDK’s.


#3

Thanks for quick response.
its a mix it has docs from php sdk, android as well ios sdk, alongwith docs made from restapi of sync-gateway.

Thanks
Arjun


#4

@arjunblue

The message you are seeing in the log is for each document in the source DB that does not contain the Sync Gateway _sync metadata.

These will be the documents created via the Couchbase Server PHP SDK, these documents will not be replicated to the target DB by the _replicate task.