Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Cpuerpxm opened this issue Apr 17, 2024 · 12 comments
Labels
question Further information is requested

Comments

@Cpuerpxm
Copy link

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 Cpuerpxm added the question Further information is requested label Apr 17, 2024
@nilsherzig
Copy link
Owner

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

@eratio08
Copy link

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

@dilzilla
Copy link

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?

@eratio08
Copy link

Here

- OLLAMA_HOST=${OLLAMA_HOST:-host.docker.internal:11434}

@dilzilla
Copy link

dilzilla commented Apr 24, 2024

Here

- OLLAMA_HOST=${OLLAMA_HOST:-host.docker.internal:11434}

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')))

@eratio08
Copy link

But this is not the same error at all.

@foxjeef
Copy link

foxjeef commented Apr 25, 2024

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.

@culurciello
Copy link

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

@EnderRobber101
Copy link

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

@eratio08
Copy link

If you get unsupported protocol scheme 'host.docker.internal change

- OLLAMA_HOST=${OLLAMA_HOST:-host.docker.internal:11434}

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

@shambahri
Copy link

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

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

@wellrundigital
Copy link

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

openwebui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

9 participants