[JDBC River] MySQL - 'connection refused' breaks river due to NullPointerException

Hi,
when using JDBC River's 'simple' strategy (with 'poll' reindexing
configured) on MySQL (5.5), if connection to the database is not
available on one reindexing attempt with exception

[ERROR][org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource]
while opening read connection: jdbc:mysql://databaseXY Communications
link failure
....
Caused by: java.net.ConnectException: Connection refused
...

this causes NullPointerException in jdbc river:

ERROR][org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow]
java.lang.NullPointerException
at org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.executeQuery(SimpleRiverSource.java:409)
at org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.fetch(SimpleRiverSource.java:238)
at org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.move(SimpleRiverFlow.java:181)
at org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.run(SimpleRiverFlow.java:139)
at java.lang.Thread.run(Thread.java:662)

which breaks the river in sense that next scheduled
reindexing/re-import will not occur later/again, even if database
becomes available (seems this is due to unhandled NPE caused by null
Connection from connectionForReading(); which then breaks the river)

ElasticSearch version is 0.90.0.Beta1+ and plugin version is 2.2.0

Thanks,

Tomislav

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks for reporting!

I opened an issue

Jörg

Am 27.03.13 17:33, schrieb Tomislav Poljak:

Hi,
when using JDBC River's 'simple' strategy (with 'poll' reindexing
configured) on MySQL (5.5), if connection to the database is not
available on one reindexing attempt with exception

[ERROR][org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource]
while opening read connection: jdbc:mysql://databaseXY Communications
link failure
....
Caused by: java.net.ConnectException: Connection refused
...

this causes NullPointerException in jdbc river:

ERROR][org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow]
java.lang.NullPointerException
at org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.executeQuery(SimpleRiverSource.java:409)
at org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.fetch(SimpleRiverSource.java:238)
at org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.move(SimpleRiverFlow.java:181)
at org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.run(SimpleRiverFlow.java:139)
at java.lang.Thread.run(Thread.java:662)

which breaks the river in sense that next scheduled
reindexing/re-import will not occur later/again, even if database
becomes available (seems this is due to unhandled NPE caused by null
Connection from connectionForReading(); which then breaks the river)

ElasticSearch version is 0.90.0.Beta1+ and plugin version is 2.2.0

Thanks,

Tomislav

-- 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. For more options, visit
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.
For more options, visit https://groups.google.com/groups/opt_out.