Jens - I have tried that.
Here is my json config for sync gateway.
{
"interface":":4984",
"adminInterface":":4985",
"verbose":true,
"log":["REST", "CRUD", "Shadow"],
"databases":{
"dbsync":{
"username": "Administrator",
"password": "SECRET",
"server":"http://MYSERVER:8091",
"bucket":"dbsync",
"sync":`function(doc) { if(doc.type=="co") channel(doc._id); else
channel(doc.co);}`,
"shadow": {
"server": "http://mydb:OTHERSECRET@MYSERVER:8091",
"bucket": "mydb"
}
}
}
}
The user/pass are the same I login to my couchbase console with.
The error I'm seeing is:
20:59:50.260325 Enabling logging: [REST CRUD Shadow]
20:59:50.260921 ==== Couchbase Sync Gateway/1.00 (1.0.1-18; commit
81a69a16) ====
20:59:50.261131 Configured Go to use all 2 CPUs; setenv GOMAXPROCS to
override this
20:59:50.261350 Opening db /dbsync as bucket "dbsync", pool "default",
server <http://MYSERVER:8091>
20:59:50.261597 Opening Couchbase database dbsync on <http://MYSERVER:8091>
as user "Administrator"
20:59:50.549766 WARNING: Error from Incr in _reserveSequences(0):
MCResponse status=0x20, opcode=SASL_AUTH, opaque=0, msg: Auth failure --
db.(*sequenceAllocator)._reserveSequences() at sequence_allocator.go:59
20:59:50.549954 FATAL: Error opening database: MCResponse status=0x20,
opcode=SASL_AUTH, opaque=0, msg: Auth failure -- rest.RunServer() at
config.go:358
Again, I'm sure it's some misconfiguration on my part but I can't seem to
figure it out. Thanks.
On Tuesday, August 5, 2014 5:31:21 PM UTC-5, Jeremy Kelley wrote:
>
> I'm sure I'm missing something obvious but I'm trying to get syncgateway
> to connect to a bucket that is password protected.
>
> I have tried setting something like
>
> ...
> "databases":{ "mysyncdb": {
> "server":"http://mysyncdb:[email protected]",
> ...
> } } ...
>
>
> I've tried setting a separate "password" key in the database stanza.
>
> I found a pull request that mentioned how to do this for shadowed buckets
> (put the name of the bucket as the username).
>
> This is the error I'm seeing.
>
> 18:28:37.187523 FATAL: Error opening database: 502 Unable to connect to
> server: HTTP error 401 Unauthorized getting "
> http://db-00.lvlr.io:8091/pools": -- rest.RunServer() at config.go:358
>
> Am I missing something obvious?
>
>
> I'll admit I've not dug into the actual source of sync gateway yet, but
> that's next.
>
> Thanks.
>
> -jeremy
>
--
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/bff66ea6-56d9-408d-b12e-d84be132ff57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.