How to connect using cbq with https

We have installed 2 node Couchbase cluster.

I am connecting to one node with id cbadmin
and trying to connect via command prompt
/couchbase/opt/couchbase/bin
./cbq -e https://abc:18091 -key /couchbase/opt/couchbase/var/lib/couch fig/memcached-key.pem
ERROR 100 : N1QL: Need to pass both certfile and keyfile

Can you please mention how to connect if https is being used and where are my certfile and keyfile?

Also on the question of cluster with 2 nodes, should we connect via cluster vip and how to find out which instacne of Couchbase is installed on my servers?

Thanks

Can someone please help? We need to support this database for our new Business Unit. Any help from you will be much appreciated.

Hi,

You need to set up the certificates first and pass them in. Please see https://dzone.com/articles/n1ql-support-for-x509 and https://developer.couchbase.com/documentation/server/current/security/security-x509certsintro.html on how to set them up.

Then you can use the --cert, --key and --cacert options in cbq to connect. If you dont wish to use the certificates you can connect using --no-ssl-verify. But using this option means that the connection is not authenticated and you will not have access to protected operations.

The dzone article will give more insight into what is happening.

Thanks