I am trying to use weaviates v4 python client to connect to my weaviate db instance which is containerized and hosted on azure in a Web App. When using the v3 client connection works perfectly, when I try to connect with v4 an error message "Connection to Weaviate failed" occurs.
My v3 client code:
client = weaviate.Client(os.getenv("WEAVIATE_AZURE_URL"),
auth_client_secret=weaviate.AuthApiKey(os.getenv("WEAVIATE_AZURE_KEY")
)
)
v4 client code:
client = weaviate.connect_to_custom(
http_host=os.getenv("WEAVIATE_AZURE_URL"),
http_port=8080,
http_secure=False,
grpc_host="localhost",
grpc_port=50051,
grpc_secure=False,
auth_credentials=AuthApiKey(os.getenv("WEAVIATE_AZURE_KEY")), # `weaviate_key`: your Weaviate API key
)
My docker compose file
---
version: '3.4'
services:
weaviate:
command:
- --host
- 0.0.0.0
- --port
- '8080'
- --scheme
- http
image: cr.weaviate.io/semitechnologies/weaviate:1.24.10
ports:
- 8080:8080
- 50051:50051
volumes:
- weaviate_data:/var/lib/weaviate
restart: on-failure:0
environment:
CLIP_INFERENCE_API: 'http://multi2vec-clip:8080'
OPENAI_APIKEY: ''
QUERY_DEFAULTS_LIMIT: 25
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'false'
AUTHENTICATION_APIKEY_ENABLED: 'true'
AUTHENTICATION_APIKEY_ALLOWED_KEYS: ''
AUTHENTICATION_APIKEY_USERS: ''
PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
DEFAULT_VECTORIZER_MODULE: 'multi2vec-clip'
ENABLE_MODULES: 'multi2vec-clip,generative-openai,generative-cohere'
CLUSTER_HOSTNAME: 'node1'
multi2vec-clip:
image: cr.weaviate.io/semitechnologies/multi2vec-clip:sentence-transformers-clip-ViT-B-32-multilingual-v1
environment:
ENABLE_CUDA: '0'
volumes:
weaviate_data:
...
Has anyone experienced the same problem or sees what I did wrong?
I could not find any related problems, and recent azure weaviate tutorials also only use the v3 client.