You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run a FastAPI server that calls an opensearch container that is used for RAG. When I start pushing the data through the use of opensearch-py, I get this error without any other log indicating that an error happened:
[2024-03-14T15:37:14,180][INFO ][o.o.m.c.MLCommonsClusterManagerEventListener] [2e6e2506c04f] Starting ML sync up job...
[2024-03-14T15:37:24,222][INFO ][o.o.m.c.MLSyncUpCron ] [2e6e2506c04f] ML configuration already initialized, no action needed
[2024-03-14T15:37:41,555][INFO ][o.o.p.PluginsService ] [2e6e2506c04f] PluginService:onIndexModule index:[kuzco/WLWbX0uVQYGsSiuRgNq25A]
[2024-03-14T15:37:41,574][INFO ][o.o.c.m.MetadataCreateIndexService] [2e6e2506c04f] [kuzco] creating index, cause [api], templates [], shards [1]/[0]
[2024-03-14T15:37:41,600][INFO ][o.o.p.PluginsService ] [2e6e2506c04f] PluginService:onIndexModule index:[kuzco/WLWbX0uVQYGsSiuRgNq25A]
[2024-03-14T15:37:41,623][INFO ][o.o.a.u.d.DestinationMigrationCoordinator] [2e6e2506c04f] Detected cluster change event for destination migration
[2024-03-14T15:37:41,649][INFO ][o.o.c.r.a.AllocationService] [2e6e2506c04f] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[kuzco][0]]]).
[2024-03-14T15:37:41,662][INFO ][o.o.a.u.d.DestinationMigrationCoordinator] [2e6e2506c04f] Detected cluster change event for destination migration
/usr/share/opensearch/./opensearch-docker-entrypoint.sh: line 69: 29 Killed "$@" "${opensearch_opts[@]}"
Here is the error on the side of the python server (sorry for the formatting, that's the doing of the logger library...):
{"version": "1.1", "short_message": "Creating index...", "timestamp": 1710430661.5429306, "level": 6, "host": "337681eb990f"}
{"version": "1.1", "short_message": "Index created", "timestamp": 1710430661.6673136, "level": 6, "host": "337681eb990f"}
{"version": "1.1", "short_message": "Fetching data...", "timestamp": 1710430661.6673856, "level": 6, "host": "337681eb990f"}
{"version": "1.1", "short_message": "Data fetched", "timestamp": 1710430661.8305678, "level": 6, "host": "337681eb990f"}
{"version": "1.1", "short_message": "Pushing data, don't panic if this takes a long time...", "timestamp": 1710430661.830729, "level": 6, "host": "337681eb990f"}
{"version": "1.1", "short_message": "Error pushing data", "timestamp": 1710430672.223734, "level": 3, "host": "337681eb990f", "full_message": "Traceback (most recent call last):\n File \"/usr/lib/python3.11/site-packages/urllib3/connection.py\", line 198, in _new_conn\n sock = connection.create_connection(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.11/site-packages/urllib3/util/connection.py\", line 60, in create_connection\n for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.11/socket.py\", line 962, in getaddrinfo\n for res in _socket.getaddrinfo(host, port, family, type, proto, flags):\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nsocket.gaierror: [Errno -2] Name does not resolve\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/usr/lib/python3.11/site-packages/opensearchpy/connection/http_urllib3.py\", line 264, in perform_request\n response = self.pool.urlopen(\n ^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.11/site-packages/urllib3/connectionpool.py\", line 847, in urlopen\n retries = retries.increment(\n ^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.11/site-packages/urllib3/util/retry.py\", line 445, in increment\n raise reraise(type(error), error, _stacktrace)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.11/site-packages/urllib3/util/util.py\", line 39, in reraise\n raise value\n File \"/usr/lib/python3.11/site-packages/urllib3/connectionpool.py\", line 793, in urlopen\n response = self._make_request(\n ^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.11/site-packages/urllib3/connectionpool.py\", line 496, in _make_request\n conn.request(\n File \"/usr/lib/python3.11/site-packages/urllib3/connection.py\", line 400, in request\n self.endheaders()\n File \"/usr/lib/python3.11/http/client.py\", line 1293, in endheaders\n self._send_output(message_body, encode_chunked=encode_chunked)\n File \"/usr/lib/python3.11/http/client.py\", line 1052, in _send_output\n self.send(msg)\n File \"/usr/lib/python3.11/http/client.py\", line 990, in send\n self.connect()\n File \"/usr/lib/python3.11/site-packages/urllib3/connection.py\", line 238, in connect\n self.sock = self._new_conn()\n ^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.11/site-packages/urllib3/connection.py\", line 205, in _new_conn\n raise NameResolutionError(self.host, self, e) from e\nurllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0xffff73d728d0>: Failed to resolve 'kuzco-opensearch' ([Errno -2] Name does not resolve)\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/opt/app/main/rag.py\", line 75, in recreate\n os_client.index(index=OPENSEARCH_INDEX_NAME, body=document, refresh=True)\n File \"/usr/lib/python3.11/site-packages/opensearchpy/client/utils.py\", line 181, in _wrapped\n return func(*args, params=params, headers=headers, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.11/site-packages/opensearchpy/client/__init__.py\", line 402, in index\n return self.transport.perform_request(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.11/site-packages/opensearchpy/transport.py\", line 446, in perform_request\n raise e\n File \"/usr/lib/python3.11/site-packages/opensearchpy/transport.py\", line 409, in perform_request\n status, headers_response, data = connection.perform_request(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.11/site-packages/opensearchpy/connection/http_urllib3.py\", line 279, in perform_request\n raise ConnectionError(\"N/A\", str(e), e)\nopensearchpy.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0xffff73d728d0>: Failed to resolve 'kuzco-opensearch' ([Errno -2] Name does not resolve)) caused by: NameResolutionError(<urllib3.connection.HTTPConnection object at 0xffff73d728d0>: Failed to resolve 'kuzco-opensearch' ([Errno -2] Name does not resolve))"}
Here is the docker compose that I use + the minimal code:
Describe the bug
I run a FastAPI server that calls an opensearch container that is used for RAG. When I start pushing the data through the use of opensearch-py, I get this error without any other log indicating that an error happened:
Here is the error on the side of the python server (sorry for the formatting, that's the doing of the logger library...):
Here is the docker compose that I use + the minimal code:
Related component
Other
To Reproduce
Expected behavior
The documents should be pushed normally and without errors.
Additional Details
Plugins
Security plugins disabled
Using opensearch-py
Host/Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: