# JDBC River issues

**URL:** <https://discuss.elastic.co/t/jdbc-river-issues/9311>\
**Category:** Elasticsearch\
**Created:** [October 10, 2012, 10:46pm UTC](https://discuss.elastic.co/t/jdbc-river-issues/9311 "2012-10-10T22:46:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon\_Ryan](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Jon\_Ryan](https://discuss.elastic.co/u/Jon_Ryan)\
**Post date:** [October 10, 2012, 10:46pm UTC](https://discuss.elastic.co/t/jdbc-river-issues/9311/1 "2012-10-10T22:46:58Z")

</div>

I've been following the directions for the jdbc river plugin but keep  
running into issues.

curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{  
"type" : "jdbc",  
"jdbc" : {  
"driver" : "com.mysql.jdbc.Driver",  
"url" : "jdbc:mysql://localhost:8889/newpt",  
"user" : "root",  
"password" : "",  
"sql" : "select \* from pt\_products"  
},  
"index" : {  
"index" : "jdbc",  
"type" : "jdbc"  
}  
}'

{"ok":true,"\_index":"\_river","\_type":"my\_jdbc\_river","\_id":"\_meta","\_version":4}

But nothing shows up in the server log. When running  
curl -XGET '[http://localhost:9200/\_river/my\_jdbc\_river/\_status?pretty=true](http://localhost:9200/_river/my_jdbc_river/_status?pretty=true)'

I get the following error.

{  
"\_index" : "\_river",  
"\_type" : "my\_jdbc\_river",  
"\_id" : "\_status",  
"\_version" : 1,  
"exists" : true, "\_source" : {"error":"NoClassSettingsException[Failed to  
load class with value [jdbc]]; nested: ClassNotFoundException[jdbc];  
","node":{"id":"8VmwpOlgQA-Bf2ey0L13lg","name":"Deathlok","transport\_address":"inet[/192.168.1.102:9302]"}}  
}

I decided to delete the plugin and reinstall everything. Now when I run  
the status command I get this.

→ curl -XGET  
'[http://localhost:9200/\_river/my\_jdbc\_river/\_status?pretty=true](http://localhost:9200/_river/my_jdbc_river/_status?pretty=true)'

{

"\_index" : "\_river",

"\_type" : "my\_jdbc\_river",

"\_id" : "\_status",

"exists" : false

}

Still nothing in the console. Very frustrated. Trying to test this out  
coming from Solr.

--

---

<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:** [October 11, 2012, 8:22am UTC](https://discuss.elastic.co/t/jdbc-river-issues/9311/2 "2012-10-11T08:22:04Z")

</div>

Hi Jon,

perhaps the JDBC river hasn't ben installed properly, can you check the  
line in the logs?

For more advice,see older post archived  
here [http://elasticsearch-users.115913.n3.nabble.com/CouchDB-Integration-ClassNotFoundException-couchdb-td3269544.html](http://elasticsearch-users.115913.n3.nabble.com/CouchDB-Integration-ClassNotFoundException-couchdb-td3269544.html)

Please note you have to restart the node for activating the river plugin,  
and rivers hat exist have to be reinstalled.

Best regards,

Jörg

On Thursday, October 11, 2012 12:46:58 AM UTC+2, Jon Ryan wrote:

> I've been following the directions for the jdbc river plugin but keep  
> running into issues.
> 
> curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{  
> "type" : "jdbc",  
> "jdbc" : {  
> "driver" : "com.mysql.jdbc.Driver",  
> "url" : "jdbc:mysql://localhost:8889/newpt",  
> "user" : "root",  
> "password" : "",  
> "sql" : "select \* from pt\_products"  
> },  
> "index" : {  
> "index" : "jdbc",  
> "type" : "jdbc"  
> }  
> }'
> 
> {"ok":true,"\_index":"\_river","\_type":"my\_jdbc\_river","\_id":"\_meta","\_version":4}
> 
> But nothing shows up in the server log. When running  
> curl -XGET '[http://localhost:9200/\_river/my\_jdbc\_river/\_status?pretty=true](http://localhost:9200/_river/my_jdbc_river/_status?pretty=true)  
> '
> 
> I get the following error.
> 
> {  
> "\_index" : "\_river",  
> "\_type" : "my\_jdbc\_river",  
> "\_id" : "\_status",  
> "\_version" : 1,  
> "exists" : true, "\_source" : {"error":"NoClassSettingsException[Failed to  
> load class with value [jdbc]]; nested: ClassNotFoundException[jdbc];  
> ","node":{"id":"8VmwpOlgQA-Bf2ey0L13lg","name":"Deathlok","transport\_address":"inet[/  
> 192.168.1.102:9302]"}}  
> }
> 
> I decided to delete the plugin and reinstall everything. Now when I run  
> the status command I get this.
> 
> → curl -XGET '  
> [http://localhost:9200/\_river/my\_jdbc\_river/\_status?pretty=true](http://localhost:9200/_river/my_jdbc_river/_status?pretty=true)'
> 
> {
> 
> "\_index" : "\_river",
> 
> "\_type" : "my\_jdbc\_river",
> 
> "\_id" : "\_status",
> 
> "exists" : false
> 
> }
> 
> Still nothing in the console. Very frustrated. Trying to test this out  
> coming from Solr.

--

---

<div class="post-metadata">

**Author:** ![Vinay](https://avatars.discourse-cdn.com/v4/letter/v/6a8cbe/32.png) [@Vinay](https://discuss.elastic.co/u/Vinay)\
**Post date:** [October 11, 2012, 12:19pm UTC](https://discuss.elastic.co/t/jdbc-river-issues/9311/3 "2012-10-11T12:19:57Z")

</div>

Try deleting the river and run the jdbc script again.

On Thursday, October 11, 2012 4:16:58 AM UTC+5:30, Jon Ryan wrote:

> I've been following the directions for the jdbc river plugin but keep  
> running into issues.
> 
> curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{  
> "type" : "jdbc",  
> "jdbc" : {  
> "driver" : "com.mysql.jdbc.Driver",  
> "url" : "jdbc:mysql://localhost:8889/newpt",  
> "user" : "root",  
> "password" : "",  
> "sql" : "select \* from pt\_products"  
> },  
> "index" : {  
> "index" : "jdbc",  
> "type" : "jdbc"  
> }  
> }'
> 
> {"ok":true,"\_index":"\_river","\_type":"my\_jdbc\_river","\_id":"\_meta","\_version":4}
> 
> But nothing shows up in the server log. When running  
> curl -XGET '[http://localhost:9200/\_river/my\_jdbc\_river/\_status?pretty=true](http://localhost:9200/_river/my_jdbc_river/_status?pretty=true)  
> '
> 
> I get the following error.
> 
> {  
> "\_index" : "\_river",  
> "\_type" : "my\_jdbc\_river",  
> "\_id" : "\_status",  
> "\_version" : 1,  
> "exists" : true, "\_source" : {"error":"NoClassSettingsException[Failed to  
> load class with value [jdbc]]; nested: ClassNotFoundException[jdbc];  
> ","node":{"id":"8VmwpOlgQA-Bf2ey0L13lg","name":"Deathlok","transport\_address":"inet[/  
> 192.168.1.102:9302]"}}  
> }
> 
> I decided to delete the plugin and reinstall everything. Now when I run  
> the status command I get this.
> 
> → curl -XGET '  
> [http://localhost:9200/\_river/my\_jdbc\_river/\_status?pretty=true](http://localhost:9200/_river/my_jdbc_river/_status?pretty=true)'
> 
> {
> 
> "\_index" : "\_river",
> 
> "\_type" : "my\_jdbc\_river",
> 
> "\_id" : "\_status",
> 
> "exists" : false
> 
> }
> 
> Still nothing in the console. Very frustrated. Trying to test this out  
> coming from Solr.

--

---

<div class="post-metadata">

**Author:** ![Jon\_Ryan](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Jon\_Ryan](https://discuss.elastic.co/u/Jon_Ryan)\
**Post date:** [October 11, 2012, 4:55pm UTC](https://discuss.elastic.co/t/jdbc-river-issues/9311/4 "2012-10-11T16:55:56Z")

</div>

Turns out the problem was the node was not shutting down properly, and I  
had about 6 nodes unexplainably running. I'm not a java guy so this is a  
bit foreign territory. After killing those processes off and restarting it  
everything is working and I'm actually getting output in the console.

Of note I did need to change my mysql user permissions to accommodate this  
error, the plugin apparently isn't connecting as localhost.

[2012-10-11 09:45:31,472][ERROR][river.jdbc] null, message  
from server: "Host '192.168.1.102' is not allowed to connect to this MySQL  
server"

On Thursday, October 11, 2012 1:22:04 AM UTC-7, Jörg Prante wrote:

> Hi Jon,
> 
> perhaps the JDBC river hasn't ben installed properly, can you check the  
> line in the logs?
> 
> For more advice,see older post archived here  
> [http://elasticsearch-users.115913.n3.nabble.com/CouchDB-Integration-ClassNotFoundException-couchdb-td3269544.html](http://elasticsearch-users.115913.n3.nabble.com/CouchDB-Integration-ClassNotFoundException-couchdb-td3269544.html)
> 
> Please note you have to restart the node for activating the river plugin,  
> and rivers hat exist have to be reinstalled.
> 
> Best regards,
> 
> Jörg
> 
> On Thursday, October 11, 2012 12:46:58 AM UTC+2, Jon Ryan wrote:
> 
> > I've been following the directions for the jdbc river plugin but keep  
> > running into issues.
> > 
> > curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{  
> > "type" : "jdbc",  
> > "jdbc" : {  
> > "driver" : "com.mysql.jdbc.Driver",  
> > "url" : "jdbc:mysql://localhost:8889/newpt",  
> > "user" : "root",  
> > "password" : "",  
> > "sql" : "select \* from pt\_products"  
> > },  
> > "index" : {  
> > "index" : "jdbc",  
> > "type" : "jdbc"  
> > }  
> > }'
> > 
> > {"ok":true,"\_index":"\_river","\_type":"my\_jdbc\_river","\_id":"\_meta","\_version":4}
> > 
> > But nothing shows up in the server log. When running  
> > curl -XGET '  
> > [http://localhost:9200/\_river/my\_jdbc\_river/\_status?pretty=true](http://localhost:9200/_river/my_jdbc_river/_status?pretty=true)'
> > 
> > I get the following error.
> > 
> > {  
> > "\_index" : "\_river",  
> > "\_type" : "my\_jdbc\_river",  
> > "\_id" : "\_status",  
> > "\_version" : 1,  
> > "exists" : true, "\_source" : {"error":"NoClassSettingsException[Failed to  
> > load class with value [jdbc]]; nested: ClassNotFoundException[jdbc];  
> > ","node":{"id":"8VmwpOlgQA-Bf2ey0L13lg","name":"Deathlok","transport\_address":"inet[/  
> > 192.168.1.102:9302]"}}  
> > }
> > 
> > I decided to delete the plugin and reinstall everything. Now when I run  
> > the status command I get this.
> > 
> > → curl -XGET '  
> > [http://localhost:9200/\_river/my\_jdbc\_river/\_status?pretty=true](http://localhost:9200/_river/my_jdbc_river/_status?pretty=true)'
> > 
> > {
> > 
> > "\_index" : "\_river",
> > 
> > "\_type" : "my\_jdbc\_river",
> > 
> > "\_id" : "\_status",
> > 
> > "exists" : false
> > 
> > }
> > 
> > Still nothing in the console. Very frustrated. Trying to test this out  
> > coming from Solr.

--

---

<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, 3:09am UTC](https://discuss.elastic.co/t/jdbc-river-issues/9311/5 "2017-07-06T03:09:17Z")

</div>


