HTTP error 401 Unauthorized getting pools

I am getting the following error when I try and start the cbq-engine against my 2.2 cb server. Is there anything I need to do to pass along a username and password?

ZEN0049p:n1ql john.blayter$ ./cbq-engine -couchbase http://127.0.0.1:8091/
08:42:29.125970 FATAL: Unable to run server, err: Unable to access site http://127.0.0.1:8091/, err: HTTP error 401 Unauthorized getting "http://127.0.0.1:8091/pools": -- main.main() at main.go:62
ZEN0049p:n1ql john.blayter$

2 Answers

« Back to question.

To add to what Siri said there are actually 2 issues.

1. There is currently no support for querying password protected buckets (see https://www.couchbase.com/issues/browse/MB-9125)

2. If all your buckets are password protected, access to /pools on the server requires admin credentials (see https://www.couchbase.com/issues/browse/MB-9126)

If you add at least one non-password protected bucket you should be able to connect the query-engine, and you should be able to query this bucket.

Future releases should address these issues.

NOTE: this developer preview release is not intended to be used on production buckets

« Back to question.

Have you tried:

./cbq-engine -couchbase http://username:password@127.0.0.1:8091/

- or -

./cbq-engine -couchbase http://bucket_name:bucket_password@127.0.0.1:8091/

I would imagine that -u and -p options exist as well, but I haven't tested this.