CouchDB Integration - ClassNotFoundException[couchdb];

Hi, I'm having trouble integrating elasticsearch with couchdb.

I followed the instructions here: couchdb-integration but when searching (curl -XGET http://localhost:9200/doc_es_idx/_search -d '{}') I get this error message:

{"error":"IndexMissingException[[doc_es_idx] missing]","status":404}

I've checked other posts and documentation and found a way to get the river status: curl -XGET 'http://localhost:9200/_river/doc_es_idx/_status' and I'm getting this error:

{"_index":"_river","_type":"doc_es_idx","_id":"_status","_version":1,"exists":true, "_source" : {"error":"NoClassSettingsException[Failed to load class with value [couchdb]]; nested: ClassNotFoundException[couchdb]; ","node":{"id":"cy4GWzNlSTqkYvLETwC6DQ","name":"Gibborim","transport_address":"inet[/10.0.2.15:9300]"}}}

I'm not sure what could have gone wrong. I've installed elasticsearch (0.17.6) & couchdb (1.0.1), both are up and running. I've also installed the couchdb-river without problems.

I created the river like this:

curl -XPUT 'http://127.0.0.1:9200/_river/doc_es_idx/_meta' -d '{"type":"couchdb","couchdb":{"host":"localhost","port":5984,"db":"documents_db","filter":null},"index":{"index":"doc_es_idx","type":"doc_es_type","bulk_size":"100","bulk_timeout":"10ms"}}'

Any help getting this solved will be really appreciated.

Have you installed the couchdb plugin?

On Sat, Aug 20, 2011 at 2:29 AM, jramirez jose.alb@gmail.com wrote:

Hi, I'm having trouble integrating elasticsearch with couchdb.

I followed the instructions here:
Elasticsearch Platform — Find real-time answers at scale | Elastic
couchdb-integration but when searching (curl -XGET
http://localhost:9200/doc_es_idx/_search -d '{}') I get this error
message:

{"error":"IndexMissingException[[doc_es_idx] missing]","status":404}

I've checked other posts and documentation and found a way to get the river
status: curl -XGET 'http://localhost:9200/_river/doc_es_idx/_status' and
I'm
getting this error:

{"_index":"_river","_type":"doc_es_idx","_id":"_status","_version":1,"exists":true,
"_source" : {"error":"NoClassSettingsException[Failed to load class with
value [couchdb]]; nested: ClassNotFoundException[couchdb];

","node":{"id":"cy4GWzNlSTqkYvLETwC6DQ","name":"Gibborim","transport_address":"inet[/
10.0.2.15:9300]"}}}

I'm not sure what could have gone wrong. I've installed elasticsearch
(0.17.6) & couchdb (1.0.1), both are up and running. I've also installed
the couchdb-river without problems.

I created the river like this:

curl -XPUT 'http://127.0.0.1:9200/_river/doc_es_idx/_meta' -d

'{"type":"couchdb","couchdb":{"host":"localhost","port":5984,"db":"documents_db","filter":null},"index":{"index":"doc_es_idx","type":"doc_es_type","bulk_size":"100","bulk_timeout":"10ms"}}'

Any help getting this solved will be really appreciated.

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/CouchDB-Integration-ClassNotFoundException-couchdb-tp3269544p3269544.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

Hi, yes I installed the couchdb plugin. Thanks everyone but this is already solved.

I started all over again, and re-installed everything including the plugin. I restarted after that, then everything went smoothly.

That was my thought as well, but he did state: "I've also installed
the couchdb-river without problems."

In your 'plugins' directory (inside the root ES home directory), is
the couchdb plugin listed?

--
Ivan

On Wed, Aug 24, 2011 at 2:22 PM, Shay Banon kimchy@gmail.com wrote:

Have you installed the couchdb plugin?

On Sat, Aug 20, 2011 at 2:29 AM, jramirez jose.alb@gmail.com wrote:

Hi, I'm having trouble integrating elasticsearch with couchdb.

I followed the instructions here:
Elasticsearch Platform — Find real-time answers at scale | Elastic
couchdb-integration but when searching (curl -XGET
http://localhost:9200/doc_es_idx/_search -d '{}') I get this error
message:

{"error":"IndexMissingException[[doc_es_idx] missing]","status":404}

I've checked other posts and documentation and found a way to get the
river
status: curl -XGET 'http://localhost:9200/_river/doc_es_idx/_status' and
I'm
getting this error:

{"_index":"_river","_type":"doc_es_idx","_id":"_status","_version":1,"exists":true,
"_source" : {"error":"NoClassSettingsException[Failed to load class with
value [couchdb]]; nested: ClassNotFoundException[couchdb];

","node":{"id":"cy4GWzNlSTqkYvLETwC6DQ","name":"Gibborim","transport_address":"inet[/10.0.2.15:9300]"}}}

I'm not sure what could have gone wrong. I've installed elasticsearch
(0.17.6) & couchdb (1.0.1), both are up and running. I've also installed
the couchdb-river without problems.

I created the river like this:

curl -XPUT 'http://127.0.0.1:9200/_river/doc_es_idx/_meta' -d

'{"type":"couchdb","couchdb":{"host":"localhost","port":5984,"db":"documents_db","filter":null},"index":{"index":"doc_es_idx","type":"doc_es_type","bulk_size":"100","bulk_timeout":"10ms"}}'

Any help getting this solved will be really appreciated.

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/CouchDB-Integration-ClassNotFoundException-couchdb-tp3269544p3269544.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

It will also appear in the log file. Search for something that looks like:

[plugins] loaded [...list of plugins...]

Hi,

I'm running into the same exact problem. I realized that when I first
added the river, CouchDB was not actually up and running. This is what
may have caused this issue for others on thread as well?

Now I'm curious about: Is there no other way then to delete the river
and restart?
Is the 1st time failure to connect with CouchDB really that fatal?
I can accept that but just want to make sure before I do.

Thank in advance for your thoughts.

This is not hijacking is it? I think this is pertinent to the topic in
this thread...

  • Pulkit

On Aug 24, 2:36 pm, jramirez jose....@gmail.com wrote:

Hi, yes I installed thecouchdbplugin. Thanks everyone but this is already
solved.

I started all over again, and re-installed everything including the plugin.
I restarted after that, then everything went smoothly.

--
View this message in context:http://elasticsearch-users.115913.n3.nabble.com/CouchDB-Integration-C...
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

Allow me to add on a bit more and this is not again not a problem but
just a description of the way things are in context to what happens.

  1. Initially when the CouchDB is not up & running and one adds the
    river the server spits out:
    ====
    [2011-10-18 09:35:33,454][INFO ][cluster.metadata ]
    [Ameridroid] [_river] creating index, cause [auto(index api)], shards
    [1]/[1], mappings
    [2011-10-18 09:35:33,591][INFO ][cluster.metadata ]
    [Ameridroid] [_river] update_mapping [bbyopen_int] (dynamic)
    [2011-10-18 09:35:33,686][WARN ][river ]
    [Ameridroid] failed to create river [couchdb][bbyopen_int]
    org.elasticsearch.common.settings.NoClassSettingsException: Failed to
    load class with value [couchdb]
    at
    org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:
  2. at org.elasticsearch.river.RiverModule.spawnModules(RiverModule.java:
  3. at
    org.elasticsearch.common.inject.ModulesBuilder.add(ModulesBuilder.java:
  4. at
    org.elasticsearch.river.RiversService.createRiver(RiversService.java:
at org.elasticsearch.river.RiversService$ApplyRivers

$1.onResponse(RiversService.java:231)
at org.elasticsearch.river.RiversService$ApplyRivers
$1.onResponse(RiversService.java:226)
at org.elasticsearch.action.support.BaseAction$ThreadedActionListener
$1.run(BaseAction.java:84)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.ClassNotFoundException: couchdb
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at
org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:
70)
... 9 more
[2011-10-18 09:35:33,764][INFO ][cluster.metadata ]
[Ameridroid] [_river] update_mapping [bbyopen_int] (dynamic)

  1. The client running the command sees:
    ClassNotFoundException[couchdb]

  2. Any attempt to re-run the same command again to establish the river
    while ES is still up & running yields no changes in the situation,
    even though now CouchDB may be up.

  3. BUT shutting down ES and restating it causes a few exceptions in
    the ES server side and is able to now get the data from CouchDB and
    get into an operational state :slight_smile:
    ====
    [2011-10-18 09:58:50,943][DEBUG][action.admin.indices.refresh]
    [Vashti] [_river][0], node[QQiFz3-gTAObx5IgXJlB8g], [P],
    s[INITIALIZING]: Failed to execute
    [org.elasticsearch.action.admin.indices.refresh.RefreshRequest@3fa9b4a4]
    org.elasticsearch.indices.IndexMissingException: [_river] missing
    at
    org.elasticsearch.indices.InternalIndicesService.indexServiceSafe(InternalIndicesService.java:

at

org.elasticsearch.action.admin.indices.refresh.TransportRefreshAction.shardOperation(TransportRefreshAction.java:
124)
at
org.elasticsearch.action.admin.indices.refresh.TransportRefreshAction.shardOperation(TransportRefreshAction.java:
52)
at
org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction
$AsyncBroadcastAction$2.run(TransportBroadcastOperationAction.java:
223)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
[2011-10-18 09:58:51,289][INFO ][gateway ] [Vashti]
recovered [2] indices into cluster_state
[2011-10-18 09:58:51,386][INFO ][river.couchdb ] [Vashti]
[couchdb][bbyopen_int] starting couchdb stream: host [localhost], port
[5984], filter [null], db [bbyopen], indexing to [bbyopen]/[bbyopen]

  1. So I retract my earlier statement: "Is there no other way then to
    delete the river and restart?" because obviously, simply restarting ES
    fixes the situation.

On Oct 18, 9:52 am, pulkitsinghal pulkitsing...@gmail.com wrote:

Hi,

I'm running into the same exact problem. I realized that when I first
added the river, CouchDB was not actually up and running. This is what
may have caused this issue for others on thread as well?

Now I'm curious about: Is there no other way then to delete the river
and restart?
Is the 1st time failure to connect with CouchDB really that fatal?
I can accept that but just want to make sure before I do.

Thank in advance for your thoughts.

This is not hijacking is it? I think this is pertinent to the topic in
this thread...

  • Pulkit

On Aug 24, 2:36 pm, jramirez jose....@gmail.com wrote:

Hi, yes I installed thecouchdbplugin. Thanks everyone but this is already
solved.

I started all over again, and re-installed everything including the plugin.
I restarted after that, then everything went smoothly.

--
View this message in context:http://elasticsearch-users.115913.n3.nabble.com/CouchDB-Integration-C...
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

If you did not install the plugin beforehand, then you have to restart the
node so it will startup with the mentioned plugin. Assuming the plugin is
installed, Loosing connection to couch will be handled by retrying to
connect to it. You can definitely delete the river.

The exception that you saw, with the refresh, can be ignored, and fixed in
laster.

On Tue, Oct 18, 2011 at 5:06 PM, pulkitsinghal pulkitsinghal@gmail.comwrote:

Allow me to add on a bit more and this is not again not a problem but
just a description of the way things are in context to what happens.

  1. Initially when the CouchDB is not up & running and one adds the
    river the server spits out:
    ====
    [2011-10-18 09:35:33,454][INFO ][cluster.metadata ]
    [Ameridroid] [_river] creating index, cause [auto(index api)], shards
    [1]/[1], mappings
    [2011-10-18 09:35:33,591][INFO ][cluster.metadata ]
    [Ameridroid] [_river] update_mapping [bbyopen_int] (dynamic)
    [2011-10-18 09:35:33,686][WARN ][river ]
    [Ameridroid] failed to create river [couchdb][bbyopen_int]
    org.elasticsearch.common.settings.NoClassSettingsException: Failed to
    load class with value [couchdb]
    at
    org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:

  2. at
    org.elasticsearch.river.RiverModule.spawnModules(RiverModule.java:

  3. at
    org.elasticsearch.common.inject.ModulesBuilder.add(ModulesBuilder.java:

  4. at
    org.elasticsearch.river.RiversService.createRiver(RiversService.java:

  5. at org.elasticsearch.river.RiversService$ApplyRivers
    $1.onResponse(RiversService.java:231)
    at org.elasticsearch.river.RiversService$ApplyRivers
    $1.onResponse(RiversService.java:226)
    at
    org.elasticsearch.action.support.BaseAction$ThreadedActionListener
    $1.run(BaseAction.java:84)
    at java.util.concurrent.ThreadPoolExecutor
    $Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor
    $Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.ClassNotFoundException: couchdb
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at
    org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:

  6. ... 9 more
    [2011-10-18 09:35:33,764][INFO ][cluster.metadata ]
    [Ameridroid] [_river] update_mapping [bbyopen_int] (dynamic)
    ====

  7. The client running the command sees:
    ClassNotFoundException[couchdb]

  8. Any attempt to re-run the same command again to establish the river
    while ES is still up & running yields no changes in the situation,
    even though now CouchDB may be up.

  9. BUT shutting down ES and restating it causes a few exceptions in
    the ES server side and is able to now get the data from CouchDB and
    get into an operational state :slight_smile:
    ====
    [2011-10-18 09:58:50,943][DEBUG][action.admin.indices.refresh]
    [Vashti] [_river][0], node[QQiFz3-gTAObx5IgXJlB8g], [P],
    s[INITIALIZING]: Failed to execute
    [org.elasticsearch.action.admin.indices.refresh.RefreshRequest@3fa9b4a4]
    org.elasticsearch.indices.IndexMissingException: [_river] missing
    at

org.elasticsearch.indices.InternalIndicesService.indexServiceSafe(InternalIndicesService.java:
227)
at

org.elasticsearch.action.admin.indices.refresh.TransportRefreshAction.shardOperation(TransportRefreshAction.java:
124)
at

org.elasticsearch.action.admin.indices.refresh.TransportRefreshAction.shardOperation(TransportRefreshAction.java:
52)
at

org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction
$AsyncBroadcastAction$2.run(TransportBroadcastOperationAction.java:
223)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
[2011-10-18 09:58:51,289][INFO ][gateway ] [Vashti]
recovered [2] indices into cluster_state
[2011-10-18 09:58:51,386][INFO ][river.couchdb ] [Vashti]
[couchdb][bbyopen_int] starting couchdb stream: host [localhost], port
[5984], filter [null], db [bbyopen], indexing to [bbyopen]/[bbyopen]

  1. So I retract my earlier statement: "Is there no other way then to
    delete the river and restart?" because obviously, simply restarting ES
    fixes the situation.

On Oct 18, 9:52 am, pulkitsinghal pulkitsing...@gmail.com wrote:

Hi,

I'm running into the same exact problem. I realized that when I first
added the river, CouchDB was not actually up and running. This is what
may have caused this issue for others on thread as well?

Now I'm curious about: Is there no other way then to delete the river
and restart?
Is the 1st time failure to connect with CouchDB really that fatal?
I can accept that but just want to make sure before I do.

Thank in advance for your thoughts.

This is not hijacking is it? I think this is pertinent to the topic in
this thread...

  • Pulkit

On Aug 24, 2:36 pm, jramirez jose....@gmail.com wrote:

Hi, yes I installed thecouchdbplugin. Thanks everyone but this is
already
solved.

I started all over again, and re-installed everything including the
plugin.
I restarted after that, then everything went smoothly.

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/CouchDB-Integration-C...
Sent from the Elasticsearch Users mailing list archive at Nabble.com.