oliver006/elasticsearch-test-data

can't connect to es

Closed this issue · 2 comments

root@DESKTOP-71H61H4:~/elasticsearch-test-data# python3 es_test_data.py --es_url=http://localhost:9200
[I 210806 10:48:07 es_test_data:55] Trying to create index http://localhost:9200/test_data
Traceback (most recent call last):
File "es_test_data.py", line 284, in
tornado.ioloop.IOLoop.instance().run_sync(generate_test_data)
File "/usr/local/lib/python3.6/dist-packages/tornado/ioloop.py", line 530, in run_sync
return future_cell[0].result()
File "/usr/lib/python3.6/asyncio/futures.py", line 243, in result
raise self._exception
File "/usr/local/lib/python3.6/dist-packages/tornado/gen.py", line 234, in wrapper
yielded = ctx_run(next, result)
File "/usr/local/lib/python3.6/dist-packages/tornado/gen.py", line 162, in _fake_ctx_run
return f(*args, **kw)
File "es_test_data.py", line 202, in generate_test_data
create_index(tornado.options.options.index_name)
File "es_test_data.py", line 57, in create_index
response = tornado.httpclient.HTTPClient().fetch(request)
File "/usr/local/lib/python3.6/dist-packages/tornado/httpclient.py", line 135, in fetch
functools.partial(self._async_client.fetch, request, **kwargs)
AttributeError: 'Task' object has no attribute 'fetch'
Exception ignored in: <bound method HTTPClient.del of <tornado.httpclient.HTTPClient object at 0x7f0902ab3198>>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/tornado/httpclient.py", line 113, in del
File "/usr/local/lib/python3.6/dist-packages/tornado/httpclient.py", line 118, in close
AttributeError: 'Task' object has no attribute 'close'

this is my es:
{
"name" : "DESKTOP-71H61H4",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "oJOH6P-oTrCqEV0a9Hdqlg",
"version" : {
"number" : "7.10.2",
"build_flavor" : "default",
"build_type" : "zip",
"build_hash" : "747e1cc71def077253878a59143c1f785afa92b9",
"build_date" : "2021-01-13T00:42:12.435326Z",
"build_snapshot" : false,
"lucene_version" : "8.7.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}

Can you please provide more information how you run ES and that it's available on localhost:9200 ?