When I try it locally (with changes to the code), I can use auth if I inject args["http_auth"] = ("user", "password")
Yes I see. But the current env doesn't reach there because it cannot be decoded by pyhocon.
So I assume the only difference from a working setup is adding http_auth=(user,password)
to the args
section in the config
of course because the tuple is valid in Python.
but there's no way I can supply a tuple in the HOCON format (of json for that matter(
Oh, you think the problem is tuple vs list?
yes. Tuple is not valid. like json. only scalar, string, dict or array
I'm using a simple pyhocon code to test it and it won't decode. So it won't reach the code to ovverride settings at all.
Well, from the ES driver code:if http_auth is not None: if isinstance(http_auth, (tuple, list)): http_auth = ":".join(http_auth)
so both list and tuple are supported...
You should just do something like:{hosts: ["clearml-elasticsearch-es-http"], args: { timeout: 60, dead_timeout: 10, max_retries: 3, retry_on_timeout: true, http_auth=["elastic", "passpasspass"], scheme="https", port=443, index_version: "1"}}
wow man you're the best!
SuccessfulKoala55
That wouldn't have crossed my mind especially when it's not in the docs.
It's still not connecting XD
but parsing is successful 😄
It's still not connecting XD
Any info on why it's not connecting?
curl works with the same url and creds from the container...
I'd try more variations, like trying to see if a different URL scheme in the host field helps:{hosts: ["
"], args: { timeout: 60, dead_timeout: 10, max_retries: 3, retry_on_timeout: true, http_auth=["elastic", "passpasspass"], scheme="https", port=443, index_version: "1"}}
Also, note you're specifying port=433
- perhaps you need port 9200?
I changed them and tried some combinations to no avail...
I assume it should change the retry pattern too. but it doesn't change.. I feel I'm missing something obvious here
there's no log of connecting to elasticsearch now 😕
does it mean it is okay?
the api server doesn't come up though. readiness probe fails.
What about trying:{hosts: ["
"], args: { timeout: 60, dead_timeout: 10, max_retries: 3, retry_on_timeout: true, http_auth=["elastic", "passpasspass"], index_version: "1"}}
(of course, using the correct port - I used 9200 here, I'm not sure if you need 9200 or 443)
no. tried many variations. I'm not sure if it's reading the variable or not. because wait times don't change either
it is indeed parsing because invalid hocon leads to error. but nothing changes about retry times etc
if it's parsing, the container will fail to start and you'll se an error in the log...