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

Unable to connect to Ollama #45

Open
rmd1433 opened this issue Apr 24, 2024 · 18 comments
Open

Unable to connect to Ollama #45

rmd1433 opened this issue Apr 24, 2024 · 18 comments
Labels
bug Something isn't working

Comments

@rmd1433
Copy link

rmd1433 commented Apr 24, 2024

Hello!

I'm experiencing an issue connecting to the local Ollama server while using your page-assist extension. The application displays "Unable to connect to Ollama 🦙" message and a red icon.

I've tried various recommendations from the documentation and discussions, but the problem persists.

Could you provide instructions for running the local Ollama server or suggest other solutions to this issue?

Thank you for your assistance!

@n4ze3m
Copy link
Owner

n4ze3m commented Apr 24, 2024

Hey, sorry about that. Is your Ollama server running locally? If not, you need to run it. You can download Ollama from here: https://ollama.com/download

@n4ze3m n4ze3m added the bug Something isn't working label Apr 24, 2024
@oatmealm
Copy link

I'm jumping in to ask about using a remote installation of ollama. When trying something like http://10.0.0.10:11434 as the url_base it can't find the server. The server is accessible remotely otherwise from other client, like ios or cli.

@oatmealm
Copy link

Just to say that the project is really impressive (I've tried with a local server as well). thanks!

@n4ze3m
Copy link
Owner

n4ze3m commented Apr 24, 2024

I'm jumping in to ask about using a remote installation of ollama. When trying something like http://10.0.0.10:11434 as the url_base it can't find the server. The server is accessible remotely otherwise from other client, like ios or cli.

Usually, page assist works with the remote server. I will try to debug it. Maybe it's because of this issue: ollama/ollama#2335

Just to say that the project is really impressive (I've tried with a local server as well). thanks!

thanks :)

@oatmealm
Copy link

Great!
I've been looking around the console and I do see 403 forbidden... which is strange. OLLAMA_ORIGINS is set with a wildcard... I'm seeing same problem with Lumos

@oatmealm
Copy link

some more info... I'm running ollama manually on the server to trace:

OLLAMA_HOST=0.0.0.0 OLLAMA_ORIGINS=chrome-extension://* ollama serve

image
image

@n4ze3m
Copy link
Owner

n4ze3m commented Apr 24, 2024

🤔 can you try this command

OLLAMA_HOST=0.0.0.0 OLLAMA_ORIGINS=* ollama serve

@oatmealm
Copy link

It did.
Again, amazing work. Really enjoy using the app.
Would love to help in testing if you need help or feedback.

@n4ze3m n4ze3m mentioned this issue May 12, 2024
@n4ze3m
Copy link
Owner

n4ze3m commented May 13, 2024

Hey guys, a new fix has been released for this issue. All you need to do is go to Settings > Ollama setting and enable custom origin URL, which will resolve the issue.

image

for more information: https://github.com/n4ze3m/page-assist/blob/main/docs/connection-issue.md

@MicPec
Copy link

MicPec commented May 14, 2024

I am having trouble getting Ollama to work on my Vivaldi browser. Ollama is up and running, everything works fine on Firefox, but I can't seem to establish a connection on Vivaldi.
Screenshot from 2024-05-14 20-56-52

@n4ze3m
Copy link
Owner

n4ze3m commented May 14, 2024

Hey @MicPec

I just tested it on the Vivaldi browser (windows) , and it seems to be working fine. Can you try turning on this setting from the web UI settings > Ollama setting? It may resolve the issue.

for more details: https://www.youtube.com/watch?v=fydtRnxjfJU or https://github.com/n4ze3m/page-assist/blob/main/docs/connection-issue.md#solutions

image

@n4ze3m n4ze3m pinned this issue May 14, 2024
@MicPec
Copy link

MicPec commented May 14, 2024

Thanks for quick response. I did try this before, no luck. BTW this is the Linux machine.
Open WebUI and Lobe Chat are working fine on Vivaldi so connection is blocked from extension. Maybe some vivaldi hidden settings, but I could't find.

@n4ze3m
Copy link
Owner

n4ze3m commented May 15, 2024

Hey @MicPec , I will test on my Linux machine with Vivaldi. For OpenWebUI and LobreChat, they have a server, but for PageAssist, everything happens in the browser, which is why this issue exists

Another fix is by changing Custom origin url in advance settings to chrome-extension://jfgfiigpkhlkbnfnbobbkinehhfdhndo, then you need to restart Ollama with the following environment variable, which may work:

OLLAMA_ORIGINS=chrome-extension://* ollama serve

source: ollama/ollama#2335 (comment)

@MicPec
Copy link

MicPec commented May 15, 2024

I've managed to run it, the problem was completely different. The connection was blocked by uBlock 🤦🏻‍♂️, so I had to add jfgfiigpkhlkbnfnbobbkinehhfdhndo to the exceptions lists. Now everything works fine.
Thanks for Your help anyway

@oatmealm
Copy link

Talking of which, and it's not specific to page-assist, I had to change OLLAMA_ORIGINS=chrome-extension://* to a promiscuous * , since nothing was able to connect any more remotely, or locally like from this extension (I'm using Firefox).

@n4ze3m
Copy link
Owner

n4ze3m commented May 27, 2024

Hey @oatmealm

In the latest version of Page Assist, there is an advanced URL configuration. All you need to do is enable Enable or Disable Custom Origin URL.

image

@oatmealm
Copy link

Is it needed when OLLAMA_ORIGINS is set correctly?

@n4ze3m
Copy link
Owner

n4ze3m commented May 28, 2024

Is it needed when OLLAMA_ORIGINS is set correctly?

Not needed :) An alternative method only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants