esbench
esbench copied to clipboard
esbench throws KeyError:'nodes' due to cluster_stats not lining up.
INFO:esbench.data:downloading 'https://s3-us-west-1.amazonaws.com/esbench/appl_2005_aa.gz' to '/tmp/appl_2005_aa.gz'... INFO:esbench.data:done downloading https://s3-us-west-1.amazonaws.com/esbench/appl_2005_aa.gz, time: 18.81s INFO:esbench.bench:loaded 6 lines into index 'esbench_test', size: 120968 (0.00MB) INFO:esbench.bench:beginning observation no: 1, 2015-06-23T17:00:23Z INFO:esbench.bench:ran query 'match_description_facet_date_histogram' 100 times in 5.35s INFO:esbench.bench:ran query 'match_description_sorted_abstract' 100 times in 4.67s INFO:esbench.bench:ran query 'match_description' 100 times in 4.62s INFO:esbench.bench:finished observation no: 1, id: 052cb9af, time: 14.635 ERROR:esbench.client:'nodes' Traceback (most recent call last): File "/root/tempdir/env/lib/python2.7/site-packages/esbench-0.2.3-py2.7.egg/esbench/client.py", line 174, in main benchmark.run(batches) File "/root/tempdir/env/lib/python2.7/site-packages/esbench-0.2.3-py2.7.egg/esbench/bench.py", line 370, in run self.observe() File "/root/tempdir/env/lib/python2.7/site-packages/esbench-0.2.3-py2.7.egg/esbench/bench.py", line 329, in observe observation.record() File "/root/tempdir/env/lib/python2.7/site-packages/esbench-0.2.3-py2.7.egg/esbench/bench.py", line 279, in record 'cluster': self._cluster_stats(), File "/root/tempdir/env/lib/python2.7/site-packages/esbench-0.2.3-py2.7.egg/esbench/bench.py", line 237, in _cluster_stats cluster_stats['node_count'] = len(cluster_stats['nodes'].keys()) KeyError: 'nodes'
Output of clusters_stats.nodes is looks like:
"nodes" : {
"count" : {
"total" :
I'm seeing this same issue as well. OS X 10.10.4, Elasticsearch 1.7.1 via Homebrew.
I'm seeing this same issue as well. Ubuntu wheezy/sid with Elasticsearch 1.5.2. via dpkg and Python 2.7.3
My fork has handlers to add support for newer versions of Elasticsearch, although not elegantly.
It looks like Tim has a pull request to handle the changed Elasticsearch API too.
I am trying to use esbench. I installed the dev version. I am using Centos 7 and 2 node ES cluster (version 1.7.1) and python 2.7.5. I see this Error. Is there a fix or workaround?
Just in case anyone else find this, this error is caused because the APIs have changed in the newer versions of ElasticSearch as alanbbr has pointed out. You can check /opt/elasticsearch/logs to see that ElasticSearch doesn't like the API call. You could remove bench.py line 237 and not get the metrics or do as alanbbr has done and try and update the code to handle the new APIs...