Skip to main content

Troubleshoot

Find the symptom. Then run the command that shows the cause.

A host​

SymptomCauseDo this
A red dot next to the host on the Admission pageThe host is offline: its agent has not reported for some time.On the host: systemctl status osapi-agent, or sudo launchctl print system/io.osapi.agent. Read its log.
mkdir /etc/osapi: permission denied at startThe agent cannot write agent.pki.key_dir.Run the agent as root, or set agent.pki.key_dir to a directory that its user owns.
The host stays pendingIt asked to join with no token, and no admin admitted it.osapi client admission admit, or give it a join string.
The agent stops: the token expired, or has no use leftThe token of its join string cannot admit it.osapi controller join token create, and give the host the new string.
The agent stops: the certificate does not matchThe NATS server has a new certificate since the token was made.Make a new token. Its string has the fingerprint of the new certificate.
verified: false in agent listA registration did not pass the check of the host's key.osapi client agent get --hostname <host>. Compare its fingerprint with admission get.
A host was deleted, and its agent still runsThe agent has the keys of its old admission.Stop it, empty its agent.pki.key_dir, and give it a join string.
A job shows skipped for a hostThe host's OS cannot do the operation, such as power management in a container.osapi dsl behavior get --name <behavior> lists the platforms of each method.

NATS​

SymptomCauseDo this
no responders at a joinNo controller answers the join, or the bootstrap user cannot send the request.Start the controller. Make the NATS credentials again after an upgrade.
Authorization ViolationThe NATS user of a process does not have a subject that the process uses.osapi nats permissions get --role <role>. Make the credentials again, or add the subject.
authentication error for an agent, with auth calloutThe callout refused it: the host is revoked or not admitted, or it joined again with a new key.osapi client audit list has the nats.connect entry with the reason.
nkeys not supported by the server at an agent's startThe server offers no nonce: it has no nkey user.Make the callout user an nkey (2. NATS).
maximum control line exceededYour NATS server refuses a long user JWT.Set max_control_line: 32KB in the config of your server.
osapi client health status shows a stream as missingThe streams and buckets were not made on your server.osapi nats setup.

The controller and the CLI​

SymptomCauseDo this
A config error at startA key breaks its rule.osapi config validate -f <file> gives the key, the rule and the fix.
401 from the APIThe token is not signed by a key of signing_keys, or expired.osapi controller token validate --token - on the controller, with the token on its input.
403 from the APIThe roles of the token do not grant the permission.osapi controller role get --name <role>.
A setting does not have the value that you setAn environment variable has priority over the file.osapi config get --key <key> shows the source of the value.