LLocalSearch icon indicating copy to clipboard operation
LLocalSearch copied to clipboard

Error: Post 'host.docker.internal:11434': unsupported protocol scheme 'host.docker.internal'

Open Cpuerpxm opened this issue 10 months ago • 12 comments

I encountered an error while trying to use the LocalSearch project with Ollama and Docker installed. When running the project, I received the following error message:

"Exiting chain with error: Post 'host.docker.internal:11434': unsupported protocol scheme 'host.docker.internal'"

Steps to reproduce:

Installed Ollama and Docker Attempted to run the LocalSearch project Environment:

Operating System: [Windows 11] Docker version: [4.28]

Cpuerpxm avatar Apr 17 '24 07:04 Cpuerpxm

Hi. Please confirm that you're using the latest version of the docker-compose file. Run "git pull" to get it

nilsherzig avatar Apr 17 '24 08:04 nilsherzig

You need to add http:// in - OLLAMA_HOST=${OLLAMA_HOST:-http://host.docker.internal:11434} In the current version it's missing the protocol

eratio08 avatar Apr 19 '24 07:04 eratio08

You need to add http:// in - OLLAMA_HOST=${OLLAMA_HOST:-http://host.docker.internal:11434} In the current version it's missing the protocol

Where add this? what file?

dilzilla avatar Apr 24 '24 03:04 dilzilla

Here https://github.com/nilsherzig/LLocalSearch/blob/ed098b201c8494b6593bcd410bafeffb561d4856/docker-compose.yaml#L6

eratio08 avatar Apr 24 '24 08:04 eratio08

Here

https://github.com/nilsherzig/LLocalSearch/blob/ed098b201c8494b6593bcd410bafeffb561d4856/docker-compose.yaml#L6

Made the change and still getting there same error. Here is that terminal says as well. @nilsherzig

chromadb-1 | ERROR: [24-04-2024 20:53:20] Giving up send_request(...) after 4 tries (requests.exceptions.ConnectionError: HTTPSConnectionPool(host='us-api.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xffff62315690>: Failed to establish a new connection: [Errno 111] Connection refused')))

dilzilla avatar Apr 24 '24 20:04 dilzilla

But this is not the same error at all.

eratio08 avatar Apr 25 '24 05:04 eratio08

The following is the installation process: Configure and run Ollama Configure system variables:

// Windows uses set, Linux uses export set OLLAMA_HOST=0.0.0.0:11434

This is to allow LLocalSearch running in the container to access the Ollama service on the host.

Run Ollama:

ollama serve

  1. Configure LLocalSearch Clone project

git clone https://github.com/nilsherzig/LLocalSearch.git cd ./LLocalSearch Copy the environment configuration file env-example in the directory to .env and modify the variables in it:

OLLAMA_HOST=http://[local IP]:11434 3) Start LLocalSearch Execute under the project path:

docker-compose up ———————————————— I changed OLLAMA_HOST in env-example to the local IP, and OLLAMA_HOST=${OLLAMA_HOST: in docker-compose.yaml to the local IP, and the problem was solved.

foxjeef avatar Apr 25 '24 10:04 foxjeef

I spent a lot of time on this... but the solution was to add this line export OLLAMA_HOST=http://host.docker.internal:11434 to your bash profile

culurciello avatar Apr 26 '24 22:04 culurciello

Can somebody help with this? I have the same error but i have little knowledge of docker

EnderRobber101 avatar Apr 29 '24 06:04 EnderRobber101

If you get unsupported protocol scheme 'host.docker.internal change https://github.com/nilsherzig/LLocalSearch/blob/ed098b201c8494b6593bcd410bafeffb561d4856/docker-compose.yaml#L6

OLLAMA_HOST=${OLLAMA_HOST:-host.docker.internal:11434}
# to
OLLAMA_HOST=${OLLAMA_HOST:-http://host.docker.internal:11434}

eratio08 avatar Apr 29 '24 08:04 eratio08

export OLLAMA_HOST=http://host.docker.internal:11434

Perfect it is working thank you again for your help !!!

shambahri avatar May 05 '24 00:05 shambahri

for anyone still having this issue, you can also simply add "http://" inside the admin panel of Open WebUI.

openwebui

wellrundigital avatar Sep 16 '24 08:09 wellrundigital