Sync-gateway not reporting to the mobile client when a change was made

Server Version: 5.1.1
Sync-gateway: 2.0
Couchbase lite: 1.4.1

Using the Android Mobile ToDo app with the provided config.json file.

When I create a new task in the app, the document is sent up to the server fine. When a change has been made on one client, and another client is logged in with the same user information, the task is NOT synced on the other client until Sync-gateway has been stopped/restarted.

Here is a warning log that may be of use:

Summary

WARNING: Error processing DCP stream - will attempt to restart/reconnect if appropriate: worker connect, server: 172.17.0.2:11210, err: dial tcp 172.17.0.2:11210: getsockopt: operation timed out. – base.(*DCPReceiver).OnError() at dcp_feed.go:137

That error indicates that Sync Gateway is unable to establish a connection to Couchbase Server’s mutation stream. If the connection is able to be established after Sync Gateway restart, it suggests a transient connection problem. Is the Sync Gateway node working as expected prior to the error, or is this occurring on initial startup of Sync Gateway and Couchbase Server?

This is warning is appearing on random intervals after sync-gateway start up. What confuses me is that on the initial start of the sync-gateway, all new documents that have been added since the last start sync properly to the clients. After that, no documents will sync until the next restart.

That sounds like you’ve got intermittent network connectivity issues between your Sync Gateway and Couchbase Server nodes. Sync Gateway maintains a long-lived connection with Couchbase Server to monitor the mutation feed - it sounds like your network config may be breaking or timing out that connect.

What would you suggest as a solution?

I forgot to mention that both of the sync-gateway and server are running on my localhost

Further more, the syncing works fine when I use the “walrus:” for the server setting. As soon as I put “http://localhost:8091/” as the server, the pulling breaks

This turned out to be a mac issue… put it on a live server and everything worked fine