Thanks Jens. I wanted to test that suggestion but sync-gateway (1.0.3) doesn't accept any config files:
$ /opt/couchbase-sync-gateway/bin/sync_gateway -url http://localhost:8091 -bucket eponyms couchbase-sync-gateway.json 16:43:21.989336 FATAL: Error reading config file couchbase-sync-gateway.json: json: cannot unmarshal array into Go value of type db.PrincipalConfig -- rest.ParseCommandLine() at config.go:294 $ /opt/couchbase-sync-gateway/bin/sync_gateway -url http://localhost:8091 -bucket eponyms 16:43:26.697926 ==== Couchbase Sync Gateway/1.0.3(81;fa9a6e7) ==== 16:43:26.698367 Opening db /eponyms as bucket "eponyms", pool "default", server <http://localhost:8091> 16:43:26.698529 Opening Couchbase database eponyms on <http://localhost:8091> 16:43:26.703177 FATAL: Error opening database: 502 Unable to connect to server: HTTP error 401 Unauthorized getting "http://localhost:8091/pools": -- rest.RunServer() at config.go:415 I stripped the config file down to the following, still no success: $ cat couchbase-sync-gateway.json { "interface": ":4984", "adminInterface": ":4985", "log": ["REST"], "databases": { "eponyms": { "server": "http://localhost:8091", "bucket": "eponyms", "users": { "GUEST": {"disabled": false}, "admin_channels": ["public"] } } } } Any ideas what might be causing this? Seems to be valid JSON. Thanks Pascal On Monday, February 23, 2015 at 5:23:31 PM UTC+1, Jens Alfke wrote: > > > On Feb 22, 2015, at 11:59 PM, Pascal <[email protected] <javascript:>> > wrote: > > a) if it's correct that the sync gateway connects to the admin port (8091 > by default) instead of the API port – the docs do not mention either but > always use the default admin port > > > I’m not clear on the distinction between those ports. 8091 is the REST API > that’s used to discover the cluster topology and find the API address/ports > of the individual nodes. > > b) how the sync gateway authenticates with the server – there are no > documented command line or config options for authentication > > > There are optional “username” and “password” fields in the db config > object. > > —Jens > -- 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/9b3708d9-0707-4877-8b2b-de2d101a525e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
