Troubleshooting¶
pasture status and the log say what pasture did and why.
Files says where the log is on macOS and on Linux. Each error
below reaches the tool that sent the request, in Ollama's usual
{"error": "..."} form. Over HTTPS and the
link, pasture's own 401 and 403 answers
use the OpenAI form instead, {"error": {"message": "...", "type": "..."}},
and API keys says what they mean there.
507 Insufficient Storage¶
The model would not fit within the budget and the reserve, and the message says
which. It fails at once when the room would not suffice even if every model
that is not pinned, in memory, or in use moved away. The message ends with what
to change: raise the budget with pasture budget when the budget stops the
model, and lower the reserve with pasture reserve when the reserve does, to
the size it names or less. Unpinning a model, stopping a loaded one with
pasture stop, and deleting models you no longer need with pasture remove
also make room. When the message says the disk has
not yet freed space, Time Machine local snapshots may hold it;
tmutil listlocalsnapshots / lists them, and macOS deletes them as space runs
low.
503 Service Unavailable¶
The model could not come back for another reason, which the message gives, such as an archive folder that pasture cannot read.
403 Forbidden¶
Ollama refuses requests from this Host or Origin, so pasture does too. A web
page on another site gets this answer. To allow an origin, run pasture allow,
for example pasture allow https://app.example.
401 Unauthorized¶
The request needs pasture's admin token. Every /pasture/ route needs it, and
so does a web page's delete of a model that is moved away or that the archive
holds a copy of. The pasture command sends the token from the token file.
When it gets this answer, run it as the user that runs pasture serve, with
the same PASTURE_STATE. Delete a model with pasture remove instead of from
a web page.
502 Bad Gateway¶
ollama serve is not answering on the backend address, 127.0.0.1:11435.
pasture starts it again, with a longer wait after each quick stop, and the log
says once when it keeps stopping. The lines of ollama serve in the log say
why. When pasture finds no ollama command, it downloads Ollama, and after a
failed download the log says why and pasture tries again 10 minutes later. To
use an ollama command that pasture does not find, set ollama_path in the
config file.
Port conflicts¶
pasture serves 127.0.0.1:11434, Ollama's usual port. When it cannot listen
there, the log says so and names the likely cause: the Ollama app on macOS, or
ollama.service on Linux. pasture install names a likely cause too.
lsof -nP -iTCP:11434 -sTCP:LISTEN shows which program holds the port. Quit
the Ollama app and remove it from Login Items, or run
brew services stop pasture when Homebrew runs another copy of pasture. On
Linux, stop and disable ollama.service, as Linux shows.
When another ollama serve already answers on the backend port, pasture uses
it as it is, so the variables you set with pasture env do not reach it. Stop
that server, or set backend in the config file to another address.