A refused connection usually means the requested address and port have no service accepting the connection. It is not the same as an incorrect model name or an exhausted API balance. First establish whether Ollama itself answers; only then troubleshoot the app calling it.
Three checks, in order
- Open Ollama from your applications or Start menu. If you installed only the command-line version and no server is running, use
ollama servein a terminal. Leave that terminal open. If it reports that the address is already in use, do not keep starting copies: a service may already own the port. - On Windows PowerShell, run
Invoke-RestMethod http://localhost:11434/api/tags. On macOS/Linux, runcurl http://localhost:11434/api/tags. A JSON response containing amodelsarray means this API is reachable from that machine. An empty array means the connection works but there are no listed local models. - Run
ollama listand select an exact installed model name in your client. If the API works here but your client fails, compare its configured server address. Inside a container,localhostrefers to that container, not automatically your computer.
If it still fails
Read the server log rather than changing firewall rules blindly. On Windows, open %LOCALAPPDATA%\Ollama\server.log in a text editor. On a systemd Linux installation, journalctl -u ollama --no-pager --lines=80 shows recent entries. On macOS, check ~/.ollama/logs/server.log.
Do not expose port 11434 publicly to fix a local connection. If you ask for help, include your OS, Ollama version, installation method, the attempted address and the relevant error lines. Remove prompts, usernames, keys and other private content from logs first.
Verify the fix
Repeat the API check, then send a short harmless prompt through the original client. A successful API listing alone does not prove model inference works.
Documentation checked November 14, 2026. These are diagnostic steps, not a claim that every platform was installed and tested by The Butler.