Couchbase Lite Mobile version - couchbase-lite-android:2.1.0-DB001.
Syngateway version - 2.0.0-832
Couchbase Server version - 5.5.0-2958
Ubuntu version - 16.04 lts
In Couchbase lite while pull replication this api is getting called internally in log files.
Request URL:http://192.168.1.109:4984/demobucket/_blipsync
whose log traces are given below.
V/WS: WebSocketListener.onOpen() response -> Response{protocol=http/1.1, code=101, message=Switching Protocols, url=http://192.168.1.109:4984/demobucket/_blipsync}
V/WS: receivedHTTPResponse() httpStatus -> 101
I/LiteCore [Sync]: {Repl#1} activityLevel=connecting: connectionState=1
I/WS: CBLWebSocket CONNECTED!
I/LiteCore [BLIP]: {N8litecore4blip10ConnectionE#1} Connected!
I/LiteCore [Sync]: {Repl#1} Connected!
{Repl#1} activityLevel=busy: connectionState=2
{Repl#1} now busy
I/LiteCoreJNI: [NATIVE] C4Replicator.statusChangedCallback() repl -> 0x0xa514a600 status -> 4
I/Sync: C4ReplicatorListener.statusChanged() status -> C4ReplicatorStatus{activityLevel=4, progressUnitsCompleted=0, progressUnitsTotal=0, progressDocumentCount=0, errorDomain=0, errorCode=0, errorInternalInfo=0}
I/LiteCore [Sync]: {Repl#1} No local checkpoint ‘cp-uqVQw0XaCQL/giezAhygTpUlIBQ=’
{Repl#1} activityLevel=busy: connectionState=2
I/LiteCore [Sync]: {Pull#2}==> N8litecore4repl6PullerE ->ws:192.168.1.109:4984/demobucket/_blipsync
{Pull#2} Starting pull from remote seq
I/LiteCore [Sync]: {Pull#2} activityLevel=busy: pendingResponseCount=1, _caughtUp=0, _waitingForChangesCallback=0, _pendingRevMessages=0, _activeIncomingRevs=0
{Repl#1} activityLevel=busy: connectionState=2
I/LiteCore [Sync]: {DBWorker#3}==> N8litecore4repl8DBWorkerE ->ws:192.168.1.109:4984/demobucket/_blipsync
{DBWorker#3} activityLevel=idle: pendingResponseCount=0, eventCount=1
{Repl#1} pushStatus=stopped, pullStatus=busy, dbStatus=stopped, progress=0/0
{Repl#1} activityLevel=busy: connectionState=2
{Pull#2} activityLevel=busy: pendingResponseCount=1, _caughtUp=0, _waitingForChangesCallback=0, _pendingRevMessages=0, _activeIncomingRevs=0
{Repl#1} pushStatus=stopped, pullStatus=busy, dbStatus=idle, progress=0/0
{Repl#1} activityLevel=busy: connectionState=2
I/LiteCoreJNI: [NATIVE] C4Replicator.getResponseHeaders() repl -> 0xa514a600
I/Sync: statusChanged() c4Status -> C4ReplicatorStatus{activityLevel=4, progressUnitsCompleted=0, progressUnitsTotal=0, progressDocumentCount=0, errorDomain=0, errorCode=0, errorInternalInfo=0}
I/Sync: Replicator[<* Database@7c73201{name=‘couchbasemobile’} URLEndpoint{url=ws://192.168.1.109:4984/demobucket}] is busy, progress 0/0, error: null
V/WS: WebSocketListener.onMessage() bytes -> 0102214572726f722d436f646500343034004572726f722d446f6d61696e0048545450006d697373696e67ec76bdf0
I/LiteCore [Sync]: {Repl#1} No remote checkpoint
{Repl#1} activityLevel=busy: connectionState=2
V/WS: WebSocketListener.onMessage() bytes -> 0201006f536b2c
I/LiteCore [Sync]: {Pull#2} activityLevel=busy: pendingResponseCount=0, _caughtUp=0, _waitingForChangesCallback=0, _pendingRevMessages=0, _activeIncomingRevs=0
V/WS: WebSocketListener.onMessage() bytes -> 0128d20b28ca4fcbcc496548ce48cc4b4f2d6670cecf2b49cd2bd10da92c4865482c28c8c94c4e2cc9cccfd3cf2acecf63c82bcdc9010028b79478
I/LiteCore [Sync]: {Pull#2} Caught up with remote changes
{Pull#2} activityLevel=idle: pendingResponseCount=0, _caughtUp=1, _waitingForChangesCallback=0, _pendingRevMessages=0, _activeIncomingRevs=0
{Repl#1} pushStatus=stopped, pullStatus=idle, dbStatus=idle, progress=0/0
I/LiteCore [Sync]: {Repl#1} activityLevel=idle: connectionState=2
{Repl#1} now idle
I/LiteCoreJNI: [NATIVE] C4Replicator.statusChangedCallback() repl -> 0x0xa514a600 status -> 3
I/Sync: C4ReplicatorListener.statusChanged() status -> C4ReplicatorStatus{activityLevel=3, progressUnitsCompleted=0, progressUnitsTotal=0, progressDocumentCount=0, errorDomain=0, errorCode=0, errorInternalInfo=0}
I/Sync: statusChanged() c4Status -> C4ReplicatorStatus{activityLevel=3, progressUnitsCompleted=0, progressUnitsTotal=0, progressDocumentCount=0, errorDomain=0, errorCode=0, errorInternalInfo=0}
I/Sync: Replicator[<* Database@7c73201{name=‘couchbasemobile’} URLEndpoint{url=ws://192.168.1.109:4984/demobucket}] is idle, progress 0/0, error: null
and If I try to hit same url ie ://192.168.1.109:4984/demobucket/_blipsync in webbrowser.
Then output is
- Request URL:://192.168.1.109:4984/demobucket/_blipsync
- Request Method:GET
- Status Code:400 Bad Request
- Remote Address:192.168.1.109:4984
- Referrer Policy:no-referrer-when-downgrade.
And my sync_gateway.json config file is given below
{
“log”:[“CRUD+”, “REST+”, “Changes+”, “Attach+”],
“interface”:“0.0.0.0:4984”,
“adminInterface”:“0.0.0.0:4985”,
“compressResponses”:false,
“databases”: {
“demobucket”: {
“server”:"://127.0.0.1:8091",
“sync”:function (doc) { if (doc) { channel('sumit'); } }
,
“username”:“sync_gateway”,
“password”:“dost1234”,
“users”: {
“GUEST”: {
“disabled”: true,
“admin_channels”: [“public”]
},
“sync_gateway”:{
“password”:“dost1234”,
“admin_channels”: ["*"]
}
},
“unsupported”: {
“replicator_2”: true
},
“enable_shared_bucket_access”:true,
“import_docs”:“continuous”,
“shadow”: {
“server”: “://127.0.0.1:8091”,
“bucket”: “demobucket”
}
}
}
}
Could someone please help me in pulling data from Couchbase server via syngateway in android app.