# No indexing with JDBC River plugin

**URL:** <https://discuss.elastic.co/t/no-indexing-with-jdbc-river-plugin/16115>\
**Category:** Elasticsearch\
**Created:** [March 3, 2014, 6:17pm UTC](https://discuss.elastic.co/t/no-indexing-with-jdbc-river-plugin/16115 "2014-03-03T18:17:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Greene](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eric_greene/32/1312_2.png) [@Eric\_Greene](https://discuss.elastic.co/u/Eric_Greene)\
**Post date:** [March 3, 2014, 6:17pm UTC](https://discuss.elastic.co/t/no-indexing-with-jdbc-river-plugin/16115/1 "2014-03-03T18:17:28Z")

</div>

Hi I am getting started with elasticsearch and the jdbc river plugin. I  
want to sync to a mysql database. I appear to have everything set up  
correctly... ES starts with no trouble, I have installed the plugin and  
copied the mysql connector. However when I begin with a simple test  
command:

curl -XPUT 'localhost:9200/my\_index/videos/\_meta' -d '{  
"type" : "jdbc",  
"jdbc" : {  
"url" : "jdbc:mysql://localhost:3306/my\_db",  
"user" : "eric",  
"password" : "my\_password",  
"sql" : "select title, description, created, active from video",  
"index" : "my\_index",  
"type" : "videos"  
}  
}'

Nothing from the mysql db is indexed. Instead it just indexes the  
information above instead of the mysql data.

So if I follow the above with  
curl -XGET 'localhost:9200/my\_index/\_search?pretty&q=\*

I get the following for hits:

"hits" : {  
"total" : 1,  
"max\_score" : 1.0,  
"hits" : [ {  
"\_index" : "my\_index",  
"\_type" : "videos",  
"\_id" : "\_meta",  
"\_score" : 1.0, "\_source" : {  
"type" : "jdbc",  
"jdbc" : {  
"url" : "jdbc:mysql://localhost:3306/my\_db",  
"user" : "eric",  
"password" : "my\_password",  
"sql" : "select title, description, created, active from video",  
"index" : "my\_index",  
"type" : "videos"  
}

Logs show that the index was created. But it isn't an index from mysql.

I have also double and tripled checked the mysql credentials are working  
and that the sql statement works. I have also verified there is in fact  
data in the video table.

It just seems like the river is being ignored entirely.

The following is from the log file:

[2014-03-03 10:09:28,565][INFO][cluster.metadata] [es\_node]  
[my\_index] creating index, cause [auto(index api)], shards [5]/[1],  
mappings []  
[2014-03-03 10:09:28,800][INFO][cluster.metadata] [es\_node]  
[my\_index] update\_mapping [videos] (dynamic)

What could I be missing here?

I am using the following versions:

ES version 1.0.1  
JDBC River version 1.0.0.1  
mySQL-connector-java version 5.1.28

on Ubuntu 12.04

Thanks for any help.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/71a431cb-58a6-4fd6-87fb-6ec08ee37bc4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/71a431cb-58a6-4fd6-87fb-6ec08ee37bc4%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Eric\_Greene](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eric_greene/32/1312_2.png) [@Eric\_Greene](https://discuss.elastic.co/u/Eric_Greene)\
**Post date:** [March 3, 2014, 7:06pm UTC](https://discuss.elastic.co/t/no-indexing-with-jdbc-river-plugin/16115/2 "2014-03-03T19:06:10Z")

</div>

I have figured it out. CHMOD of the mySQL-connector-river jar file to 755  
fixed my issue. - Eric

On Monday, March 3, 2014 10:17:28 AM UTC-8, Eric Greene wrote:

> Hi I am getting started with elasticsearch and the jdbc river plugin. I  
> want to sync to a mysql database. I appear to have everything set up  
> correctly... ES starts with no trouble, I have installed the plugin and  
> copied the mysql connector. However when I begin with a simple test  
> command:
> 
> curl -XPUT 'localhost:9200/my\_index/videos/\_meta' -d '{  
> "type" : "jdbc",  
> "jdbc" : {  
> "url" : "jdbc:mysql://localhost:3306/my\_db",  
> "user" : "eric",  
> "password" : "my\_password",  
> "sql" : "select title, description, created, active from video",  
> "index" : "my\_index",  
> "type" : "videos"  
> }  
> }'
> 
> Nothing from the mysql db is indexed. Instead it just indexes the  
> information above instead of the mysql data.
> 
> So if I follow the above with  
> curl -XGET 'localhost:9200/my\_index/\_search?pretty&q=\*
> 
> I get the following for hits:
> 
> "hits" : {  
> "total" : 1,  
> "max\_score" : 1.0,  
> "hits" : [ {  
> "\_index" : "my\_index",  
> "\_type" : "videos",  
> "\_id" : "\_meta",  
> "\_score" : 1.0, "\_source" : {  
> "type" : "jdbc",  
> "jdbc" : {  
> "url" : "jdbc:mysql://localhost:3306/my\_db",  
> "user" : "eric",  
> "password" : "my\_password",  
> "sql" : "select title, description, created, active from video",  
> "index" : "my\_index",  
> "type" : "videos"  
> }
> 
> Logs show that the index was created. But it isn't an index from mysql.
> 
> I have also double and tripled checked the mysql credentials are working  
> and that the sql statement works. I have also verified there is in fact  
> data in the video table.
> 
> It just seems like the river is being ignored entirely.
> 
> The following is from the log file:
> 
> [2014-03-03 10:09:28,565][INFO][cluster.metadata] [es\_node]  
> [my\_index] creating index, cause [auto(index api)], shards [5]/[1],  
> mappings   
> [2014-03-03 10:09:28,800][INFO][cluster.metadata] [es\_node]  
> [my\_index] update\_mapping [videos] (dynamic)
> 
> What could I be missing here?
> 
> I am using the following versions:
> 
> ES version 1.0.1  
> JDBC River version 1.0.0.1  
> mySQL-connector-java version 5.1.28
> 
> on Ubuntu 12.04
> 
> Thanks for any help.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ce42222e-1ef2-46a8-9bea-c9a7371abbaa%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ce42222e-1ef2-46a8-9bea-c9a7371abbaa%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [March 3, 2014, 8:13pm UTC](https://discuss.elastic.co/t/no-indexing-with-jdbc-river-plugin/16115/3 "2014-03-03T20:13:50Z")

</div>

All you ned are read permissions on jars in the classpath.

Jörg

On Mon, Mar 3, 2014 at 8:06 PM, Eric Greene [ericdgreene@gmail.com](mailto:ericdgreene@gmail.com) wrote:

> I have figured it out. CHMOD of the mySQL-connector-river jar file to 755  
> fixed my issue. - Eric
> 
> On Monday, March 3, 2014 10:17:28 AM UTC-8, Eric Greene wrote:
> 
> > Hi I am getting started with elasticsearch and the jdbc river plugin. I  
> > want to sync to a mysql database. I appear to have everything set up  
> > correctly... ES starts with no trouble, I have installed the plugin and  
> > copied the mysql connector. However when I begin with a simple test  
> > command:
> > 
> > curl -XPUT 'localhost:9200/my\_index/videos/\_meta' -d '{  
> > "type" : "jdbc",  
> > "jdbc" : {  
> > "url" : "jdbc:mysql://localhost:3306/my\_db",  
> > "user" : "eric",  
> > "password" : "my\_password",  
> > "sql" : "select title, description, created, active from video",  
> > "index" : "my\_index",  
> > "type" : "videos"  
> > }  
> > }'
> > 
> > Nothing from the mysql db is indexed. Instead it just indexes the  
> > information above instead of the mysql data.
> > 
> > So if I follow the above with  
> > curl -XGET 'localhost:9200/my\_index/\_search?pretty&q=\*
> > 
> > I get the following for hits:
> > 
> > "hits" : {  
> > "total" : 1,  
> > "max\_score" : 1.0,  
> > "hits" : [ {  
> > "\_index" : "my\_index",  
> > "\_type" : "videos",  
> > "\_id" : "\_meta",  
> > "\_score" : 1.0, "\_source" : {  
> > "type" : "jdbc",  
> > "jdbc" : {  
> > "url" : "jdbc:mysql://localhost:3306/my\_db",  
> > "user" : "eric",  
> > "password" : "my\_password",  
> > "sql" : "select title, description, created, active from video",  
> > "index" : "my\_index",  
> > "type" : "videos"  
> > }
> > 
> > Logs show that the index was created. But it isn't an index from mysql.
> > 
> > I have also double and tripled checked the mysql credentials are working  
> > and that the sql statement works. I have also verified there is in fact  
> > data in the video table.
> > 
> > It just seems like the river is being ignored entirely.
> > 
> > The following is from the log file:
> > 
> > [2014-03-03 10:09:28,565][INFO][cluster.metadata] [es\_node]  
> > [my\_index] creating index, cause [auto(index api)], shards [5]/[1],  
> > mappings   
> > [2014-03-03 10:09:28,800][INFO][cluster.metadata] [es\_node]  
> > [my\_index] update\_mapping [videos] (dynamic)
> > 
> > What could I be missing here?
> > 
> > I am using the following versions:
> > 
> > ES version 1.0.1  
> > JDBC River version 1.0.0.1  
> > mySQL-connector-java version 5.1.28
> > 
> > on Ubuntu 12.04
> > 
> > Thanks for any help.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/ce42222e-1ef2-46a8-9bea-c9a7371abbaa%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ce42222e-1ef2-46a8-9bea-c9a7371abbaa%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/ce42222e-1ef2-46a8-9bea-c9a7371abbaa%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/ce42222e-1ef2-46a8-9bea-c9a7371abbaa%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHFn5MeU0CzxoMQUceMixaAWmMNg\_ch1K9GA%3DYkA\_M8SA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHFn5MeU0CzxoMQUceMixaAWmMNg_ch1K9GA%3DYkA_M8SA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:46am UTC](https://discuss.elastic.co/t/no-indexing-with-jdbc-river-plugin/16115/4 "2017-07-06T01:46:05Z")

</div>


