Quickstart local hosted 'no such host' error

Hi,

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.

Can anyone help me?

hi @MCKBS !!

Welcome to our community :hugs:

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.

Are you running this on Linux, Mac or Windows?

Let me know if that helps!

Thanks!

1 Like

Hi!

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’

ok, do you mind running ollama also inside docker?

Maybe the host.docker.internal name is a Docker Desktop thing :thinking:

We have recently discussed about this here:

Running ollama alongside your Weaviate, will allow you to use:

http://ollama:11434

as your ollama endpoint.

Let me know if that helps!

1 Like

Oh, just found this, that can help you still use the local:

So maybe adding it to the container:

extra_hosts:
    - "host.docker.internal:host-gateway"

Thanks!

1 Like

Thank you!!! Now it is running without errors!

I actually had to use both of your solutions to make it work :grinning:

I’am now running Ollama in docker instead AND added

extra_hosts:
    - "host.docker.internal:host-gateway"

Thank you again for the help and have a nice day!!

EDIT: I still can’t reach

http://ollama:11434

but it is working fine right now so I don’t mind lol

1 Like