Can't Get data on My Bucket

curl -X PUT -H “Content-Type:application/json” http://serverip:4984/db/1 --data ‘{“created_by”:“3”}’ by this command execution , i can put data on server

curl -X GET -H “Content-Type:application/json” http://serverip:4984/db/1
by this comman execution , i got that data .

But , i didn’t see it on my bucket .

My server & sync_gateway at same machine . Here is my config.json
“log”:[“CRUD+”, “REST+”, “Changes+”, “Attach+”],
“interface”:":4984", “adminInterface”:":4985",
“databases”: {
“db”: {
“sync”:function (doc) { channel (doc.channels); },
“users”: { “GUEST”: { “disabled”: false, “admin_channels”: ["*"] } }

What would be the problem ?

How do you confirm that data is not on your bucket?

As your configure,you should login in your CB web Console,and check your document on your “default” bucket.

how you start your Sync Gateway?maybe your config.json don’t work, and it only load the default config, that the data is on the memory.

Then, how to configure coinfig.json file ? My Server Machine’s OS is ubuntu . I installed sync_gateway package . I saw one sync_gateway at inside home/sync_gateway/ here by default has a sync_gateway.json file & data folder . I edited this sync_gateway.json file with this config.json

Another at opt/couchbase-sync-gateway/bin/ i added a config.json file here & create a data folder here & i start sync_gateway from here .

Can you tell me , what is right way to add config.json & where will i add this ?

the default config file that sync gateway used is


or you can start SG by

/opt/couchbase-sync-gateway/bin/sync_gateway /home/sync_gateway/config.json

When start sync_gateway, i got some sync_ id and data as a Document in my Bucket . And When start i got HTTP port already used fatol error. Can you explain what’s wrong now

“admin_channels”: {
"*": 1
“all_channels”: null,
“sequence”: 1,
“rolesSince”: null
} doc name: _sync::user inserted my bucket when i start sync_gateway

//when sync_gateway start ,then i got this error

Starting server on :4984 …
Failed to start HTTP server on :4985: listen tcp :4985: bind: address already in use – rest.(*ServerConfig).Serve() at config.go:624

maybe your SG server has already start,you should stop your SG server by

sudo service sync_gateway stop

It has stared successfully now . So, should i start put data now ?

sure,then you can find data on your bucket.