[Question]: Receiving a connection error while connecting to Ollama on my host machine #2969
-
What is your question?I've been trying to get my local instance of Ollama to work with LibreChat for a while to no avail. I'll post my Ollama is running fine on my local machine--if I run the following, I get a valid response as expected:
However I'm getting the following error within the
More DetailsHere is my
|
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 10 replies
-
try to set the baseURL to : |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick response, although (I should have mentioned) I had tried that as well. Same error:
|
Beta Was this translation helpful? Give feedback.
-
What's your operating system? is Ollama running without docker? you may need to use the IP of your machine |
Beta Was this translation helpful? Give feedback.
-
We have the same problem, running Ubuntu 23.10 on a server with the default docker version from apt/Ubuntu repositories. Getting the following errors. Everything else is running fine, we only have a problem connecting to the Ollama server running on the host. And the Ollama instance is definitely working, a curl on the relevant endpoints goes through without a hitch. |
Beta Was this translation helpful? Give feedback.
-
I've still been unable to resolve this. I'm on linux, and oddly enough I've found that I can access a basic HTTP server running on my host with the If I add the |
Beta Was this translation helpful? Give feedback.
-
It turns out the issue was that Ollama by default only responds to the 127.0.0.1 interface. Since my host service is run with systemd, I was able to add this to the
|
Beta Was this translation helpful? Give feedback.
-
i am also facing this issue i am trying to use below for rag
it works fine in my mac but my server is linux there i am getting the above error. can anyone help. i did add Environment="OLLAMA_HOST=0.0.0.0:11434" to ollama.service file to resolve but its not working. |
Beta Was this translation helpful? Give feedback.
-
Including the solution for Mac users, found this issue by searching ECONNREFUSED... Open Terminal and type Source: https://github.com/ollama/ollama/blob/main/docs/faq.md#setting-environment-variables-on-mac |
Beta Was this translation helpful? Give feedback.
-
Hey there, For all people like my who strugles on this even after adding the environment It turns out that you need to add a forward slash at the end for it to work!!
|
Beta Was this translation helpful? Give feedback.
It turns out the issue was that Ollama by default only responds to the 127.0.0.1 interface. Since my host service is run with systemd, I was able to add this to the
ollama.service
file to resolve the issue:Environment="OLLAMA_HOST=0.0.0.0:11434"