Skip to content

Error while connecting to ES 6.4 #355

Description

@arsalan993

I have two ES 6.4 databases. On one of it connects sucessfully while on other one it throws this error

elastalert_1  | 08:32:23.613Z  INFO elastalert-server: Router:  Listening for GET request on /config.
elastalert_1  | 08:32:23.617Z  INFO elastalert-server: ProcessController:  Starting ElastAlert
elastalert_1  | 08:32:23.617Z  INFO elastalert-server: ProcessController:  Creating index
elastalert_1  | 08:32:24.229Z ERROR elastalert-server:
elastalert_1  |     ProcessController:  Traceback (most recent call last):
elastalert_1  |       File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
elastalert_1  |         return _run_code(code, main_globals, None,
elastalert_1  |       File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
elastalert_1  |         exec(code, run_globals)
elastalert_1  |       File "/opt/elastalert/elastalert/create_index.py", line 268, in <module>
elastalert_1  |         main()
elastalert_1  |       File "/opt/elastalert/elastalert/create_index.py", line 250, in main
elastalert_1  |         es = Elasticsearch(
elastalert_1  |       File "/home/node/.local/lib/python3.8/site-packages/elasticsearch/client/__init__.py", line 206, in __init__
elastalert_1  |         self.transport = transport_class(_normalize_hosts(hosts), **kwargs)
elastalert_1  |       File "/home/node/.local/lib/python3.8/site-packages/elasticsearch/transport.py", line 108, in __init__
elastalert_1  |         self.set_connections(hosts)
elastalert_1  |       File "/home/node/.local/lib/python3.8/site-packages/elasticsearch/transport.py", line 157, in set_connections
elastalert_1  |         connections = list(zip(connections, hosts))
elastalert_1  |       File "/home/node/.local/lib/python3.8/site-packages/elasticsearch/transport.py", line 154, in _create_connection
elastalert_1  |         return self.connection_class(**kwargs)
elastalert_1  |       File "/home/node/.local/lib/python3.8/site-packages/elasticsearch/connection/http_requests.py", line 46, in __init__
elastalert_1  |         self.base_url = 'http%s://%s:%d%s' % (
elastalert_1  |     TypeError: %d format: a number is required, not str
elastalert_1  |     
elastalert_1  | 08:32:24.229Z ERROR elastalert-server: ProcessController:  Index create exited with code 1

Using ES python libraries i am able to connect to both and upload dataset and templates.. issue only comes with i connect via Elastalert via Praeco ..
for Elastalert i am using the docker image you shared

elastalert:
    image : 'praecoapp/elastalert-server:20200404_es6'

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions