question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ElasticSearch ArrayIndexOutOfBoundsException

See original GitHub issue

Hello,

I’m trying to use the ElasticSearch5-Rest Client to connect to an AWS ElasticSearch instance but I keep getting an exception when trying to start the workload.

Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 1
	at com.yahoo.ycsb.db.elasticsearch5.ElasticsearchRestClient.init(ElasticsearchRestClient.java:87)
	at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:86)
	at com.yahoo.ycsb.ClientThread.run(ClientThread.java:91)
	at java.lang.Thread.run(Thread.java:748)

I’ve also tried with the regular ElasticSearch and ElasticSearch5 bindings. Any help would be much appreciated.

Thanks, Huy

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
risdenkcommented, Aug 26, 2019

@hngo4619 - What is the full command you used to launch?

Most likely you are not specifying es_host:es_port for your host list:

https://github.com/brianfrankcooper/YCSB/blob/master/elasticsearch5/src/main/java/com/yahoo/ycsb/db/elasticsearch5/ElasticsearchRestClient.java#L87

The elasticsearch5 binding readme describes the required format -https://github.com/brianfrankcooper/YCSB/tree/master/elasticsearch5

0reactions
madonhecommented, Sep 11, 2019

@risdenk Hi Risdenk, thank you for the assistance!

You were right, dumb mistake by me not specifying the port in the full host. I’m running into another error now if it’s not too much of a bother. I’m able to load/run a workload directly through the command line like so:

./bin/ycsb run elasticsearch5-rest -s -P workloads/workloadb -p exportfile=... -p path.home=... -p es.remote=true -p es.hosts.list=... -s -t

But when trying to launch a similar command through a Python script that runs the benchmark, I receive this error on trying to load and I’m not quite sure why I would get this error here as opposed to successfully on the command line:

Loading workload...
Starting test.
2019-08-26 19:59:55:795 0 sec: 0 operations; est completion in 0 second 
2019-08-26 20:00:05:770 10 sec: 0 operations; est completion in 106751991167300 days 15 hours 
2019-08-26 20:00:15:770 20 sec: 0 operations; est completion in 106751991167300 days 15 hours 
2019-08-26 20:00:25:770 30 sec: 0 operations; est completion in 106751991167300 days 15 hours 
java.io.IOException: listener timeout after waiting for [30000] ms
	at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:660)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:219)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:191)
	at com.yahoo.ycsb.db.elasticsearch5.ElasticsearchRestClient.performRequest(ElasticsearchRestClient.java:162)
	at com.yahoo.ycsb.db.elasticsearch5.ElasticsearchRestClient.performRequest(ElasticsearchRestClient.java:144)
	at com.yahoo.ycsb.db.elasticsearch5.ElasticsearchRestClient.init(ElasticsearchRestClient.java:124)
	at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:86)
	at com.yahoo.ycsb.ClientThread.run(Client.java:424)
	at java.lang.Thread.run(Thread.java:748)

The load command as executed from the Python script:

Command line: -db com.yahoo.ycsb.db.elasticsearch5.ElasticsearchRestClient -s -P workloads/workloadb -P /root/YCSB/workload.dat -p es.index.key=ycsb_4krpny6ibdhad30m34gc -p es.remote=true -p es.hosts.list=... -p exportfile=output/run-transactions0.dat -s -threads 1 -t

==my use this code this ok . this Elasticsearch-5.5.0 ./bin/ycsb run elasticsearch5-rest -P workloads/workloada -p “es.hosts.list=172.18.3.120:9200,172.18.3.121:9200,172.18.3.122:9200”

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix "java.lang.ArrayIndexOutOfBoundsException ...
I updated all configurations like node name and deleted the /var/lib/elasticsearch/nodes folder and tried to start the ES server on the new node ......
Read more >
Elastic Search java.lang.ArrayIndexOutOfBoundsException
Iam trying to integrate data from Hadoop to Elastic Search and it throws the above given error on the container logs of hadoop....
Read more >
JapaneseTokenizer creates Token objects with corrupt offsets
Caused by: java.lang.ArrayIndexOutOfBoundsException at org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl.copyBuffer( ...
Read more >
Index (elasticsearch 0.11.0 API) - javadoc.io
abs(Integer) - Static method in class org.elasticsearch.common.math. ... MathRuntimeException: Constructs a new ArrayIndexOutOfBoundsException with ...
Read more >
"Fossies" - the Fresh Open Source Software Archive
Member "elasticsearch-6.8.23/docs/painless/painless-api-reference/ArrayIndexOutOfBoundsException.asciidoc" (29 Dec 2021, 1105 Bytes) of package ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found