ELASTICSEARCH env variable not being read properly
See original GitHub issueDescribe the bug Did the environment variable name change?
ELASTICSEARCH
enviornment variable is not being read properly on windows machine (no linux machine to test this). Prior to the name change Rubrix was able to use the ELASTICSEARCH
setting correctly, upgrading the package cause this error:
File "c:\dev\argenv\lib\site-packages\argilla\server\daos\backend\elasticsearch.py", line 90, in __exit__
raise exception_value from exception_value
File "c:\dev\argenv\lib\site-packages\argilla\server\daos\backend\elasticsearch.py", line 312, in _create_index
if not self._index_exists(index):
File "c:\dev\argenv\lib\site-packages\argilla\server\daos\backend\elasticsearch.py", line 249, in _index_exists
return self.__client__.indices.exists(index)
File "c:\dev\argenv\lib\site-packages\opensearchpy\client\utils.py", line 177, in _wrapped
return func(*args, params=params, headers=headers, **kwargs)
File "c:\dev\argenv\lib\site-packages\opensearchpy\client\indices.py", line 331, in exists
return self.transport.perform_request(
File "c:\dev\argenv\lib\site-packages\opensearchpy\transport.py", line 410, in perform_request
raise e
File "c:\dev\argenv\lib\site-packages\opensearchpy\transport.py", line 373, in perform_request
status, headers_response, data = connection.perform_request(
File "c:\dev\argenv\lib\site-packages\opensearchpy\connection\http_urllib3.py", line 268, in perform_request
raise SSLError("N/A", str(e), e)
opensearchpy.exceptions.SSLError: ConnectionError([SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)) caused by: SSLError([SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\dev\argenv\lib\site-packages\argilla\server\server.py", line 98, in configure_elasticsearch
datasets: DatasetsDAO = DatasetsDAO.get_instance(
File "c:\dev\argenv\lib\site-packages\argilla\server\daos\datasets.py", line 62, in get_instance
cls._INSTANCE = cls(es, records_dao)
File "c:\dev\argenv\lib\site-packages\argilla\server\daos\datasets.py", line 68, in __init__
self.init()
File "c:\dev\argenv\lib\site-packages\argilla\server\daos\datasets.py", line 72, in init
self._es.create_datasets_index()
File "c:\dev\argenv\lib\site-packages\argilla\server\daos\backend\elasticsearch.py", line 985, in create_datasets_index
self._create_index(
File "c:\dev\argenv\lib\site-packages\argilla\server\daos\backend\elasticsearch.py", line 309, in _create_index
with backend_error_handler(index):
File "c:\dev\argenv\lib\site-packages\argilla\server\daos\backend\elasticsearch.py", line 102, in __exit__
raise GenericSearchError(ex)
argilla.server.daos.backend.elasticsearch.GenericSearchError: ConnectionError([SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)) caused by: SSLError([SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997))
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\dev\argenv\lib\site-packages\starlette\routing.py", line 621, in lifespan
async with self.lifespan_context(app):
File "c:\dev\argenv\lib\site-packages\starlette\routing.py", line 518, in __aenter__
await self._router.startup()
File "c:\dev\argenv\lib\site-packages\starlette\routing.py", line 598, in startup
await handler()
File "c:\dev\argenv\lib\site-packages\argilla\server\server.py", line 104, in configure_elasticsearch
raise ConfigError(
pydantic.errors.ConfigError: Your Elasticsearch endpoint at https://elastic:XXXX@localhost:9200 is not available or not responding.
Please make sure your Elasticsearch instance is launched and correctly running and
you have the necessary access permissions. Once you have verified this, restart the argilla server.
While the variable is correctly set like so:
To Reproduce Steps to reproduce the behavior:
- SET up elasticsearch outside of docker using SSL and then set
ELASTICSEARCH
environment variable. pip install argilla[server]
followed bypython -m argilla
Expected behavior server start
Environment (please complete the following information):
- OS: Windows 10
- Browser : Chrome
- Argilla Version: 1.1.1
- ElasticSearch Version: 8.2.0
Additional context This was not the issue with rubrix, I can still login into Rubrix with a downgrade
Issue Analytics
- State:
- Created 9 months ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Environment variable in Logstash not being parsed correctly
If I change my config to have a hard-coded value (e.g. 500), then the index is created without a problem. I have read...
Read more >Config environment variable not being read from /etc ... - GitHub
I am trying to use an environment variable in my Logstash configuration: elasticsearch { hosts => ["${ELASTICSEARCH_ENDPOINT}"] } But I am ...
Read more >LS environment variable handling doesn't appear to behave ...
Hi, LS Version: 5.1.2 (RPM) From the docs (https://www.elastic.co/guide/en/logstash/current/environment-variables.html): You can add ...
Read more >Environment variables - SonarQube Documentation
Database · The embedded H2 database is used by default. It is recommended for tests but not for production use. Supported databases are...
Read more >Pass variables from Elastic Beanstalk environments to Linux ...
You can pass environment variables to Amazon EC2 instances by using the ... INFO: Successfully deployed new configuration to environment.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You are correct @dvsrepo it does appear to be an SSL issue, will investigate further around signing the certificates.
Let us know if you need any further help🤓