0
votes

I have been trying to run a Grocery-sync couchbase androi demo on Windows machine.

I have download the Sync-Gateway from Couchbase mobile.

While running this demo I am able to insert an Item in local Cblite. But It doesn't pull any docs from the SyncGateway. When I see the request on Sync-Gateway -

It shows 404 no such database "grocery-sync".

Sync-Gateway Response:

2016-04-18T01:32:04.612+05:30 ==== Couchbase Sync Gateway/1.2.0(83;41aa099) ====

2016-04-18T01:32:04.614+05:30 Opening db /sync_gateway as bucket "sync_gateway", pool "default", server

2016-04-18T01:32:04.614+05:30 Opening Walrus database sync_gateway on

2016-04-18T01:32:04.615+05:30 Using default sync function 'channel(doc.channels) ' for database "sync_gateway"

2016-04-18T01:32:04.615+05:30 Reset guest user to config

2016-04-18T01:32:04.615+05:30 Starting profile server on

2016-04-18T01:32:04.615+05:30 Starting admin server on 127.0.0.1:4985

2016-04-18T01:32:04.621+05:30 Starting server on localhost:4984 ...

2016-04-18T01:35:26.216+05:30 HTTP: #001: GET /grocery-sync/_local/a08b05842f7f 55be5f15b12b58de0a9b10855d71

2016-04-18T01:35:26.217+05:30 HTTP: #002: GET /grocery-sync/_local/65fae3c5d53a 75a649f38f098ba00422c70b9786

2016-04-18T01:35:26.218+05:30 HTTP: #002: --> 404 no such database "grocery- sync" (1.5 ms)

2016-04-18T01:35:26.217+05:30 HTTP: #001: --> 404 no such database "grocery- sync" (1.0 ms)

2016-04-18T01:35:26.296+05:30 HTTP: #003: POST /grocery-sync/_changes

2016-04-18T01:35:26.297+05:30 HTTP: #003: --> 404 no such database "grocery- sync" (0.5 ms)

2016-04-18T01:35:36.310+05:30 HTTP: #004: POST /grocery-sync/_changes

2016-04-18T01:35:47.359+05:30 HTTP: #004: --> 404 no such database "grocery- sync" (11048.9 ms)

2016-04-18T01:35:57.375+05:30 HTTP: #005: POST /grocery-sync/_changes

2016-04-18T01:35:57.375+05:30 HTTP: #005: --> 404 no such database "grocery- sync" (0.5 ms)

As Sync-Gateway connection is the first step to work with Couchbase. Till than I am stuck and surfing around.

1
We'll be needing your config.json for sync gateway and android app code to give any solutionsLegendary_Hunter

1 Answers

2
votes

From the logs, Sync Gateway has created a database called sync_gateway. That's the default database name (typically when starting Sync Gateway without a config file). You can provide the database name as a command line argument:

~/Downloads/couchbase-sync-gateway/bin/sync_gateway -dbname="grocery-sync"

For more configuration option, you can create a config file (read more at http://developer.couchbase.com/documentation/mobile/1.2/develop/guides/sync-gateway/configuring-sync-gateway/config-properties/index.html)