Michael Cera
Michael Cera

Reputation: 143

Elasticsearch | failed to create river

I'm newbie with Elasticsearch and trying to get it up running on my OS X but I end up with failing creating a river.

I'm still little bit confused about it but I will try to provide as much information as I have.

What I got installed:

Elasticsearch 1.4.2
elasticsearch-river-jdbc-2.3.1.jar
mysql-connector-java-5.1.33-bin.jar

how I am doing it:

curl -XPUT 'localhost:9200/_river/search_river_1/_meta' -d '{
    "type" : "jdbc",
    "jdbc" : {
        "url" : "jdbc:mysql://localhost:3306/licklist",
        "user" : "my_user",
        "password" : "my_password",
        "sql" : "select sv.*, 16 AS weight from search_venues sv",
        "index" : "search",
        "type" : "Venue",
        "max_bulk_requests" : 5,
        "bulk_flush_interval" : "50s"
    }
}'

response is:

{
  "_index": "_river",
  "_type": "search_river_1",
  "_id": "_meta",
  "_version": 6,
  "created": false
}

When I looked into the log I saw this:

[2015-01-09 08:51:23,179][INFO ][cluster.metadata         ] [Paradigm] [_river] creating index, cause [auto(index api)], shards [1]/[1], mappings [search_river_1]
[2015-01-09 08:51:24,685][INFO ][cluster.metadata         ] [Paradigm] [_river] update_mapping            [search_river_1] (dynamic)
[2015-01-09 08:51:25,064][WARN ][river                    ] [Paradigm] failed to create river [jdbc][search_river_1]
org.elasticsearch.common.inject.CreationException: Guice creation errors:

1) Error injecting constructor, java.lang.NoSuchMethodError:     org.xbib.elasticsearch.river.jdbc.RiverSource.driver(Ljava/lang/String;)Lorg/xbib/elasticsearch/river/jd    bc/RiverSource;
  at org.xbib.elasticsearch.river.jdbc.JDBCRiver.<init>(Unknown Source)
  while locating org.xbib.elasticsearch.river.jdbc.JDBCRiver
  while locating org.elasticsearch.river.River

Thank you

EDIT: another line from log:

Caused by: java.lang.NoSuchMethodError: org.xbib.elasticsearch.river.jdbc.RiverSource.driver(Ljava/lang/String;)Lorg/xbib/elasticsearch/river/jdbc/RiverSource;

Upvotes: 0

Views: 600

Answers (1)

Fritz Batroni
Fritz Batroni

Reputation: 26

Check your Mongo version.

I've had similar issues. From my experience it's because of not following the compatibility matrix - there are strict requirements for which versions of the rivers go with what versions of elasticsearch. Even the version of the elasticsearch-mapper-attachments plugin needs to match.

Since you're using ES 1.4.2 - I'd make sure you're running at least MongoDB 2.6.6. On my mac I'm running 1.4.2 with Mongo 2.6.7 and elasticsearch-mapper-attachments 2.4.1.

This is the very minimum you need to do before troubleshooting any further or you will be pulling your hair out because each Java exception thrown can lead your further and further down the rabbit hole.

Here are the links:
https://github.com/elasticsearch/elasticsearch-mapper-attachments https://github.com/richardwilly98/elasticsearch-river-mongodb

Upvotes: 1

Related Questions