Every refusal names its kind first: af prints Error:, the error code and the forge’s message. Start from the code.
| You see | It means | First step |
|---|---|---|
Sealed |
The node has no key to open its data | Unseal it |
Unavailable |
The forge cannot answer yet, and will | Make the request again |
Unauthenticated |
The forge does not know who you are, or no longer accepts it | Sign in again |
PermissionDenied |
You may not do this | Ask for access |
InvalidState |
It cannot be done to the thing as it is now | Look at it, then act on what is current |
A sealed node
Error: Sealed: the node is sealed: its recovery keys' holders unseal it with `af vault unseal`The cluster’s key lives only in its nodes’ memory. A node that starts while another member of its cluster is running takes the key from that member, but a node that starts when every node had stopped has no member to take it from, and stays sealed: it answers nothing but the vault’s own requests.
af vault status shows whether a node is sealed and how far unsealing has come. Enough recovery key holders then each run af vault unseal from their own machine, and the node opens once it has the threshold of shares. See When every node has stopped.
If any other node of the cluster is running, the sealed node only needs to reach it: start that member first, or check that the nodes can reach each other on the Raft port.
An unavailable node
Unavailable means the forge cannot answer now and will later:
- The node’s replication stopped and is starting again, as after a leader election. Ask again in a moment; before making a write again, see what a refused write did.
- The node does not lead the request’s group (
this node does not lead group …), or its leader is not yet taking writes (… is not yet taking writes: try again shortly), as just after an election. Ask again in a moment; before making a write again, see what a refused write did. - The organization’s identity provider could not be reached when the forge needed it, with the provider’s own error after
the organization's identity provider:. Check that the provider is up and reachable from the forge’s nodes.
What a refused write did
What a refused write did is said only where the forge knows it, and only of the attempt the message names. The node you reach forwards a write to its group’s leader, and when no answer it can use comes back, the message begins:
not made: …: that attempt never left the node, so it did nothing at the leader. So too when the node found no leader for the group within one election (no leader of group … was found).may have been made: …: the leader may have been asked, and no answer came, or it was an error or could not be read; or the node stopped before a quorum held what the request wrote. The write may have happened.
An upload stores its objects one at a time, and one refused after some were stored begins partly made: …: it names the objects stored before the one refused, then says what is known of that one. No other message says what a request that writes in steps had made before it was refused. Before making a write again, look at what it would change, with af status, af log or af op log, unless making it twice does no harm, as uploading an object already stored does none. The forge never makes a write again on its own.
A refused sign-in
Unauthenticated comes with what the forge found:
reading …; sign in first with `af auth`:afhas no credential on this machine yet. Runaf auth.… has been stopped or has expired: the sign-in or the agent the connection acted for is no longer live. A person signs in again withaf auth. An agent is born again by its parent, as a birth expires with its parent and a stop ends every agent born below it.the identity provider refuses: …: the organization’s provider did not accept the sign-in. Its reason follows.this organization has no identity provider: the organization was made without one. An operator sets its provider; until then nobody can sign in to it.the connection has not authenticated, or a proof that is not this actor’s or this key’s on this connection: the client did not prove who it is. Useafas it comes; a client built on the protocol must prove its actor on each connection before any other request.
Refused or declined
Two codes say no, for different reasons, and a retry of either gets the same answer:
PermissionDeniedis about who you are: a role you lack, a restricted folder you may not read or write, another actor’s operation to undo, contents an administrator purged. Ask for the access, through a role or a folder grant, or ask someone who has it.InvalidStateis about how things are now: a change that is not open, a commit that is no longer the change’s latest, nothing to redo, an operation whose changes were written since. The message says what is current. Look at it withaf statusoraf log, then act on that.
BadRequest means the request itself is wrong, such as a pattern that is not a glob or a revset jj cannot parse; the message says what to correct. NotFound means no such change, commit, operation or file: check the ID. Internal is the forge’s own failure; tell the operator, who finds it in the node’s log.
In a workspace
A workspace refuses before it asks the forge when going on would lose or misplace your work. These messages have no code: af prints Error: and the message, and nothing on disk or on the forge has changed.
| You see | It means | Do this |
|---|---|---|
1 edited file and no open change, such as notes.txt |
Your files hold edits that no change records, so a sync would write over them | Start a change to hold them, af new -m "…", or put the files back with af restore |
in the way of files of main: build/out |
Something that is not the workspace’s, such as an ignored build output, is where a file of main goes; the sync wrote every other file | Move it away, then af sync again |
sync the workspace first |
The workspace’s last change has landed or been abandoned, or its last sync was cut short | af sync |
the workspace's change is waiting to land |
Your change is submitted; the workspace follows main again once it lands or comes back | af status shows what it waits for |
the change moved on the server; sync the workspace |
Another workspace, or a landing that met a conflict, wrote the change since | af sync: it brings the change and keeps your edits |
a change of the workspace's paths is unfinished in this workspace: run it again to finish it |
An af sparse set was cut short; an undo or a redo cut short says so the same way |
Run the same command again; it finishes where it stopped |
the change holds 2 conflicts, such as in src/parser.rs |
The change cannot land while it holds conflicts | Edit the conflict markers out of each file, and af status |
'build/out' is not ignored: files that are not ignored are taken back by the next snapshot. Make sure they're ignored, then try again |
An untrack would be undone by the next snapshot | Add the files to a .gitignore, then untrack them |
'locked/file' is in a folder this actor may not write, and untracking a file writes the change: nothing was untracked |
Untracking takes a file out of the change, a write, and the folder is closed to yours | Ask for write access to the folder, or leave the file tracked |
A file you edit in a folder you may not write is not refused like this: the snapshot leaves it out, names it as refused in a warning, and takes your other edits. See Agent lesson 4.
Next
- Errors: every code, generated from the protocol.
- Start a forge: recovery keys and unsealing.
af vaultin the reference.