[GH-ISSUE #14511] Fix: bind: address already in use + 403 from Chrome Extension (macOS) #9415

Closed
opened 2026-04-12 22:20:31 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @kohi9noor on GitHub (Feb 28, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/14511

If you run:

OLLAMA_ORIGINS="<your_url>" ollama serve

and get:

Error: listen tcp 127.0.0.1:11434: bind: address already in use

It means the Ollama LaunchAgent is already running and auto-respawning the daemon.

  1. Check if Ollama LaunchAgent is active
launchctl list | grep -i ollama

You’ll likely see:

com.ollama.ollama
  1. Remove the LaunchAgent
launchctl remove com.ollama.ollama
  1. Verify port 11434 is free
lsof -i :11434

If nothing prints, the port is free.

  1. Start Ollama manually with CORS enabled
OLLAMA_ORIGINS="<your_url>*,http://localhost:*" ollama serve

Leave this terminal running.

  1. Verify CORS works

In another terminal:


curl -i http://localhost:11434/api/tags \
  -H "Origin: <your_url>"

You should see:

HTTP/1.1 200 OK
Access-Control-Allow-Origin: <your_url>
Originally created by @kohi9noor on GitHub (Feb 28, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/14511 If you run: ```bash OLLAMA_ORIGINS="<your_url>" ollama serve ``` and get: ```bash Error: listen tcp 127.0.0.1:11434: bind: address already in use ``` It means the Ollama LaunchAgent is already running and auto-respawning the daemon. 1. Check if Ollama LaunchAgent is active ```bash launchctl list | grep -i ollama ``` You’ll likely see: ```bash com.ollama.ollama ``` 2. Remove the LaunchAgent ```bash launchctl remove com.ollama.ollama ``` 3. Verify port 11434 is free ```bash lsof -i :11434 ``` If nothing prints, the port is free. 4. Start Ollama manually with CORS enabled ```bash OLLAMA_ORIGINS="<your_url>*,http://localhost:*" ollama serve ``` Leave this terminal running. 5. Verify CORS works In another terminal: ```bash curl -i http://localhost:11434/api/tags \ -H "Origin: <your_url>" ``` You should see: ``` HTTP/1.1 200 OK Access-Control-Allow-Origin: <your_url> ```
GiteaMirror added the documentation label 2026-04-12 22:20:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#9415