Possible bug in RiversRouter.java (failed to get/parse _meta)

Hi, all!

I've written a custom river running on ES 0.16.3 that reads from
Amazon SQS. All worked well until I put the file "default-
mapping.json" under config/. The file only sets "_source": { "enabled:
false } and that's all. Then I create my river using this request:

curl -XPUT 'localhost:9200/_river/myindex/_meta' -d '{"type" :
"amazonsqs"}'

and I get:

"...failed to get/parse _meta for [myindex]
java.lang.NullPointerException
at org.elasticsearch.river.routing.RiversRouter
$1.execute(RiversRouter.java:106)...."

This is never thrown when config/default-mapping.json is deleted and
the river recreated. I've tested this with 2 node cluster I got the
same error. My shard/replica settings are 10/1.

This issue might be a duplicate of the closed
https://github.com/elasticsearch/elasticsearch/issues/711.

Any solutions/workarounds would be appreciated. Thanks!

Rivers definitions are stored as documents in the index, and when you disable source across the board using the default-mapping option, you also disable the source for those documents... . It shouldn't be this case, btw, can you open an issue?

For now, you can disable source explicitly per index, or, using index templates to disable source.

-shay.banon

On Tuesday, July 12, 2011 at 2:10 PM, aleski wrote:

Hi, all!

I've written a custom river running on ES 0.16.3 that reads from
Amazon SQS. All worked well until I put the file "default-
mapping.json" under config/. The file only sets "_source": { "enabled:
false } and that's all. Then I create my river using this request:

curl -XPUT 'localhost:9200/_river/myindex/_meta' -d '{"type" :
"amazonsqs"}'

and I get:

"...failed to get/parse _meta for [myindex]
java.lang.NullPointerException
at org.elasticsearch.river.routing.RiversRouter
$1.execute(RiversRouter.java:106)...."

This is never thrown when config/default-mapping.json is deleted and
the river recreated. I've tested this with 2 node cluster I got the
same error. My shard/replica settings are 10/1.

This issue might be a duplicate of the closed
River not recovered when using single node after shutdown · Issue #711 · elastic/elasticsearch · GitHub.

Any solutions/workarounds would be appreciated. Thanks!

Thanks, Shay! Issue opened here: Overriding default mapping breaks river plugins · Issue #1117 · elastic/elasticsearch · GitHub

On Jul 12, 8:07 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Rivers definitions are stored as documents in the index, and when you disable source across the board using the default-mapping option, you also disable the source for those documents... . It shouldn't be this case, btw, can you open an issue?

For now, you can disable source explicitly per index, or, using index templates to disable source.

-shay.banon

On Tuesday, July 12, 2011 at 2:10 PM, aleski wrote:

Hi, all!

I've written a custom river running on ES 0.16.3 that reads from
Amazon SQS. All worked well until I put the file "default-
mapping.json" under config/. The file only sets "_source": { "enabled:
false } and that's all. Then I create my river using this request:

curl -XPUT 'localhost:9200/_river/myindex/_meta' -d '{"type" :
"amazonsqs"}'

and I get:

"...failed to get/parse _meta for [myindex]
java.lang.NullPointerException
at org.elasticsearch.river.routing.RiversRouter
$1.execute(RiversRouter.java:106)...."

This is never thrown when config/default-mapping.json is deleted and
the river recreated. I've tested this with 2 node cluster I got the
same error. My shard/replica settings are 10/1.

This issue might be a duplicate of the closed
River not recovered when using single node after shutdown · Issue #711 · elastic/elasticsearch · GitHub.

Any solutions/workarounds would be appreciated. Thanks!