Details
-
Bug
-
Resolution: Fixed
-
Major
-
Cheshire-Cat
-
Untriaged
-
1
-
Unknown
Description
It has been observed that the cbq is not accepting the credentials within the url to access all the buckets as mentioned in document from 6.5 (below url). Sometimes it connects but again when query is executed, then error is thrown - "Unable to authorize user. - cause: Authentication failure".
The cbq works only when -u/-p option mentioned. Either, we should fix the document or fix the tool. Also, why sometimes it can connect is also not clear or not consistent.
https://docs.couchbase.com/server/current/tools/cbq-shell.html
Trying as below
$ ./cbq -engine="http://Administrator:password@172.23.96.189:8091/"
similar to the one mentioned in doc.
$ ./cbq -engine="http://Administrator:password@123.45.67.89:8091/"
Build: Enterprise Edition 7.0.0 build 2730
[root@localhost bin]# ./cbq -engine="http://Administrator:password@172.23.96.189:8091/"
|
No input credentials. In order to connect to a server with authentication, please provide credentials.
|
ERROR 100 : N1QL: Connection failure {
|
"requestID": "4ba86ebe-334a-4d23-97fa-239f5be0770d",
|
"signature": "number",
|
"results": [
|
],
|
"errors": [
|
{
|
"code": 10000,
|
"msg": "Unable to authorize user. - cause: Authentication failure"
|
}
|
],
|
"status": "errors",
|
"metrics": {
|
"elapsedTime": "2.671997ms",
|
"executionTime": "2.526361ms",
|
"resultCount": 0,
|
"resultSize": 0,
|
"errorCount": 1
|
}
|
}
|
|
|
|
Path to history file for the shell : /root/.cbq_history
|
cbq> \QUIT;
|
[root@localhost bin]# ./cbq -engine "http://Administrator:password@172.23.96.189:8091/"
|
No input credentials. In order to connect to a server with authentication, please provide credentials.
|
ERROR 100 : Request failed with error code 401.
|
|
|
Path to history file for the shell : /root/.cbq_history
|
cbq> \QUIT;
|
[root@localhost bin]#
|
Sometimes, it showed connected but when executed the query, then throws the connection failure.
[root@localhost bin]# ./cbq -engine "http://Administrator:password@172.23.96.189:8091/"
|
No input credentials. In order to connect to a server with authentication, please provide credentials.
|
ERROR 100 : N1QL: Connection failure {
|
"requestID": "a9ba797e-0fac-4cb8-ad48-836822f7df56",
|
"signature": "number",
|
"results": [
|
],
|
"errors": [
|
{
|
"code": 10000,
|
"msg": "Unable to authorize user. - cause: Authentication failure"
|
}
|
],
|
"status": "errors",
|
"metrics": {
|
"elapsedTime": "1.958806ms",
|
"executionTime": "1.768942ms",
|
"resultCount": 0,
|
"resultSize": 0,
|
"errorCount": 1
|
}
|
}
|
|
|
Path to history file for the shell : /root/.cbq_history
|
cbq> \QUIT;
|
[root@localhost bin]#
|
[root@localhost bin]#
|
[root@localhost bin]# ./cbq -engine "http://Administrator:password@172.23.96.189:8091/"
|
No input credentials. In order to connect to a server with authentication, please provide credentials.
|
Connected to : http://Administrator:password@172.23.96.189:8091/. Type Ctrl-D or \QUIT to exit.
|
|
Path to history file for the shell : /root/.cbq_history
|
cbq> SELECT 'hello' as greeting;
|
{
|
"requestID": "3be8e2c0-8460-4eff-bc96-fc8fa2ac87fe",
|
"signature": {
|
"greeting": "string"
|
},
|
"results": [
|
],
|
"errors": [
|
{
|
"code": 10000,
|
"msg": "Unable to authorize user. - cause: Authentication failure"
|
}
|
],
|
"status": "errors",
|
"metrics": {
|
"elapsedTime": "1.543517ms",
|
"executionTime": "1.420203ms",
|
"resultCount": 0,
|
"resultSize": 0,
|
"errorCount": 1
|
}
|
}
|
cbq>
|
Attachments
For Gerrit Dashboard: MB-40709 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
134028,5 | MB-40709: Allow passing credentials through the server string input | master | query | Status: MERGED | +2 | +1 |