I am trying to get Grocery Sync to work on my android tablet.  If I use the 
default SYNC_URL (http://demo.mobile.couchbase.com/grocery-sync, it seems 
to work fine and I get a set of items from the demo database.

I delete the app from the tablet and will reload a fresh copy of the app 
(this insures that the local DB is gone);
I set up the SYNC_URL to point to "http://192.168.1.78:4984"; which is the 
ip address of the windows machine

So now I want to test out a local implementation of a couch base server 
running on a windows pc.
I have downloaded the couchbase server 3.0.1 to my windows machine.  That 
seems to have gotten started properly.  I have set up 2 data buckets - 
default and sync_gateway.  
I have started the sync-gateway.  The json file associated with starting 
the sync-gateway is:
{
   "interface":":4984",
   "adminInterface":":4985",
   "log" : ["REST+", "CRUD+", "Changes+", "Attach+" ],
   "databases":{
      "sync_gateway":{
         "server":"http://192.168.1.78:8091";,
         "sync":`function(doc) {channel(doc.channels);}`,
"users": {
              "GUEST":{"disabled":false, "admin_channels":["*"]}
              }
      }
   }
}

I start the sync-gateway with
sync_gateway.exe c:\Users\Milt\run_sync_gateway.json

The sync gateway starts up. The log shows:
C:\Program Files (x86)\Couchbase>sync_gateway.exe 
c:\Users\Milt\run_sync_gateway.json
14:05:04.203880 Enabling logging: [REST+ CRUD+ Changes+ Attach+]
14:05:04.205880 ==== Couchbase Sync Gateway/1.00 (1.0.1-18; commit 
81a69a16) ====
14:05:04.205880 Configured Go to use all 8 CPUs; setenv GOMAXPROCS to 
override this
14:05:04.205880 WARNING: Error setting MaxFileDescriptors to 5000: 
Unsupported on Windows -- rest.setMaxFileDescriptors() at config.go:322
14:05:04.205880 Opening db /sync_gateway as bucket "sync_gateway", pool 
"default", server <http://192.168.1.78:8091>
14:05:04.209880 Opening Couchbase database sync_gateway on 
<http://192.168.1.78:8091>
2014/11/17 14:05:05 go-couchbase: call to ViewCustom("sync_gateway", 
"access") in 
github.com/couchbaselabs/sync_gateway/base.couchbaseBucket.ViewCustom took 
681.0389ms
2014/11/17 14:05:05 go-couchbase: call to ViewCustom("sync_gateway", 
"role_access") in 
github.com/couchbaselabs/sync_gateway/base.couchbaseBucket.ViewCustom took 
217.0124ms
14:05:05.482953     Reset guest user to config
14:05:05.482953 Starting admin server on :4985
14:05:05.489954 Starting server on :4984 ...
14:05:07.309058 Changes+: Notifying that "sync_gateway" changed 
(keys="{_sync:user:}") count=2
14:05:07.309058 Changes+: Notifying that "sync_gateway" changed 
(keys="{_sync:user:}") count=3
14:05:20.236797 HTTP:  #001: GET 
/_changes?feed=normal&heartbeat=300000&style=all_docs
14:06:20.428240 HTTP:  #002: GET 
/_changes?feed=normal&heartbeat=300000&style=all_docs
14:07:20.526677 HTTP:  #003: GET 
/_changes?feed=normal&heartbeat=300000&style=all_docs

I then add an new item to the app
14:08:13.639715 HTTP:  #004: POST /_revs_diff
14:08:20.647116 HTTP:  #005: GET 
/_changes?feed=normal&heartbeat=300000&style=all_docs

I then reloaded app on tablet to see if the data on the server will sync up.
14:09:37.187494 HTTP:  #006: GET 
/_local/ebd52343d678c9dfd871a82b470b3ce492f679aa
14:09:37.272499 HTTP:  #007: GET 
/_changes?feed=normal&heartbeat=300000&style=all_docs
14:09:40.087660 HTTP:  #008: GET 
/_local/ec84eb927b395300b02eb279114fb2e8c71a5c46

After reloading the app on the tablet there are no items showing in the 
app. 

If I look at the couchbase server,  I don't seem to see any documents in 
either data bucket.  I do see for documents in the default bucket id'ed as
__flush_marker, _sync:seq, _sync:syncdata, _sync:user.

There are the same documents (except __flush_marker) in the sync_gateway 
bucket.

None of the documents appear to have anything to do with the grocery sync 
items.

I must be doing something wrong in setting up the sync gateway or the 
couchbase server since it works against the default coouchbase server/ sync 
gateway that couchbase has established testing.
Does anyone have an idea as to what I have done incorrectly.

I'm using this example to figure what needs to be done to my own android 
app that I am building that uses couchbase  lite and that I want to be able 
to sync a couchbase server.

Thanks,
Milt

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/8337f95a-e9ff-4972-887b-baef726a2689%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to