johnsusek / praeco

Elasticsearch alerting made simple.
GNU General Public License v3.0
545 stars 87 forks source link

Not able to make connection to elasticseach #644

Closed ishukeshri2712 closed 2 months ago

ishukeshri2712 commented 2 months ago

elasticsearch.exceptions.ConnectionError: ConnectionError(HTTPConnectionPool(host='xxxx', port=9200): Max retries exceeded with url: /praeco_elastalert_status/_search?size=1000 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x783760c94a90>: Failed to establish a new connection: [Errno 111] Connection refused'))) caused by: ConnectionError(HTTPConnectionPool(host='xxxx', port=9200): Max retries exceeded with url: /praeco_elastalert_status/_search?size=1000 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x783760c94a90>: Failed to establish a new connection: [Errno 111] Connection refused')))

nsano-rururu commented 2 months ago

edit elastalert.yaml

es_conn_timeout image

nsano-rururu commented 2 months ago

It takes time to start elastcsearch. If you are configuring everything with Docker, or if you are creating a docker-compose with the assumption that they will run simultaneously, you need to make sure that elasticsearch can be connected, and then set up a mechanism to connect elastarert2. Below is a sample that I use to check the operation. https://github.com/nsano-rururu/elastalert-server_praeco_docker-compose_sample

nsano-rururu commented 2 months ago

It takes time to start elasticsearch. In my local environment, it takes about 5 minutes for elasticsearch to start.

nsano-rururu commented 2 months ago

I think the situation will be different depending on the server's performance (cpu, memory, disk, etc.)...

ishukeshri2712 commented 2 months ago

This issue is solved elasticsearch was not exposed to 0.0.0.0 that is the reason container not able to connect to ES running in VM