I have a mobile app that uses Couchbase Lite 2.1 community edition,
I installed Couchbase Server 6.0.0 and Sync Gateway 2.5 community editions on Windows 10. I want to provide replication for the app.
This is my sync-gateway-config.json file:
{
“adminInterface”: “:4985”,
“interface”: “:4984”,
“log”: [“* “],
“databases”: {
“stock-database”: {
“server”: “http://localhost:8091”,
“bucket”: “stock-database”,
“username”: “sync_gateway”,
“password”: “123456”,
“num_index_replicas”:0,
“enable_shared_bucket_access”: true,
“import_docs”: “continuous”,
“users”: {
“GUEST”: { “disabled”: false, “admin_channels”: [”*”] }
},
“sync”:function (doc, oldDoc) { if (doc.sdk) { channel(doc.sdk); } }
}
}
}
When I run it in CMD, it stucks here:
ence 0 (backfill 0 not in [0-0])
2019-05-16T16:15:39.189-08:00 [INF] DCP: Restarting vb 1022 using metadata sequence 0 (backfill 0 not in [0-0])
2019-05-16T16:15:39.189-08:00 [INF] DCP: Restarting vb 1023 using metadata sequence 0 (backfill 0 not in [0-0])
2019-05-16T16:15:40.243-08:00 [INF] Using metadata purge interval of 3.00 days for tombstone compaction.
2019-05-16T16:15:40.254-08:00 [INF] Reset guest user to config
2019-05-16T16:15:40.254-08:00 [INF] Starting admin server on 127.0.0.1:4985
2019-05-16T16:15:40.257-08:00 [INF] Starting server on :4984 …
2019-05-16T16:15:40.277-08:00 [INF] CBGoUtilsLogger: Using plain authentication for user sync_gateway
2019-05-16T16:15:40.398-08:00 [INF] DCP: Backfill in progress: 20% (2 / 10)
It does not continue, it just freezes at that point.
What is this? What is happening?
And by the way, this is my Couchbase code in the app:
const stock = new Couchbase(‘stock-database’);
const push = stock.createPushReplication(
‘ws://sync-gateway-host:4984/stock-database’
);
push.setUserNameAndPassword(“sync_gateway”,“123456”);
const pull = stock.createPullReplication(
‘ws://sync-gateway-host:4984/stock-database’
);
pull.setSessionId(“SomeId”);
pull.setSessionIdAndCookieName(“SomeId”,“SomeCookieName”);push.setContinuous(true);
pull.setContinuous(true);
push.start();
pull.start();module.exports.stock = stock;