Yelp / elastalert

Easy & Flexible Alerting With ElasticSearch
https://elastalert.readthedocs.org
Apache License 2.0
8k stars 1.73k forks source link

elasticsearch.exceptions.ConnectionError: #1689

Open ajohnson8503 opened 6 years ago

ajohnson8503 commented 6 years ago

Has anyone reported and issue when trying to connect to Search Guard? Below is the current error I am getting.

elasticsearch.exceptions.ConnectionError: ConnectionError(HTTPSConnectionPool(host='xxxxxxxx.xxxxxxxxxxx.local', port=9200): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f2e85692490>: Failed to establish a new connection: [Errno 113] No route to host',))) caused by: ConnectionError(HTTPSConnectionPool(host='xxxxxxxxx.xxxxxxxxxxx.local', port=9200): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f2e85692490>: Failed to establish a new connection: [Errno 113] No route to host',)))

vitassecuriti commented 6 years ago

Maybe the matter is that the host with ES is not resolvable?

ajohnson8503 commented 6 years ago

I fixed the issue with the connection but now I am seeing this error below.

elasticsearch.exceptions.ConnectionError: ConnectionError(The label CN=XXX-XXX01 is not a valid A-label) caused by: IDNAError(The label CN=XXX-XXX01 is not a valid A-label)

Qmando commented 6 years ago

Interesting, I'm not really sure how well Python supports IDNA. I assume that your hostname has a non-ascii character in it. Two things to try:

  1. Use the punycode version of the domain. It should look like "xn--something".
  2. Use the IP instead of the hostname