Unable to bulk load JSON

#1

Hello,

I have 4000 JSON I need to bulk load them into a bucket called mybucket; trying to do it I have the following error;
this is Couchbase Server 3.0.3 (Ubuntu server). My JSON files are under json_test directory and I am running the command from a directory parent of json_test directory.

root@couchbase-01:/var/www/html# /opt/couchbase/bin/cbdocloader -u Administrator -p pwd123 -n ...:8091 -b mybucket -s 120 json_test/
[2015-07-12 10:07:58,820] - [rest_client] [140700944312128] - INFO - http://
...**:8091//pools/default/buckets with param: proxyPort=11211&bucketType=membase&authType=sasl&name=mybucket&replicaNumber=1&saslPassword=&ramQuotaMB=120
…Fail to create bucket ‘mybucket’ within 120 seconds
root@couchbase-01:/var/www/html#

#2

I was checking this code ;


looks like the cbdocloader code has a bug ; the exception Fail to create bucket ‘mybucket’ within 120 seconds raises when the bucket doesn’t exist. In my case it exists but still throwing the error …
Anyone from couchbase team can help here?
Thanks
W

#3

I even tried on windows installation , but still failing with the same error …
Any idea @ingenthr thanks

C:\Program Files\Couchbase\Server\bin>cbdocloader -u Administrator -p pass123 -n 159.7.23.101:8091 -b default -s 120 c:\post_140193.zip
[2015-07-13 10:24:10,487] - [rest_client] [26352] - INFO - http://159.7.23.101:8091//pools/default/buckets with param: proxyPort=11211&bucketType=membase&authType=sasl&name=default&replicaNumber=1&saslPassword=&ramQuotaMB=120
[2015-07-13 10:24:10,628] - [rest_client] [26352] - ERROR - http://159.7.23.101:8091//pools/default/buckets error 400 reason: Bucket with given name already exists {“errors”:{“name”:“Bucket with given name already exists”},“summaries”:{“ramSummary”:{“total”:11340349440,“otherBuckets”:9625927680,“nodesCount”:3,“perNodeMegs”:120,“thisAlloc”:377487360,“thisUsed”:0,“free”:1336934400},“hddSummary”:{“total”:78104875008,“otherData”:8798594119,“otherBuckets”:53291714,“thisUsed”:0,“free”:69252989175}}}
…Fail to create bucket ‘default’ within 120 seconds

C:\Program Files\Couchbase\Server\bin>cbdocloader -u Administrator -p pass123 -n 159.7.23.101:8091 -b default c:\post_140193.zip
[2015-07-13 10:27:23,499] - [rest_client] [23748] - INFO - http://159.7.23.101:8091//pools/default/buckets with param: proxyPort=11211&bucketType=membase&authType=sasl&name=default&replicaNumber=1&saslPassword=&ramQuotaMB=100
[2015-07-13 10:27:23,621] - [rest_client] [23748] - ERROR - http://159.7.23.101:8091//pools/default/buckets error 400 reason: Bucket with given name already exists {“errors”:{“name”:“Bucket with given name already exists”},“summaries”:{“ramSummary”:{“total”:11340349440,“otherBuckets”:9625927680,“nodesCount”:3,“perNodeMegs”:100,“thisAlloc”:314572800,“thisUsed”:0,“free”:1399848960},“hddSummary”:{“total”:78104875008,“otherData”:8798594119,“otherBuckets”:53291714,“thisUsed”:0,“free”:69252989175}}}
…Fail to create bucket ‘default’ within 120 seconds

C:\Program Files\Couchbase\Server\bin>cbdocloader -u Administrator -p pass123 -n 159.7.23.101:8091 -b test c:\post_140193.zip
[2015-07-13 10:34:34,262] - [rest_client] [22496] - INFO - http://159.7.23.101:8091//pools/default/buckets with param: proxyPort=11211&bucketType=membase&authType=sasl&name=test&replicaNumber=1&saslPassword=&ramQuotaMB=100
…Fail to create bucket ‘test’ within 120 seconds

C:\Program Files\Couchbase\Server\bin>

Insert JSON file in PHP
#4

Hey @ingenthr any ideas here ?

#5

Can you actually connect to that host/port with the specified credentials? Try a simple test (from the same machine you are trying to run cbdocloader from - for example check you can retrieve general cluster information:

curl -u [admin]:[password] http://[hostname]:8091/pools