I was following the Weaviate quickstart tutorial (Locally hosted | Weaviate) and stumbled upon an error while doing step 2.2 (python).
I successfully did the prerequisites, all of step 1 and step 2.1.
Now, when I run my ‘quickstart_import.py’ I did for step 2.2 I get the following error:
{'message': 'Failed to send all objects in a batch of 10', 'error': 'WeaviateInsertManyAllFailedError(\'Every object failed during insertion. Here is the set of all errors: send POST request: Post "http://host.docker.internal:11434/api/embed": dial tcp: lookup host.docker.internal on 127.0.0.11:53: no such host\')'}
{'message': 'Failed to send 10 objects in a batch of 10. Please inspect client.batch.failed_objects or collection.batch.failed_objects for the failed objects.'}
Number of failed imports: 10
First failed object: ErrorObject(message='WeaviateInsertManyAllFailedError(\'Every object failed during insertion. Here is the set of all errors: send POST request: Post "http://host.docker.internal:11434/api/embed": dial tcp: lookup host.docker.internal on 127.0.0.11:53: no such host\')', object_=BatchObject(collection='Question', properties={'answer': 'Liver', 'question': 'This organ removes excess glucose from the blood & stores it as glycogen', 'category': 'SCIENCE'}, references=None, uuid='99dbfe6e-02db-4b7c-aa57-bbaed5513e08', vector=None, tenant=None, index=0, retry_count=0), original_uuid=None)
The ‘dial tcp: lookup host.docker.internal on 127.0.0.11:53: no such host’ part seems to be the major culprit. I bet it is a stupidly simple solution but I just can’t figure it out.
This looks like an issue with docker failing to resolve host.docker.internal
for example, if your weaviate can find ollama at host.docker.internal, it should be able to run this, that is basicallying Weaviate vectorizing something in Ollama:
docker-compose exec -ti weaviate wget -O - --post-data='{"model":"nomic-embed-text","input":"Why is the sky blue?"}' http://host.docker.internal:11434/api/embed
this should outcome some thing like
Connecting to host.docker.internal:11434 (0.250.250.254:11434)
writing to stdout
{"model":"nomic-embed-text","embeddings":[[0.009724553,0.04449892,-0.14063916,0.
Thank you for your reply!
I’am running this on Linux (Ubuntu 24.04).
Unfortunately that did not work:
for example, if your weaviate can find ollama at host.docker.internal, it should be able to run this, that is basicallying Weaviate vectorizing something in Ollama:
wget: bad address 'host.docker.internal:11434'
Also, if I try:
wget host.docker.internal:11434
I get:
--2025-01-29 08:22:45-- http://host.docker.internal:11434/
Resolving host.docker.internal (host.docker.internal)... failed: Name or service not known.
wget: unable to resolve host address ‘host.docker.internal’