2015-08-21 43 views
2

我想使用cbdocloader tool從壓縮文件(每個JSON文檔位於它自己的文件中,並且該文件以id.json命名)將多個JSON文檔添加到我的couchbase服務器。使用以下命令語法Couchbase cbdocloader錯誤

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

不過,我得到如下回應

[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}}} 

是一個完整的福利局到couchbase我不知道我做錯了嗎?我試過用-s指定一個較低的配額,但它不允許少於100?在couchbase控制檯中它說我有2.3GB的分配給集羣。

回答

2

問題是示例數據桶(啤酒桶和默認桶)佔用了服務器的所有分配空間,如果我從控制檯中刪除了這些空間,我就可以運行該命令。現在要弄清楚爲什麼並非所有的zip文件都被加載。

+0

他們被裝載的控制檯限制了它顯示的文件數量,花了我一段時間才弄清楚了! – PDStat

1

您不需要刪除存儲桶,問題在於分配給每個存儲桶的RAM。

在我的情況下,服務器有2GB內存已分配,每個桶有100Mb分配,但默認存儲桶有2GB內存的其餘部分。

只需進入分配了最大內存量並編輯它的存儲桶。減少每個節點RAM配額,以便釋放新桶的內存。

希望這會有所幫助。