Couchbase Sync gateway not detecting properly


#1

Hi I have Amazon EC2 instance with server + sync gateway. I tried add a document using sync gateway and I tried to add document in server buck both working fine.

But I have a problem while syncing. The document which i am adding in the either in server or through sync gateway it is not syncing . Can any one help me for this

My Config.json is :

{
“interface”:":4984",
“adminInterface”:":4985",
“log”:[“REST”],
“databases”:{
“sync_gateway”:{
“server”:“http://localhost:8091”,
“bucket”:“sync_gateway”,
“sync”:function(doc) {channel(doc.channels);},
“users”: {
“GUEST”: {
“disabled”: false,
“admin_channels”: ["*"]
}
},
“shadow”: {
“server”: “http://localhost:8091”,
“bucket”: “sync_gateway”
}
}
}
}

My Sync gateway command line for put

curl -H “Content-Type: application/json” -X GET http://localhost:4985/sync_gateway/


#2

Well, one problem in your config is that you’ve got the Sync Gateway bucket shadowing itself. I don’t know exactly what that will cause, but it’s not good :slight_smile:

Either take out the “shadow” property if you don’t mean to use bucket shadowing, or set its “bucket” property to a different bucket that you’ve got existing docs in that you want synced.


#3

Hi Jens,

Thanks for your hint. I have removed the shadowing as you mentioned, But still my core problem exists. The document what i create is not syncing with server.
What would be the problem ?


#4

Can you describe in detail how you add the document, and what you expect to happen? Just “not syncing with server” isn’t enough information to go on.


#5

Hi Jens,

My Objective :

I would like sync Couchbase server with Couchbase lite using Sync gateway.

What is working for me now ;

I am able to add a document in couchbase server DB using Admin console.

I am able to add a document in couchbase lite in my android device

I am able to add a document using REST API in sync gateway , I am able to view the added document in sync gateway using REST API

What is not working for me .

The document which i am adding in Sync gateway is not syncing with Couchbase server. The document which i am adding using admin console not able to view in sync gateway.

Can you please help ?


#6

I am able to add a document in couchbase server DB using Admin console.

Don’t do that. See http://developer.couchbase.com/mobile/develop/guides/sync-gateway/getting-started-with-sync-gateway/connecting-sync-gateway-to-couchbase-server/index.html#accessing_bucket

The document which i am adding in Sync gateway is not syncing with Couchbase server.

What do you mean by “syncing with Couchbase server”? The Sync Gateway stores its documents in Couchbase Server already.

If you want a bucket on the server that you can modify using Couchbase Server SDK APIs (or the admin console), and still have that data available to mobile clients via the Sync Gateway, then the feature you need is bucket shadowing. Please read the documentation for how to configure it – you had it configured before but with an invalid config (you need two buckets.)

–Jens