JDBC River issues


(Jon Ryan) #1

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'

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'

{

"_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.

--


(Jörg Prante) #2

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

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
'

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'

{

"_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.

--


(Vinay) #3

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
'

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'

{

"_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.

--


(Jon Ryan) #4

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

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'

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'

{

"_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.

--


(system) #5