Error: something went wrong, please see the ollama server logs for details from
ollama list, ollama ps or ollama show appeared in this
test when OLLAMA_HOST carried a path, http://127.0.0.1:15960/api.
Remove the path, keep only scheme, host and port, and the same commands work.
The server log, as the message suggests, shows the reason: every command sent
HEAD "/api/" and got a 404.
The error
PS> $env:OLLAMA_HOST = "http://127.0.0.1:15960/api"
PS> ollama list
Error: something went wrong, please see the ollama server logs for details
exit=1
PS> ollama ps
Error: something went wrong, please see the ollama server logs for details
exit=1
PS> ollama show qwen2.5:0.5b
Error: something went wrong, please see the ollama server logs for details
exit=1
Why it happens
The value looks reasonable, because Ollama's endpoints do live under /api.
But the server log of the test server shows what the client asked for with that value:
PS> docker logs --since 1m fix9-olc-srv 2>&1 | ForEach-Object { "$_" } | Select-String '/api' | ForEach-Object { "$_" }
...
[GIN] 2026/11/10 - 03:26:30 | 404 | 16.877µs | 172.17.0.1 | HEAD "/api/"
[GIN] 2026/11/10 - 03:26:30 | 404 | 16.358µs | 172.17.0.1 | HEAD "/api/"
[GIN] 2026/11/10 - 03:26:30 | 404 | 16.279µs | 172.17.0.1 | HEAD "/api/"
One HEAD "/api/" per command, each answered 404, and the client turned that
into the generic message. A minute earlier the same server had logged
GET "/api/tags" with 200 for an ollama list run without the path.
Each log line reads from left to right as date and time, HTTP status, time taken, the
client address, the method and the path. When the CLI says "something went wrong", those
last columns are where to look: in this test a 404 on a path nobody meant to call pointed
at the address in OLLAMA_HOST, not at the model or the server. Only the
container's log was read here; the Windows app and a Linux service keep theirs in other
places. A request to the doubled path answers 404 as well:
PS> curl.exe -s -i http://127.0.0.1:15960/api/api/tags
HTTP/1.1 404 Not Found
Content-Type: text/plain
...
404 page not found
The fix
PS> $env:OLLAMA_HOST = "http://127.0.0.1:15960"
PS> ollama list
NAME ID SIZE MODIFIED
exit=0
PS> ollama ps
NAME ID SIZE PROCESSOR CONTEXT RUNNER UNTIL
exit=0
Both tables are empty because the test server had no models and nothing loaded; the
headers show that the server answered. In the test OLLAMA_HOST worked with the
address of the server and failed with the address of its API. A trailing slash with no
path, http://127.0.0.1:15960/, also worked in the same session, and so did
the plain 127.0.0.1:15960 without a scheme, so the only part to remove is
the path.
How it was reproduced
Windows client ollama version is 0.40.14 in Windows PowerShell 5.1, with
OLLAMA_HOST set in the script's own process only. The server was
docker run -d --name fix9-olc-srv -p 127.0.0.1:15960:11434 ollama/ollama
(server 0.40.8), the test's own container, removed afterwards. Its log was read with
docker logs --since 1m right after the three failing commands.
Frequently asked
- What does Ollama something went wrong, please see the ollama server logs mean?
- In this test the server answered HEAD /api/ with 404 and the client printed only this generic message; the cause was a path in OLLAMA_HOST.
- Should OLLAMA_HOST include /api?
- No. In the test http://127.0.0.1:15960/api gave something went wrong for list, ps and show, and http://127.0.0.1:15960 worked.
- Where are the Ollama server logs?
- For the Docker container in this test, docker logs with the container name printed them. The log lines show each request path and its status code.
More decoded errors in the Fixes category. Other
OLLAMA_HOST typos and their messages are in
invalid host:
ParseAddr unexpected character.