LLocalSearch
LLocalSearch copied to clipboard
Error: Post 'host.docker.internal:11434': unsupported protocol scheme 'host.docker.internal'
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]
Hi. Please confirm that you're using the latest version of the docker-compose file. Run "git pull" to get it
You need to add http://
in - OLLAMA_HOST=${OLLAMA_HOST:-http://host.docker.internal:11434}
In the current version it's missing the protocol
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?
Here https://github.com/nilsherzig/LLocalSearch/blob/ed098b201c8494b6593bcd410bafeffb561d4856/docker-compose.yaml#L6
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')))
But this is not the same error at all.
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
- 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.
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
Can somebody help with this? I have the same error but i have little knowledge of docker
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}
export OLLAMA_HOST=http://host.docker.internal:11434
Perfect it is working thank you again for your help !!!
for anyone still having this issue, you can also simply add "http://" inside the admin panel of Open WebUI.