subin
(subin)
September 6, 2013, 10:51am
1
I run ES v 0.90.0. I'm facing 'StringIndexOutOfBoundsException: String
index out of range: -1 ' only when sending log from a particular server
through logstash to ES.
Below is a sample log from that server:
06-Sep-2013 06:10:45.934 transfer of 'domain.ca/IN' from 10.0.4.83#53:
failed while receiving responses: SERVFAIL
The complete error stack is here: https://gist.github.com/anonymous/6462292
My ES template: https://gist.github.com/anonymous/6462299
Any help would be highly appreciated.
Thanks,
--
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 .
mvg
(Martijn Van Groningen)
September 6, 2013, 11:31am
2
This is a known bug in 0.90.0 which has been fixed:
opened 08:02AM - 30 Apr 13 UTC
closed 02:58PM - 30 Apr 13 UTC
>bug
v0.90.1
v1.0.0.Beta1
I'm seeing the following in Elastic 0.90.0 during the first attempt attempt to i… nitiate an AnalyzeRequest against a numeric field:
```
Caused by: java.util.concurrent.ExecutionException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.getValue(BaseFuture.java:285)
at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:272)
at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:113)
at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:45)
... 38 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.<init>(String.java:207)
at org.elasticsearch.index.analysis.NumericTokenizer.reset(NumericTokenizer.java:59)
at org.elasticsearch.index.analysis.NumericTokenizer.reset(NumericTokenizer.java:54)
at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.shardOperation(TransportAnalyzeAction.java:202)
at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.shardOperation(TransportAnalyzeAction.java:57)
at org.elasticsearch.action.support.single.custom.TransportSingleCustomOperationAction$AsyncSingleAction$2.run(TransportSingleCustomOperationAction.java:175)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
... 1 more
```
The cause of the problem appears to be that the `reset()` method of the `NumericTokenizer` is called twice the first time `analyzer.tokenStream()` is called for a the field in a thread:
- The first call happens as a result of Lucene calling `createComponents()` on the `NumericAnalyzer`. This eventually results in the construction of a `NumericTokenizer` with a `char[]` buffer, which calls `reset()` during construction. This first `reset()` call leaves the `FastStringReader` associated with the Tokenizer with a `next` value that is equal to the length of that buffer because it reads all the chars out of the reader.
- The second call happens as a result of the explicit call to `reset()` in `TransportAnalyzeAction` immediately after the `TokenStream` has been retrieved from the analyzer. Unfortunately calling the method a second time triggers the `if (next >= length)` check in the `read()` method of the associated `FastStringReader` to return -1. NumericTokenizer then tries to use -1 as the number of chars to use when constructing a `String`, which throws the `StringIndexOutOfBoundsException` above.
If you upgrade (I recommend the latests version 0.90.3) this error
shouldn't occur any more.
On 6 September 2013 12:51, subin ksubins321@gmail.com wrote:
I run ES v 0.90.0. I'm facing 'StringIndexOutOfBoundsException: String
index out of range: -1 ' only when sending log from a particular server
through logstash to ES.
Below is a sample log from that server:
06-Sep-2013 06:10:45.934 transfer of 'domain.ca/IN' from 10.0.4.83#53:
failed while receiving responses: SERVFAIL
The complete error stack is here:
java StringIndexOutOfBoundsException: String index out of range: -1 · GitHub
My ES template: gist:6462299 · GitHub
Any help would be highly appreciated.
Thanks,
--
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 .
--
Met vriendelijke groet,
Martijn van Groningen
--
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 .
subin
(subin)
September 24, 2013, 5:56pm
3
I've upgraded and ithas got fixed.
Thanks a lot.
On Friday 06 September 2013 05:01 PM, Martijn v Groningen wrote:
This is a known bug in 0.90.0 which has been fixed:
TransportAnalyzeAction causes StringIndexOutOfBoundsException on first attempt to analyze a numeric field · Issue #2953 · elastic/elasticsearch · GitHub
If you upgrade (I recommend the latests version 0.90.3) this error
shouldn't occur any more.
On 6 September 2013 12:51, subin <ksubins321@gmail.com
mailto:ksubins321@gmail.com > wrote:
I run ES v 0.90.0. I'm facing 'StringIndexOutOfBoundsException:
String index out of range: -1 ' only when sending log from a
particular server through logstash to ES.
Below is a sample log from that server:
06-Sep-2013 06:10:45.934 transfer of 'domain.ca/IN
<http://domain.ca/IN>' from 10.0.4.83#53: failed while receiving
responses: SERVFAIL
The complete error stack is here:
https://gist.github.com/anonymous/6462292
My ES template: https://gist.github.com/anonymous/6462299
Any help would be highly appreciated.
Thanks,
--
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%2Bunsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
--
Met vriendelijke groet,
Martijn van Groningen
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/iRKLe38hxys/unsubscribe .
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
--
Subin
--
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 .