Couchbase -> Elasticsearch tutorial fails

808 views
Skip to first unread message

Francis Varga

unread,
Aug 23, 2013, 6:04:02 AM8/23/13
to couchba...@googlegroups.com
-d @plugins/transport-couchbase/couchbase_template.json
But i get always an error:
{"error":"ElasticSearchParseException[Failed to derive xcontent from org.elasticsearch.common.bytes.ChannelBufferBytesReference@2346d0e8]","status":400}

Any suggestions for this?

Cheers

Marty Schoch

unread,
Aug 23, 2013, 9:46:43 AM8/23/13
to couchba...@googlegroups.com
I have not seen this error before.  What version of Couchbase and Elasticsearch are you running?

Also, can you paste the full stack trace from Elasticsearch, that will up us identify what the plugin may be doing when this error occurs.

Thanks,
marty


--
Couchbase 2.0 is Here!: http://www.couchbase.com/download
Couchbase 2.0 Learn: http://www.couchbase.com/learn
Couchbase Forums: http://www.couchbase.com/forums
---
You received this message because you are subscribed to the Google Groups "Couchbase Team 8091" group.
To unsubscribe from this group and stop receiving emails from it, send an email to couchbase-809...@googlegroups.com.
To post to this group, send email to couchba...@googlegroups.com.
Visit this group at http://groups.google.com/group/couchbase-8091.
To view this discussion on the web visit https://groups.google.com/d/msgid/couchbase-8091/etPan.52173392.2cd89a32.f340%40Franciss-MacBook-Pro.local.
For more options, visit https://groups.google.com/groups/opt_out.

Francis Varga

unread,
Aug 23, 2013, 4:18:30 PM8/23/13
to couchba...@googlegroups.com, Marty Schoch
I'm using the Mac Version of Couchbase + Elasticsearch Version: 0.90.3, Build: 5c38d60/2013-08-06T13:18:31Z, JVM: 1.7.0_25

what do you mean with "full stack trace"?

Cheers
-- 
Francis Varga

Marty Schoch

unread,
Aug 23, 2013, 4:27:53 PM8/23/13
to couchba...@googlegroups.com
We have not tested with 0.90.3 its possible there are more incompatibilities there.  Is it possible for you to try with 0.90.2?

Generally an error of the sort you described will be come with a full stack trace in the logs.  This has many lines of output showing the stack of the thread that encountered the exception.  Frequently this includes line numbers pointing to where the source of the problem is.

So the first question is where are you seeing this error?  In the Couchbase UI?  In a Couchbase log?  In the console where you started Elasticsearch?  In an Elasticsearch log file?

marty


Francis Varga

unread,
Aug 23, 2013, 4:36:26 PM8/23/13
to Marty Schoch, couchba...@googlegroups.com
Here the full history:

elasticsearch -v
ElasticSearch Version: 0.90.2, JVM: 1.7.0_25(23.25-b01)
Franciss-MacBook-Pro:Formula$ curl -XPUT http://localhost:9200/_template/couchbase \
> -d @plugins/transport-couchbase/couchbase_template.json
Warning: Couldn't read data from file
Warning: "plugins/transport-couchbase/couchbase_template.json", this makes an
Warning: empty POST.
{"error":"ElasticSearchParseException[Failed to derive xcontent from org.elasticsearch.common.bytes.BytesArray@0]","status":400}

Thx. for your help.

On August 24, 2013 at 4:27:55 AM, Marty Schoch (marty....@gmail.com) wrote:
We have not tested with 0.90.3 its possible there are more incompatibilities there.  Is it possible for you to try with 0.90.2?

Generally an error of the sort you described will be come with a full stack trace in the logs.  This has many lines of output showing the stack of the thread that encountered the exception.  Frequently this includes line numbers pointing to where the source of the problem is.

So the first question is where are you seeing this error?  In the Couchbase UI?  In a Couchbase log?  In the console where you started Elasticsearch?  In an Elasticsearch log file?

Directly in the terminal/console. When i'm executing the command.

Jasdeep Jaitla

unread,
Nov 12, 2013, 9:00:27 PM11/12/13
to couchba...@googlegroups.com
Reopening this thread since it seems to be happening to me :):

I am using Elastic Search 90.5 and CB 2.2.2 on Mac OS X - Mavericks

$ usr/local/Cellar/elasticsearch/0.90.5/bin/plugin -install transport-couchbase -url http://packages.couchbase.com.s3.amazonaws.com/releases/elastic-search-adapter/1.2.0/elasticsearch-transport-couchbase-1.2.0.zip

-> Installing transport-couchbase...
Downloading .....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................DONE
Installed transport-couchbase into /usr/local/var/lib/elasticsearch/plugins/transport-couchbase

$ curl -XPUT http://localhost:9200/_template/couchbase -d @plugins/transport-couchbase/couchbase_template.json

Warning: Couldn't read data from file
Warning: "plugins/transport-couchbase/couchbase_template.json", this makes an
Warning: empty POST.
{"error":"ElasticSearchParseException[Failed to derive xcontent from org.elasticsearch.common.bytes.BytesArray@0]","status":400}

Jasdeep Jaitla

unread,
Nov 12, 2013, 9:04:37 PM11/12/13
to couchba...@googlegroups.com
I also get this error:

I am doing it from cbdocs bucket to cbdocs es index.

  • 2013-11-12 18:02:22 [Vb Rep] Error replicating vbucket 63. Please see logs for details.

and my elastic search config (elasticsearch.yml) has:

couchbase.username: Administrator
couchbase.password: asdfasdf
couchbase.num_vbuckets: 64
couchbase.port: 9091
couchbase.defaultDocumentType: cbdoc

Jasdeep Jaitla

unread,
Nov 12, 2013, 9:08:54 PM11/12/13
to couchba...@googlegroups.com
Ok that one I fixed by changing the XDCR protocol to Version 1 (it’s version 2 by default). But the whole template thing didn’t work but I am not familiar with what the template is needed for…

-- 
Couchbase 2.0 is Here!: http://www.couchbase.com/download
Couchbase 2.0 Learn: http://www.couchbase.com/learn
Couchbase Forums: http://www.couchbase.com/forums
--- 
You received this message because you are subscribed to the Google Groups "Couchbase Team 8091" group.
To unsubscribe from this group and stop receiving emails from it, send an email to couchbase-809...@googlegroups.com.
To post to this group, send email to couchba...@googlegroups.com.
Visit this group at http://groups.google.com/group/couchbase-8091.
signature.asc

Jasdeep Jaitla

unread,
Nov 12, 2013, 9:23:44 PM11/12/13
to couchba...@googlegroups.com
Ok to fix this issue… then you don’t have to curl -XPUT 

$ cd [path_to]/elasticsearch/config
$ mkdir templates
$ cd templates
$ cp [path_to]/plugins/transport-couchbase/couchbase_template.json .

restart elastic search
signature.asc

Marty Schoch

unread,
Nov 13, 2013, 8:55:08 AM11/13/13
to couchba...@googlegroups.com
The error message reported here is curl telling the user that the file cannot be found.  The tutorial includes a step to change directory into the Elasticsearch installation directory, and its expected that all subsequent commands are executed from there.  If not, you'll have to adjust the paths accordingly.  If <elasticsearch>/plugins/transport-couchbase/couchbase_template.json doesn't exist, that would be a bug.

I'm not exactly sure what you mean by "you don’t have to curl -XPUT".  If you mean this step can be omitted, that is true, but you will not have the couchbase defaults installed.

marty

Jasdeep Jaitla

unread,
Nov 13, 2013, 10:18:12 AM11/13/13
to couchba...@googlegroups.com, couchba...@googlegroups.com
You can alternatively just copy the JSON template file into elasticsearch/config/templates and on startup it will import it automatically...


Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages