Not understanding how to get couchbase lite to pull down all exsisting dbs from sync gateway

yes sir i did i replaced everything that needed to be replaced i used the address the the sync-gateway is at as the url. But I get a timeout i believe its because there is too much data, the query is taking to long. I was wondering if there was a way to you know grab a portion of the data instead limiting the amount of documents its trying to retrieve in the query.

How many docs do you have?! You’d need millions of docs for it to time out, probably. More likely you’re not able to reach the host … try
curl --user username:password http://sghost:4984/dbname/
which should return some brief JSON with stats about the database.

In an _all_docs query IIRC you can add ?limit=100 to limit the number.

Yeah we have over millions of docs I work with large amonts of data I have confirmed that it was timing out. So I tried to work with a smaller data set, and I am adjusting the configurations to wait longer than the 2.5 seconds that its defaulted at for server operations.

@priya.rajagopal @jens I was wondering do you need to use the port 4984 when you are trying to replicate i.e.
wss://serverAddress:4984/default/ if so I keep getting OFFLINE error when I added it to the address. do we have to do something special to get this port to be used correctly?

So this is what I get when I tried to sync got this from the sg_info log it keeps saying there are no changes.

WS: c: Start BLIP/Websocket handler
[INF] SyncMsg: c: #1: Type:getCheckpoint Client:INF] SyncMsg: c: #1: Type:getCheckpoint --> 404 missing Time:956.01µs [INF] SyncMsg: c: #2: Type:subChanges Since:0
[INF] Sync: c: Sending changes since 0
[INF] Changes: c: MultiChangesFeed(channels: {}, options: {Since: 0, Limit: 0, Conflicts: false, IncludeDocs: false, Wait: false, Continuous: false, HeartbeatMs: 0, TimeoutMs: 0, ActiveOnly: false}) …
[INF] Changes: c:[] MultiChangesFeed done
[INF] Sync: c:[] Sent all changes to client
[INF] HTTP: c:[] #002: --> BLIP+WebSocket connection closed
[INF] HTTP: #003: GET /common/_blipsync
[INF] HTTP+: #003: --> 101 [] Upgraded to BLIP+WebSocket protocol (as GUEST) (0.0 ms)
[INF] WS: c:[] Start BLIP/Websocket handler
[INF] SyncMsg: c:[] #1: Type:subChanges Since:0
[INF] SyncMsg: c:[] #2: Type:getCheckpoint Client:cp-
[INF] Changes: c:[] MultiChangesFeed(channels: {
}, options: {Since: 0, Limit: 0, Conflicts: false, IncludeDocs: false, Wait: false, Continuous: false, HeartbeatMs: 0, TimeoutMs: 0, ActiveOnly: false})

I was wondering do you need to use the port 4984

You can look at the documentation to see about network ports, and how to customize them.
https://docs.couchbase.com/sync-gateway/2.7/getting-started.html#network-ports

No I don’t we have the ports mapped so that its automatically sent to the correct port.

If its the default port, which means you don’t have to do anything special to make sync gateway listen on 4984 port.

yes that is correct. I am trying to figure out why its not pulling and documents, I am able to hit the gateway this way through post man https://gatewayURL/bucketName/_all_docs it returns information so I know that the user and channel are working.

Also noticed this Upgraded to BLIP+WebSocket protocol (as GUEST) (0.0 ms) is it trying to do operations as a guest on the sync_gateway?

Is it possible to share the client side logs?

The device logs sure I can share them

2020-04-13 16:40:52.722 31354-31354/? I/selite_tutoria: Not late-enabling -Xcheck:jni (already on)

2020-04-13 16:40:52.760 31354-31354/? W/selite_tutoria: Unexpected CPU variant for X86 using defaults: x86

2020-04-13 16:40:53.413 31354-31354/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden method Landroid/graphics/drawable/Drawable;->getOpticalInsets()Landroid/graphics/Insets; (light greylist, linking)

2020-04-13 16:40:53.413 31354-31354/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking)

2020-04-13 16:40:53.413 31354-31354/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking)

2020-04-13 16:40:53.413 31354-31354/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden field Landroid/graphics/Insets;->top:I (light greylist, linking)

2020-04-13 16:40:53.413 31354-31354/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden field Landroid/graphics/Insets;->bottom:I (light greylist, linking)

2020-04-13 16:40:53.474 31354-31354/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden method Landroid/view/View;->getAccessibilityDelegate()Landroid/view/View$AccessibilityDelegate; (light greylist, linking)

2020-04-13 16:40:53.538 31354-31354/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)

2020-04-13 16:40:53.538 31354-31354/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)

2020-04-13 16:40:53.546 31354-31354/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden method Landroid/widget/TextView;->getTextDirectionHeuristic()Landroid/text/TextDirectionHeuristic; (light greylist, linking)

2020-04-13 16:40:53.598 31354-31354/com.couchbaselite_tutorial I/MainActivity: Starting

2020-04-13 16:40:53.633 31354-31354/com.couchbaselite_tutorial W/CouchbaseLite/DATABASE: Database.log.getFile().getConfig() is null, meaning file logging is disabled. Log files required for product support are not being generated.

2020-04-13 16:40:53.643 31354-31354/com.couchbaselite_tutorial I/MainActivity: Entering Try Catch

2020-04-13 16:40:53.695 31354-31354/com.couchbaselite_tutorial I/MainActivity: Starting Replication

2020-04-13 16:40:53.704 31354-31381/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.open() socket -> 3830910152

2020-04-13 16:40:53.705 31354-31381/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.open() clazz -> com.couchbase.lite.internal.replicator.CBLWebSocket

2020-04-13 16:40:53.737 31354-31354/com.couchbaselite_tutorial D/OpenGLRenderer: Skia GL Pipeline

2020-04-13 16:40:53.760 31354-31381/com.couchbaselite_tutorial D/NetworkSecurityConfig: Using Network Security Config from resource network_security_config debugBuild: true

2020-04-13 16:40:53.760 31354-31354/com.couchbaselite_tutorial I/Getting Info From Buckets and Status is the following:: Status Code :: Status{activityLevel=CONNECTING, progress=Progress{completed=0, total=0}, error=null}

2020-04-13 16:40:53.770 31354-31381/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (light greylist, reflection)

2020-04-13 16:40:53.770 31354-31381/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (light greylist, reflection)

2020-04-13 16:40:53.770 31354-31381/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (light greylist, reflection)

2020-04-13 16:40:53.772 31354-31381/com.couchbaselite_tutorial E/CouchbaseLite/NETWORK: CBLWebSocket.socket_open()

2020-04-13 16:40:53.838 31354-31387/com.couchbaselite_tutorial D/HostConnection: HostConnection::get() New Host Connection established 0xde2c0140, tid 31387

2020-04-13 16:40:53.843 31354-31387/com.couchbaselite_tutorial D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0

2020-04-13 16:40:53.854 31354-31387/com.couchbaselite_tutorial I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0

2020-04-13 16:40:53.854 31354-31387/com.couchbaselite_tutorial I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0

2020-04-13 16:40:53.854 31354-31387/com.couchbaselite_tutorial I/OpenGLRenderer: Initialized EGL, version 1.4

2020-04-13 16:40:53.854 31354-31387/com.couchbaselite_tutorial D/OpenGLRenderer: Swap behavior 1

2020-04-13 16:40:53.854 31354-31387/com.couchbaselite_tutorial W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without…

2020-04-13 16:40:53.854 31354-31387/com.couchbaselite_tutorial D/OpenGLRenderer: Swap behavior 0

2020-04-13 16:40:53.866 31354-31387/com.couchbaselite_tutorial D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 0 0

2020-04-13 16:40:53.866 31354-31387/com.couchbaselite_tutorial D/EGL_emulation: eglCreateContext: 0xde2851e0: maj 3 min 0 rcv 3

2020-04-13 16:40:53.867 31354-31387/com.couchbaselite_tutorial D/EGL_emulation: eglMakeCurrent: 0xde2851e0: ver 3 0 (tinfo 0xde2832f0)

2020-04-13 16:40:53.921 31354-31387/com.couchbaselite_tutorial D/HostConnection: createUnique: call

2020-04-13 16:40:53.921 31354-31387/com.couchbaselite_tutorial D/HostConnection: HostConnection::get() New Host Connection established 0xde2c0460, tid 31387

2020-04-13 16:40:53.985 31354-31387/com.couchbaselite_tutorial D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0

2020-04-13 16:40:53.987 31354-31387/com.couchbaselite_tutorial E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1

2020-04-13 16:40:54.000 31354-31387/com.couchbaselite_tutorial D/EGL_emulation: eglMakeCurrent: 0xde2851e0: ver 3 0 (tinfo 0xde2832f0)

2020-04-13 16:40:54.004 31354-31387/com.couchbaselite_tutorial D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 3 2

2020-04-13 16:40:54.412 31354-31388/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V (light greylist, reflection)

2020-04-13 16:40:54.650 31354-31388/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (light greylist, reflection)

2020-04-13 16:40:54.787 31354-31384/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.write() handle -> 3830910152

2020-04-13 16:40:54.790 31354-31384/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: completedWrite(long) handle -> 3830910152, byteCount -> 68

2020-04-13 16:40:54.790 31354-31354/com.couchbaselite_tutorial I/Getting Info From Buckets and Status is the following:: Status Code :: Status{activityLevel=BUSY, progress=Progress{completed=0, total=0}, error=null}

2020-04-13 16:40:54.791 31354-31384/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.write() handle -> 3830910152

2020-04-13 16:40:54.793 31354-31384/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: completedWrite(long) handle -> 3830910152, byteCount -> 36

2020-04-13 16:40:55.143 31354-31382/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.completedReceive() handle -> 3830910152

2020-04-13 16:40:55.143 31354-31382/com.couchbaselite_tutorial I/chatty: uid=10091(com.couchbaselite_tutorial) Thread-9 identical 1 line

2020-04-13 16:40:55.144 31354-31382/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.completedReceive() handle -> 3830910152

2020-04-13 16:40:55.145 31354-31382/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.requestClose() handle -> 3830910152

2020-04-13 16:40:55.283 31354-31388/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.requestClose() handle -> 3830910152

2020-04-13 16:40:55.283 31354-31388/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: CBLWebSocket.requestClose() Failed to attempt to initiate a graceful shutdown of this web socket.

2020-04-13 16:40:55.284 31354-31381/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.dispose() handle -> 3830910152

2020-04-13 16:40:55.289 31354-31354/com.couchbaselite_tutorial I/Replicator has synced all the buckets: Status Code :: Status{activityLevel=STOPPED, progress=Progress{completed=0, total=0}, error=null}

From the logs, I couldn’t find any information about the checkpoints, as well as any information about the replicator’s puller. Did you enable logs on CouchbaseLite side? If not, can you enable verbose(LogLevel) and share the logs. Also it will be helpful to attach a file with logs, else it will be hard to look through the history.

https://docs.couchbase.com/couchbase-lite/2.7/java-android.html#logging

Are we not able to turn on verbose logging for the console or is that only possible with file or custom logging, if so I am not completely understanding the directions but will implement it today.

Can I be honest your documentation is not very good. It leaves too many unanswered questions. I implemented what it says and I don’t see anything different in the logs maybe you can give a sample of the code so that I can see the custom one working trying to put it to a file doesn’t work because its defaulted to the binary stuff which doesn’t work unless you cb-log tool, which is having issues in the installation process that I am not sure how to fix. Also have never used cmake before so I wouldn’t be able to fix it even if I tried. Can you please provide a sample for the custom coding or tell me how to turn on the plain text logging or something that will help me give you the logging that you need.

Can you just add this line of code(before setting up the replicator ), which will set the console log level to verbose.

Database.log.getConsole().setLevel(LogLevel.VERBOSE);

Here are my logs.

V/CouchbaseLite/REPLICATOR: {Repl#3} Checkpoint doc ID = cp-Pqqgh9TUYv8iWnC0GgQ4k81A6T4=

2020-04-15 07:03:26.628 27371-27413/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} No local checkpoint ‘cp-Pqqgh9TUYv8iWnC0GgQ4k81A6T4=’

2020-04-15 07:03:26.629 27371-27413/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} activityLevel=connecting: connectionState=1

2020-04-15 07:03:26.644 27371-27421/com.couchbaselite_tutorial D/HostConnection: HostConnection::get() New Host Connection established 0xdc99b380, tid 27421

2020-04-15 07:03:26.663 27371-27421/com.couchbaselite_tutorial D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0

2020-04-15 07:03:26.666 27371-27421/com.couchbaselite_tutorial I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0

2020-04-15 07:03:26.667 27371-27421/com.couchbaselite_tutorial I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0

2020-04-15 07:03:26.667 27371-27421/com.couchbaselite_tutorial I/OpenGLRenderer: Initialized EGL, version 1.4

2020-04-15 07:03:26.667 27371-27421/com.couchbaselite_tutorial D/OpenGLRenderer: Swap behavior 1

2020-04-15 07:03:26.667 27371-27421/com.couchbaselite_tutorial W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without…

2020-04-15 07:03:26.667 27371-27421/com.couchbaselite_tutorial D/OpenGLRenderer: Swap behavior 0

2020-04-15 07:03:26.669 27371-27421/com.couchbaselite_tutorial D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 0 0

2020-04-15 07:03:26.669 27371-27421/com.couchbaselite_tutorial D/EGL_emulation: eglCreateContext: 0xdb7dfdc0: maj 3 min 0 rcv 3

2020-04-15 07:03:26.670 27371-27421/com.couchbaselite_tutorial D/EGL_emulation: eglMakeCurrent: 0xdb7dfdc0: ver 3 0 (tinfo 0xe464ddb0)

2020-04-15 07:03:26.713 27371-27421/com.couchbaselite_tutorial D/HostConnection: createUnique: call

2020-04-15 07:03:26.713 27371-27421/com.couchbaselite_tutorial D/HostConnection: HostConnection::get() New Host Connection established 0xdc99b920, tid 27421

2020-04-15 07:03:26.734 27371-27421/com.couchbaselite_tutorial D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0

2020-04-15 07:03:26.734 27371-27421/com.couchbaselite_tutorial E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1

2020-04-15 07:03:26.753 27371-27421/com.couchbaselite_tutorial D/EGL_emulation: eglMakeCurrent: 0xdb7dfdc0: ver 3 0 (tinfo 0xe464ddb0)

2020-04-15 07:03:26.755 27371-27421/com.couchbaselite_tutorial D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 3 2

2020-04-15 07:03:27.000 27371-27422/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V (light greylist, reflection)

2020-04-15 07:03:27.155 27371-27422/com.couchbaselite_tutorial W/selite_tutoria: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (light greylist, reflection)

2020-04-15 07:03:27.266 27371-27422/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: WebSocketListener.onOpen() response -> Response{protocol=http/1.1, code=101, message=Switching Protocols, url=https://cb-gateway-location/bucketName_blipsync}

2020-04-15 07:03:27.266 27371-27422/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: receivedHTTPResponse() httpStatus -> 101

2020-04-15 07:03:27.266 27371-27422/com.couchbaselite_tutorial I/CouchbaseLite/NETWORK: CBLWebSocket CONNECTED!

2020-04-15 07:03:27.267 27371-27414/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} activityLevel=connecting: connectionState=1

2020-04-15 07:03:27.267 27371-27422/com.couchbaselite_tutorial I/CouchbaseLite/NETWORK: {N8litecore4blip10ConnectionE#2} Connected!

2020-04-15 07:03:27.268 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} Connected!

2020-04-15 07:03:27.269 27371-27415/com.couchbaselite_tutorial V/CouchbaseLite/REPLICATOR: {Repl#3} Requesting remote checkpoint

2020-04-15 07:03:27.269 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} activityLevel=busy: connectionState=2

2020-04-15 07:03:27.270 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} now busy

2020-04-15 07:03:27.272 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: C4ReplicatorListener.statusChanged, context: Replicator{@c07d7b3,<-,Database{@49ce904, name=‘common’},URLEndpoint{url=wss://cb-gateway-location/bucketName}], status: C4ReplicatorStatus{activityLevel=4, progressUnitsCompleted=0, progressUnitsTotal=0, progressDocumentCount=0, errorDomain=0, errorCode=0, errorInternalInfo=0}

2020-04-15 07:03:27.273 27371-27415/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip6BLIPIOE#4}==> N8litecore4blip6BLIPIOE ->wss://cb-gateway-location/bucketName_blipsync @0xde4ac440

2020-04-15 07:03:27.276 27371-27415/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip6BLIPIOE#4} WebSocket is hungry!

2020-04-15 07:03:27.276 27371-27415/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip6BLIPIOE#4} …Wrote 0 bytes to WebSocket (writeable=1)

2020-04-15 07:03:27.276 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {N8litecore4repl6PullerE#5}==> N8litecore4repl6PullerE ->wss://cb-gateway-location/bucketName_blipsync @0xe46b7b80

2020-04-15 07:03:27.277 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {N8litecore4repl6PullerE#5} Starting pull from remote seq

2020-04-15 07:03:27.277 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {N8litecore4repl6PullerE#5} activityLevel=busy: pendingResponseCount=1, _caughtUp=0, _pendingRevMessages=0, _activeIncomingRevs=0

2020-04-15 07:03:27.277 27371-27415/com.couchbaselite_tutorial V/CouchbaseLite/REPLICATOR: {N8litecore4repl6PullerE#5} now busy

2020-04-15 07:03:27.277 27371-27415/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip6BLIPIOE#4} Sending ‘getCheckpoint’ REQ #1

2020-04-15 07:03:27.278 27371-27415/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip6BLIPIOE#4} Sending frame: REQ #1 ----, bytes 0–65

2020-04-15 07:03:27.278 27371-27415/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.write() handle -> 3832482344

2020-04-15 07:03:27.278 27371-27430/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: Replicator{@c07d7b3,<-,Database{@49ce904, name=‘common’},URLEndpoint{url=wss://cb-gateway-location/bucketName}]: status changed: C4ReplicatorStatus{activityLevel=4, progressUnitsCompleted=0, progressUnitsTotal=0, progressDocumentCount=0, errorDomain=0, errorCode=0, errorInternalInfo=0}

2020-04-15 07:03:27.279 27371-27430/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: Replicator{@c07d7b3,<-,Database{@49ce904, name=‘common’},URLEndpoint{url=wss://cb-gateway-location/bucketName}] is busy, progress 0/0, error: null

2020-04-15 07:03:27.280 27371-27415/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: completedWrite(long) handle -> 3832482344, byteCount -> 68

2020-04-15 07:03:27.280 27371-27371/com.couchbaselite_tutorial I/Getting Info From Buckets and Status is the following:: Status Code :: Status{activityLevel=BUSY, progress=Progress{completed=0, total=0}, error=null}

2020-04-15 07:03:27.282 27371-27415/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip6BLIPIOE#4} Finished sending REQ #1

2020-04-15 07:03:27.282 27371-27415/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip6BLIPIOE#4} …Wrote 68 bytes to WebSocket (writeable=1)

2020-04-15 07:03:27.282 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} pushStatus=stopped, pullStatus=busy, progress=0/0

2020-04-15 07:03:27.282 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} activityLevel=busy: connectionState=2

2020-04-15 07:03:27.282 27371-27415/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip6BLIPIOE#4} Sending ‘subChanges’ REQ #2

2020-04-15 07:03:27.283 27371-27415/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip6BLIPIOE#4} Sending frame: REQ #2 ----, bytes 0–33

2020-04-15 07:03:27.283 27371-27415/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.write() handle -> 3832482344

2020-04-15 07:03:27.283 27371-27415/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: completedWrite(long) handle -> 3832482344, byteCount -> 36

2020-04-15 07:03:27.284 27371-27415/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip6BLIPIOE#4} Finished sending REQ #2

2020-04-15 07:03:27.284 27371-27415/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip6BLIPIOE#4} …Wrote 36 bytes to WebSocket (writeable=1)

2020-04-15 07:03:27.284 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} activityLevel=busy: connectionState=2

2020-04-15 07:03:27.285 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {N8litecore4repl6PullerE#5} activityLevel=busy: pendingResponseCount=1, _caughtUp=0, _pendingRevMessages=0, _activeIncomingRevs=0

2020-04-15 07:03:27.380 27371-27422/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: WebSocketListener.onMessage() bytes -> 020100d202ef8d

2020-04-15 07:03:27.381 27371-27422/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: WebSocketListener.onMessage() bytes -> 0128d20b28ca4fcbcc496548ce48cc4b4f2d6670cecf2b49cd2bd10da92c4865482c28c8c94c4e2cc9cccfd3cf2acecf63c82bcdc901003b80606b

2020-04-15 07:03:27.381 27371-27416/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip6BLIPIOE#4} Received frame: RES #2 ----, length 5

2020-04-15 07:03:27.381 27371-27422/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: WebSocketListener.onMessage() bytes -> 0102214572726f722d446f6d61696e0048545450004572726f722d436f646500343034006d697373696e67b75cf632

2020-04-15 07:03:27.382 27371-27416/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip10ConnectionE#2} Receiving RES #2

2020-04-15 07:03:27.382 27371-27416/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip10ConnectionE#2} Finished receiving RES #2

2020-04-15 07:03:27.382 27371-27416/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.completedReceive() handle -> 3832482344

2020-04-15 07:03:27.383 27371-27416/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {N8litecore4repl6PullerE#5} activityLevel=busy: pendingResponseCount=0, _caughtUp=0, _pendingRevMessages=0, _activeIncomingRevs=0

2020-04-15 07:03:27.384 27371-27413/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip6BLIPIOE#4} Received frame: REQ #1 --NC, length 57

2020-04-15 07:03:27.385 27371-27413/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip10ConnectionE#2} Receiving ‘changes’ REQ #1 NZ

2020-04-15 07:03:27.387 27371-27413/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip10ConnectionE#2} Finished receiving ‘changes’ REQ #1 NZ

2020-04-15 07:03:27.387 27371-27413/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.completedReceive() handle -> 3832482344

2020-04-15 07:03:27.388 27371-27413/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip6BLIPIOE#4} Received frame: ERR #1 ----, length 45

2020-04-15 07:03:27.388 27371-27413/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip10ConnectionE#2} Receiving ERR #1

2020-04-15 07:03:27.389 27371-27413/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: {N8litecore4blip10ConnectionE#2} Finished receiving ERR #1

2020-04-15 07:03:27.390 27371-27413/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.completedReceive() handle -> 3832482344

2020-04-15 07:03:27.391 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} No remote checkpoint

2020-04-15 07:03:27.392 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} activityLevel=busy: connectionState=2

2020-04-15 07:03:27.394 27371-27414/com.couchbaselite_tutorial V/CouchbaseLite/REPLICATOR: {N8litecore4repl6PullerE#5} Received ‘changes’ REQ#1 (0 queued; 0 revs pending, 0 active, 0 unfinished)

2020-04-15 07:03:27.394 27371-27414/com.couchbaselite_tutorial V/CouchbaseLite/REPLICATOR: {N8litecore4repl6PullerE#5} Handling ‘changes’ REQ#1

2020-04-15 07:03:27.395 27371-27414/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {N8litecore4repl6PullerE#5} Caught up with remote changes

2020-04-15 07:03:27.395 27371-27414/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {N8litecore4repl6PullerE#5} activityLevel=stopped: pendingResponseCount=0, _caughtUp=1, _pendingRevMessages=0, _activeIncomingRevs=0

2020-04-15 07:03:27.395 27371-27414/com.couchbaselite_tutorial V/CouchbaseLite/REPLICATOR: {N8litecore4repl6PullerE#5} now stopped

2020-04-15 07:03:27.396 27371-27414/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} pushStatus=stopped, pullStatus=stopped, progress=0/0

2020-04-15 07:03:27.396 27371-27414/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} Replication complete! Closing connection

2020-04-15 07:03:27.396 27371-27414/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} Told to stop!

2020-04-15 07:03:27.397 27371-27414/com.couchbaselite_tutorial I/CouchbaseLite/NETWORK: {N8litecore4blip10ConnectionE#2} Closing with code 1000, msg ‘’

2020-04-15 07:03:27.397 27371-27414/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} activityLevel=busy: connectionState=3

2020-04-15 07:03:27.398 27371-27413/com.couchbaselite_tutorial I/CouchbaseLite/NETWORK: {N8litecore4repl12C4SocketImplE#6}==> N8litecore4repl12C4SocketImplE wss://cb-gateway-location/bucketName_blipsync @0xe46f0998

2020-04-15 07:03:27.398 27371-27413/com.couchbaselite_tutorial I/CouchbaseLite/NETWORK: {N8litecore4repl12C4SocketImplE#6} Requesting close with status=1000, message=’’

2020-04-15 07:03:27.398 27371-27413/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.requestClose() handle -> 3832482344

2020-04-15 07:03:27.518 27371-27422/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: WebSocketListener.onClosing() code -> 1000, reason ->

2020-04-15 07:03:27.519 27371-27422/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.requestClose() handle -> 3832482344

2020-04-15 07:03:27.519 27371-27422/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: CBLWebSocket.requestClose() Failed to attempt to initiate a graceful shutdown of this web socket.

2020-04-15 07:03:27.519 27371-27422/com.couchbaselite_tutorial V/CouchbaseLite/NETWORK: WebSocketListener.onClosed() code -> 1000, reason ->

2020-04-15 07:03:27.519 27371-27422/com.couchbaselite_tutorial I/CouchbaseLite/NETWORK: {N8litecore4repl12C4SocketImplE#6} sent 104 bytes, rcvd 113, in 0.253 sec (411/sec, 447/sec)

2020-04-15 07:03:27.520 27371-27415/com.couchbaselite_tutorial W/CouchbaseLite/NETWORK: C4Socket.dispose() handle -> 3832482344

2020-04-15 07:03:27.520 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/NETWORK: {N8litecore4blip10ConnectionE#2} Closed with WebSocket status 1000:

2020-04-15 07:03:27.522 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} Connection closed with WebSocket status 1000: “” (state=3)

2020-04-15 07:03:27.523 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} activityLevel=stopped: connectionState=0

2020-04-15 07:03:27.523 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {Repl#3} now stopped

2020-04-15 07:03:27.525 27371-27414/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: {N8litecore4repl6PullerE#5} activityLevel=stopped: pendingResponseCount=0, _caughtUp=1, _pendingRevMessages=0, _activeIncomingRevs=0

2020-04-15 07:03:27.525 27371-27414/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: BLIP sent 2 msgs (104 bytes), rcvd 1 msgs (113 bytes) in 0.259 sec. Max outbox depth was 1, avg 1.00

2020-04-15 07:03:27.527 27371-27415/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: C4ReplicatorListener.statusChanged, context: Replicator{@c07d7b3,<-,Database{@49ce904, name=‘common’},URLEndpoint{url=wss://cb-gateway-location/bucketName}], status: C4ReplicatorStatus{activityLevel=0, progressUnitsCompleted=0, progressUnitsTotal=0, progressDocumentCount=0, errorDomain=0, errorCode=0, errorInternalInfo=0}

2020-04-15 07:03:27.529 27371-27414/com.couchbaselite_tutorial V/CouchbaseLite/DATABASE: {DB#1} Pre-close housekeeping: 0 of 18 pages free (0%)

2020-04-15 07:03:27.532 27371-27414/com.couchbaselite_tutorial V/CouchbaseLite/DATABASE: {DB#1} Closed SQLite database

2020-04-15 07:03:27.535 27371-27414/com.couchbaselite_tutorial I/CouchbaseLite/DATABASE: {DB#1} Closing database

2020-04-15 07:03:27.536 27371-27432/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: Replicator{@c07d7b3,<-,Database{@49ce904, name=‘common’},URLEndpoint{url=wss://cb-gateway-location/bucketName}]: status changed: C4ReplicatorStatus{activityLevel=0, progressUnitsCompleted=0, progressUnitsTotal=0, progressDocumentCount=0, errorDomain=0, errorCode=0, errorInternalInfo=0}

2020-04-15 07:03:27.537 27371-27432/com.couchbaselite_tutorial I/CouchbaseLite/REPLICATOR: Replicator{@c07d7b3,<-,Database{@49ce904, name=‘common’},URLEndpoint{url=wss://cb-gateway-location/bucketName}] is stopped, progress 0/0, error: null

2020-04-15 07:03:27.538 27371-27371/com.couchbaselite_tutorial I/Replicator has synced all the buckets: Status Code :: Status{activityLevel=STOPPED, progress=Progress{completed=0, total=0}, error=null}

@priya.rajagopal @jens @jayahari.vavachan @blake.meike
was also able to find out that I am able to sync the public documents just not the channeled ones. I saw something in the logs for the server that said something about guest user. [INF] HTTP+: #003: --> 101 [] Upgraded to BLIP+WebSocket protocol (as GUEST) (0.0 ms) I am not sure why it would try to sync as guest in the first place.

I have a related question. If you assign a channel to a role and assign that role to a user will you still have to set access in the sync function i.e. access(doc.username, doc.channels); so that the sync function will know to return those documents to the user?

Logging is documented here . That section also discusses enabling file logging using plaintext. Also in general, would suggest looking up the API references.

Share your sync gateway config . Thats where this is defined. If you used sample, then its enabled. You can learn about the guest account here

I have a related question. If you assign a channel to a role and assign that role to a user will you still have to set access in the sync function i.e. access(doc.username, doc.channels); so that the sync function will know to return those documents to the user?

You assign users to roles using this API and assign roles to channels using this API. If you did it correctly, you don’t need to assign users to channels. Would recommend reading this doc