Description
I need to use v4 to connect my weaviate through ingress.
If i use internal url, it works:
client = weaviate.WeaviateClient(
connection_params=ConnectionParams.from_params(
http_host="weaviate.testns.svc.cluster.local",
http_port="80",
http_secure=False,
grpc_host="weaviate-test-grpc.datalake.c.eu-nl-1.cloud.sap",
grpc_port="443",
grpc_secure=False,
),
auth_client_secret=weaviate.auth.AuthApiKey("jane-secret-key"),
# additional_headers={
# "X-OpenAI-Api-Key": os.getenv("OPENAI_APIKEY")
# },
additional_config=weaviate.config.AdditionalConfig(
startup_period=10,
timeout=(5, 15) # Values in seconds
),
)
If i changed to external ingress it failed.
client = weaviate.WeaviateClient(
connection_params=ConnectionParams.from_params(
http_host="weaviate-test.mydomain.com,
http_port="443",
http_secure=False,
grpc_host="weaviate-test-grpc.mydomain.com",
grpc_port="443",
grpc_secure=False,
),
auth_client_secret=weaviate.auth.AuthApiKey("jane-secret-key"),
# additional_headers={
# "X-OpenAI-Api-Key": os.getenv("OPENAI_APIKEY")
# },
additional_config=weaviate.config.AdditionalConfig(
startup_period=10,
timeout=(5, 15) # Values in seconds
),
)
Of course i tested both:
curl https://ssdl-weaviate-test.mydomain.com/v1
and
grpcurl -d ‘{“service”: “Weaviate”}’ health.proto weaviate-test-grpc.mydomain.com:443 grpc.health.v1.Health/Check
Both are working without error.
Server Setup Information
- Weaviate Server Version: the latest from helm, 1.24.8
- Deployment Method: k8s
- Multi Node? Number of Running Nodes: 1
- Client Language and Version: Python weaviate-client==4.5.5
Any additional Information
The error from python code are:
Traceback (most recent call last):
File "/Users/alan/weaviate-demo/pythonProject/.venv/lib/python3.9/site-packages/weaviate/connect/v4.py", line 141, in connect
self._weaviate_version = _ServerVersion.from_string(self.get_meta()["version"])
File "/Users/alan/weaviate-demo/pythonProject/.venv/lib/python3.9/site-packages/weaviate/connect/v4.py", line 579, in get_meta
res = _decode_json_response_dict(response, "Meta endpoint")
File "/Users/alan/weaviate-demo/pythonProject/.venv/lib/python3.9/site-packages/weaviate/util.py", line 929, in _decode_json_response_dict
raise UnexpectedStatusCodeError(location, response)
weaviate.exceptions.UnexpectedStatusCodeError: Meta endpoint! Unexpected status code: 400, with response body: None.