N1QL and non-default buckets


#1

Have downloaded and implemented N1QL per instructions. I can query the beer-sample and default buckets successfully with cbq. However, when I try to query a new bucket I have created and loaded, I get the “Bucket xxxx does not exist” error.

What have I done wrong?

cbq> select count() from beer-sample
{
“resultset”: [
{
"$1": 7304
}
],
“info”: [
{
“caller”: “http_response:160”,
“code”: 100,
“key”: “total_rows”,
“message”: “1”
},
{
“caller”: “http_response:162”,
“code”: 101,
“key”: “total_elapsed_time”,
“message”: “1.2151215s”
}
]
}
cbq> select count(
) from trees
{
“error”:
{
“caller”: “standard:69”,
“cause”: “Bucket trees does not exist”,
“code”: 5000,
“key”: “Internal Error”,
“message”: “Optimizer Error”
}
}


#2

Hi,

Can you run

SELECT * FROM :system.buckets

and post the results?


#3

Sorry, I tried to post an update earlier and it didn’t take. I found the issue: I had entered a password in the Access Control config for the data buckets I created…which is apparently not needed/not valid. Once I blanked out that field, the bucket showed up and was available.


#4

Hi, Geraldss!
In my case,
only “SELECT * FROM :system.buckets” can run
"default" and other my own bucket return info :

cbq> SELECT * FROM default;
{
“error”:
{
“caller”: “view_index:200”,
“code”: 5000,
“key”: “Internal Error”,
“message”: “Bucket default not found.”
}
}

Can you help me ,tks!


#5

Hi,

Can you post the results from

SELECT * FROM :system.buckets?

Thanks.


#6

cbq> SELECT * FROM :system.buckets?
{
“resultset”: [
{
“id”: “beer-sample”,
“name”: “beer-sample”,
“pool_id”: “default”,
“site_id”: “http://10.105.10.85:8091/
},
{
“id”: “default”,
“name”: “default”,
“pool_id”: “default”,
“site_id”: “http://10.105.10.85:8091/
}
],
“info”: [
{
“caller”: “http_response:160”,
“code”: 100,
“key”: “total_rows”,
“message”: “2”
},
{
“caller”: “http_response:162”,
“code”: 101,
“key”: “total_elapsed_time”,
“message”: “12.616279ms”
}
]
}


#7

Hi,geraldss,
I find the error at cbq-engine’s logs:

11:09:20.167895 ERROR: Unable to access view - cause: error executing view req at http://lg-voip-signal01.bj:8092/default/_all_docs?limit=1001: 400 Bad Request - {“error”:“bad_request”,“reason”:"_all_docs is no longer supported"}

So ,it’s ok for me By :

CREATE PRIMARY INDEX ON beer-sample

Thanks.