Cluster-init failing with "indexerStorageMode - Changing the optimization mode of global indexes is not supported"

Hello,

I am trying to create a new cluster from scratch. I followed the below steps to create a new cluster:
1.) started couchbase server using the command:

/opt/couchbase/bin/couchbase-server \-- -noinput -detached .

2.) Initialised node

/opt/couchbase/bin/couchbase-cli node-init  --cluster 127.0.0.1:8091 --username Administrator --password --node-init-data-path /data/cbase_stg/data_1  --node-init-index-path /data/cbase_stg/data_1 --node-init-analytics-path /data/cbase_stg/data_1  --node-init-hostname 127.0.0.1

3.) Initialised cluster

/opt/couchbase/bin/couchbase-cli cluster-init --cluster test-server.com:8091 --cluster-username Administrator --cluster-password $password --cluster-ramsize 2000 --cluster-name cbase_stg --cluster-index-ramsize 256  --cluster-fts-ramsize 256  --cluster-eventing-ramsize 256 --cluster-analytics-ramsize 1024 --services data,index,query

The first two commands run successfully but cluster-init command is failing with the below error:

ERROR: indexerStorageMode - Changing the optimization mode of global indexes is not supported when index service nodes are present in the cluster. Please remove all index service nodes to change this option.

I don’t have any data in the cluster yet. And I did not modify the indexerStorageMode as you can see in the first two commands.

Can someone please help me understand what I am doing wrong?

What version of CB are you running? I seem to recall an issue in older versions where the error being returned isn’t actually the error that it’s hitting…

Just to confirm, are you able to setup the node/cluster from the UI after starting it?

--index-storage-setting default

to step 3 Like


/opt/couchbase/bin/couchbase-cli cluster-init -c localhost --cluster-username Administrator --cluster-password password --services $service  --cluster-ramsize $ramsize --cluster-index-ramsize $ramsize --index-storage-setting default

I am running couchbase version 7.1.3.
I am actually writing an automation script with these steps. So, setting up with the UI might not be a viable option for me.

I did try with both “default” and “memopt” infact.
But, hitting the same issue with both the settings.

Hello @ayesha.rustgi

I tried your steps on my Ubuntu18 virtual machine using Couchbase Server 7.1.3 Enterprise Edition and they worked without issue:

$ sudo mkdir  /data
$ sudo chown couchbase:couchbase /data
$ /opt/couchbase/bin/couchbase-cli node-init  --cluster 127.0.0.1:8091 --username Administrator --password --node-init-data-path /data/cbase_stg/data_1  --node-init-index-path /data/cbase_stg/data_1 --node-init-analytics-path /data/cbase_stg/data_1  --node-init-hostname 127.0.0.1
Enter password: 
SUCCESS: Node initialized
$/opt/couchbase/bin/couchbase-cli cluster-init --cluster localhost:8091 --cluster-username Administrator --cluster-password password --cluster-ramsize 1000 --cluster-name cbase_stg --cluster-index-ramsize 256  --cluster-fts-ramsize 256  --cluster-eventing-ramsize 256 --cluster-analytics-ramsize 1024 --services data,index,query
SUCCESS: Cluster initialized

Which Edition of Couchbase Server are you using enterprise or community edition?

Can you please try the cluster-init command with --cluster 127.0.0.1:8091 instead of --cluster test-server.com:8091. I want to ensure that it’s the same cluster that’s being talked to in both commands.

Hi @pvarley , thanks for the response.

I just tried this with the command with 127.0.0.1 as you suggested, but it still fails with the same error.
I am using enterprise edition.

Also, I had a strange observation, when I try to run this series of commands on a host with fresh installation, everything works well.
But, when I destroy that server and try to create a new server on the same host, I hit this error.

But, when I destroy that server and try to create a new server on the same host, I hit this error.

Are you clearing out the config? How are you destroy everything?

Yes, for destroying the cluster, I run

/opt/couchbase/bin/couchbase-server -k

And, then I go again and clean the config folder and data folder.

I wonder if there are some processes still running that are holding open those config files. Can you check the process list after you run /opt/couchbase/bin/couchbase-server -k?

Yes, i was running the shutdown command, and no processes were running after that.
But, interestingly, deletion of /opt/couchbase/var/lib/couchbase/config helped in getting this sorted out.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.