Error code 5000, msg: "GSI CreateIndex() - cause: Fails to create index

query
index

#1

Ref: Server Community Edition 6.0.0 build 1693" on Windows 10.

Hello everyone, following the video tutorial " Getting started with ASP.NET Core and Couchbase" I have created the bucket, entered the two documents, but when tried to create the index "CREATE INDEX ix_type ON demo(type); " I’ve got the error code 5000 with msg: “GSI CreateIndex() - cause: Fails to create index. There is no available index service that can process this request at this time. Index Service can be in bootstrap, recovery, or non-reachable. Please retry the operation at a later time.”,
“query_from_user”: “CREATE INDEX ix_type ON demo(type);”

I have reinstalled Couchbase Server Community, but still when I go to ClusterName>Indexes I get “You have no GSI indexes yet.”

My browser console shows two errors:


#2

Hi @AnassL,

Can you please let us know if the index service is enabled when setting-up the cluster. You can find this by looking into the “servers” page on the Web UI. You should see “index” under the services column if the index service is enabled (Please refer to the below screenshot for reference)

If the index service is not enabled, then the error is expected. Please add index service when setting up the cluster.

If the index service is enabled and error is seen, then can you kindly share us the logs. Please refer to the “Couchbase server logs” section in https://www.couchbase.com/support/working-with-technical-support to understand the procedure for collecting logs. (Below is a screenshot for your reference)

Thanks,
Varun


#3

Thanks Varun,

After reinstalled Couchbase, I found that the machine became very slow, so I stopped Analytics and Eventing services, for the moment it is working and I am waiting to see how things would go. I guess it was a memory issue since Couchbase was installed in a 5GB RAM virtual machine and shared that memory with other applications, so I have to test it in a dedicated machine.

Now it is needed to find a Linux distro compatible with the latest Couchbase version, to run a new virtual machine on Hyper-V server.

  • So please kindly advise how to get started quickly with a Linux database server ?

  • Is it possible to have a cluster with different node types, e.g. a Windows node and a Linux node ?

Thank you.


#4

Hi @AnassL,

You can look at https://docs.couchbase.com/server/6.0/install/install-linux.html to get started with Linux distributions.

Reg. your query on having a cluster with different node types, we do not recommend this approach, though theoretically it might work. We advise against having such deployments.

Thanks,
Varun


#6

Hi @AnassL,

I am not able to download the logs from AWS (I am checking internally on that). In the mean time, Can you kindly attach the zip file along with the issue (or) upload the zip file in google-drive and share the link.

Thanks,
Varun


#8

Hi @AnassL,

I observe from the logs that 2 processes are listening to 0.0.0.0:9999. It is expected that the ports mentioned in https://docs.couchbase.com/server/6.0/install/install-ports.html remain available and open for couchbase-server to operate correctly. Also, it looks like the port is blocked by firewall.

Please check the firewall and open the port 9999 if it is blocked. Also, make sure that it is open and available.

Thanks,
Varun


#9

Hi Varun,
I have allowed the following Firewall Inbound rule:
Couchbase - Node-to-nod in a single cluster 4369, 8091-8096, 9100-9105, 9110-9118, 9120-9122, 9999, 11209, 11210, 18094, 21100-21299

from the localhost itself I run the following command:
netstat -an
The result shows that 0.0.0.0 is listening on 9999

I tried again to run the Query “CREATE INDEX ix_type ON MyBucket(type);”but it still throws the same error.


#10

Hi @AnassL

What process is running on port 9999? I noticed that it was java.exe earlier. Can we make that process use a different port, restart couchbase-server and try-again?

Thanks,
Varun


#11

Hi Varun,

Thank you for your reply, They were two services using 9999 port:

  • SSWebSrv .exe PID:4508 taking 51 Mo
  • projector.exe PID:4908 taking 12 Mo

I 've uninstalled SmarterStats (SSWebSrv.exe), then the Query run successfully, so thank you very much for your help.

In other hand, I had to run Couchbase on this machine just to see why it extremely slows my other machine which is using Windows Server 2012 R2, at the point where sometimes it stuck.

Running the resource monitor on Windows Server machine shows an important activity on the CPU, it mostly reaches 100%, the following processes have the most important impact: erl.exe (33%) and memcatched.exe (28%). I would like to ask you if is there any way to reduce this impact.


#12

Hi @AnassL,

Good to hear that the query ran successfully.

Reg. your second question as to why your machine is slow, there can be many factors influencing the performance of the system. E.g., Number of processors, Available memory, number of documents in the bucket, size of documents etc. Please refer to the sizing guidelines (https://docs.couchbase.com/server/6.0/install/sizing-general.html) to understand the performance needs of a node. Also, the blogposts: https://blog.couchbase.com/how-many-nodes-part-1-introduction-sizing-couchbase-server-20-cluster/ can give a deeper understanding on how to size the nodes in a cluster.

Thanks,
Varun