Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couchbase cbdocloader errors

I am trying to add multiple JSON documents to my couchbase server from a zip file (each JSON document is in it's own file and the file is named after the id.json) using the cbdocloader tool. Using the following command syntax

./cbdocloader -n localhost:8091 -u Administrator -p xxx -b ships -s 100 ~/json-docs.zip

I am however getting the following response

[2015-08-21 21:08:35,522] - [rest_client] [140411799267072] - INFO - existing buckets : [u'beer-sample', u'default']
[2015-08-21 21:08:35,530] - [rest_client] [140411799267072] - INFO - http://localhost:8091//pools/default/buckets with param: proxyPort=11211&bucketType=membase&authType=sasl&name=ships&replicaNumber=1&saslPassword=&ramQuotaMB=100
[2015-08-21 21:08:35,543] - [rest_client] [140411799267072] - ERROR - http://localhost:8091//pools/default/buckets error 400 reason: Warning: you do not have enough servers to support this number of replicas., RAM quota specified is too large to be provisioned into this cluster. {"errors":{"ramQuotaMB":"RAM quota specified is too large to be provisioned into this cluster.","replicaNumber":"Warning: you do not have enough servers to support this number of replicas."},"summaries":{"ramSummary":{"total":2486173696,"otherBuckets":2486173696,"nodesCount":1,"perNodeMegs":100,"thisAlloc":104857600,"thisUsed":0,"free":-104857600},"hddSummary":{"total":6206062592,"otherData":5063150332,"otherBuckets":25820993,"thisUsed":0,"free":1117091267}}}

Being a complete newb to couchbase I'm not sure what I'm doing wrong? I've tried specifying a lower quota with -s but it doesn't allow less than 100? In the couchbase console it says I have 2.3GB allocated to the cluster.

like image 511
PDStat Avatar asked Aug 21 '15 20:08

PDStat


2 Answers

The issue was the sample data buckets (the beer and default buckets) were taking up all the allocated space for the server, if I deleted those from the console then I was able to run the command. Now to figure out why not all the documents in the zip are being loaded.

like image 189
PDStat Avatar answered Sep 30 '22 11:09

PDStat


You don't need to remove the buckets, the problem is with the RAM assigned to each bucket.

In my case, the server has 2GB RAM asigned and the each bucket has 100Mb assigned but the default bucket has the rest of the 2GB RAM.

Just get in to the bucket who has the max amount of memory assigned and edit it. Reduce the per Node RAM Quota so it frees memory for the new bucket.

Hope this helps.

like image 34
Ricardo Wing Alcázar Avatar answered Sep 30 '22 11:09

Ricardo Wing Alcázar