Couchbase Server 4.0 is now GA!

Couchbase 4.0 with the N1QL Query Language and a new Global Secondary Indexing service among many other features is now available. The downloads are at the usual place along with the release notes. Either hit the simple getting started path or the Concepts and architecture or the Developer guide for more info.

More detail:

Couchbase Server 4.0 being a major release, it includes major new functionality. Developer productivity and agility, while continuing to scale and perform were the major themes among a multitude of other features. Allow me to describe just a little further.

Across the new generation of ‘NoSQL’ databases, the team at Couchbase had noticed that frequently developers had to compromise either the way they model their data or twist the system in unusual ways to really be able to access the data the way people think. To solve this, Couchbase 4.0 does something different; it brings SQL back to NoSQL in something we call N1QL. Through N1QL, developers now have the flexibility and agility of working with JSON combined with a newfound agility of querying data as you see fit on a distributed system. Oh, and by the way, that includes language level support for Java, an implementation of LINQ for .NET, higher level frameworks like Ottoman for Node.js and even JDBC and ODBC connectors for those who want to use existing tools expecting those interfaces.

Performing and scaling these new capabilities at the level our users have come to expect is non-trivial, but we think we have the right architecture and we are really happy with our results so far. A new secondary indexing service with a unique approach to distributing indexes with what we call Global Secondary Indexes gives queries the power they need to be flexible and responsive to your demands as a developer. While at it, we also came up with a way to make it easy to scale services independently on the cluster. We call this Multidimensional Scaling.

There is, of course, much more but that’s what the new exists to describe. So, to get started…

Download Couchbase 4.0, check out the Release Notes to get the highlights on what has changed or read Anil’s blog. If you’re new, try walking through the Getting Started followed by one of the tutorials (like Java, .NET or Node.js). Post questions and feedback here on the blog.

Before I close, I’d like to extend a very humble thanks to all of those who have given us feedback over the course of the preview, beta and release candidate. With your help, I know we’ve turned out an awesome release and I can’t wait to see what you will deploy using 4.0.




Installed couchbase-server-enterprise_4.0.0-windows_amd64.exe on my laptop Windows 10 with 8GB RAM.
Loaded beer-sample seeing item count: 7303

Tried N1ql starting by indexing and this is the response:

“requestID”: “10ee0bb4-8540-4c0a-90c7-d56f5caae64b”,
“signature”: null,
“results”: [
“errors”: [
“code”: 5000,
“msg”: “GSI CreatePrimaryIndex() - cause: Request Timeout”
“status”: “errors”,
“metrics”: {
“elapsedTime”: “2m0.3380657s”,
“executionTime”: “2m0.3380657s”,
“resultCount”: 0,
“resultSize”: 0,
“errorCount”: 1

This was not tested with Windows 10, which is why it’s not listed as a supported platform. There is an open issue to add it as a supported platform.

So I tried to do some N1QL using the tutorial:

But when I click on ‘RUN’ I get no result in several browsers. Is this a known issue?

Hm, it does seem like something is amiss. Thanks for pointing it out-- we’ll check into it.

Thank you for bringing it to our attention. We have fixed the glitch, the N1QL tutorial is now working.
Please clear your browser cache and try again. Let us know if you encounter any issue.

It is working fine now.

I installed 4.0 on a Linux platform (CentOS 6.3) for evaluation. I got the same error when trying to create an index, which makes it impossible for me to evaluate N1QL.

create primary index on metadata using gsi;

“errors”: [
“code”: 5000,
“msg”: “GSI CreatePrimaryIndex() - cause: Request Timeout”

Also, the Index tab on the Couchbase Console reports:
Warning: We are having troubles communicating to the indexer process. The information might be stale.

Seems like some indexer processes are having trouble talking to each other?

The indexer log shows:
2015-10-16T08:52:13.752Z-06:00 [Info] KVSender::sendShutdownTopic Projector Topic MAINT_STREAM_TOPIC_f8:eb:3e:ce:0:ec:fc:a0
2015-10-16T08:52:13.821Z-06:00 [Fatal] KVSender::sendShutdownTopic Unexpected Error During Shutdown Projector Topic MAINT_STREAM_TOPIC_f8:eb:3e:ce:0:ec:fc:a0. Err proto: protobuf.Error: wiretype end group for non-group
2015-10-16T08:52:13.821Z-06:00 [Error] KVSender::closeMutationStream MAINT_STREAM Error Received proto: protobuf.Error: wiretype end group for non-group from
2015-10-16T08:52:14.821Z-06:00 [Error] KVSender::closeMutationStream MAINT_STREAM Error Received proto: protobuf.Error: wiretype end group for non-group
2015-10-16T08:52:14.821Z-06:00 [Error] Indexer::closeAllStreams Stream MAINT_STREAM Error from Projector proto: protobuf.Error: wiretype end group for non-group. Retrying.

And the error log:
[ns_server:error,2015-10-16T08:53:40.718-06:00,<0.1326.0>:index_rest:get_json:45]Request to failed: {error,

You forgot to put `` around bucket name like `beer-sample`
I did try install couchbase enterprise 4.0.0 on windows 10 professional 64-bit.
Create beer-sample bucket in setting tab on browser.
Then in windows 10, open DOS command windows.
Go to couchbase bin directory
C:\Program Files\Couchbase\Server\bin
and run cbq.exe
Then run command to create primary index
cbq.exe> create primary index on `beer-sample` using gsi;
It ran without any error. Check in browser, index of beer-sample was created
Here is the output from the run

cbq.exe> create primary index on `beer-sample` using gsi;
“requestID”: “99b5d07f-dcbc-4fc5-b38b-2f89aec23036”,
“signature”: null,
“results”: [
“status”: “success”,
“metrics”: {
“elapsedTime”: “3.2359897s”,
“executionTime”: “3.2349923s”,
“resultCount”: 0,
“resultSize”: 0


Hi ilam,
Looks like LENGTH is not working in v 4.0

You are right. There is a bug in the tutorial, and we’ll get it fixed. For now - for
please make the typo correction manually and run it, and it should work.

SELECT fname, email, children
FROM tutorial
WHERE ARRAY_LENGTH(children) > 0 AND email LIKE ‘

How pass username and password for a bucket using CBQ tool?

To specify a username and password with cbq with 4.1 and 4.0 pls use the --engine setting. “default1” is the bucket name and “couchbase” is the password in the example below.
./cbq “–engine=http://default1:couchbase@”

Thank you.
One last question.
I got a
"errors": [
“code”: 12015,
“msg”: “Index scan timed out - cause: Index scan timed out”
where can I configure a bigger timeout?
thanks again.

1 Like