# Troubleshooting

> For the complete documentation index, see [llms.txt](https://docs-stg.ringleader.dev/llms.txt).

> Find what is wrong with a Ringleader install: start from what you see, then check local status, a stuck workstation and the logs, read the common problems, and share the diagnostics bundle.


When something is wrong, whether Ringleader will not start on your machine, a
workstation never reaches `Ready`, or `rl shell` cannot connect, work from the outside in:

1. [Check workstation status](https://docs-stg.ringleader.dev/troubleshooting/#check-workstation-status):
   is the daemon alive, are you logged in, is the host sane?
2. [Diagnose a workstation](https://docs-stg.ringleader.dev/troubleshooting/#diagnose-a-workstation):
   what does the control plane think, and what do live probes on the workstation say?
3. [Review logs and adjust verbosity](https://docs-stg.ringleader.dev/troubleshooting/#review-logs-and-adjust-verbosity):
   raise the detail, reproduce the problem, read what the daemon recorded.

If you recognize what you see, [Common problems](https://docs-stg.ringleader.dev/troubleshooting/#common-problems)
has the cause and the fix. To share the whole picture with the Ringleader team,
[Prepare a diagnostics bundle](https://docs-stg.ringleader.dev/troubleshooting/#prepare-a-diagnostics-bundle) captures it in one `.zip` file.

## Check workstation status

Run `rl troubleshoot` with **no arguments** to print a snapshot of this machine:

```bash
rl troubleshoot
```

It reads only what is already on this machine, so it works offline and touches no
credentials. It reports:

- **Version.** The `rl` CLI version and build.
- **Host / system.** OS, kernel, architecture, CPU/RAM, virtualization, and disk
  usage for the data directory and `/`.
- **Daemon.** Whether the local daemon is running, its PID, version, uptime, and
  last log line. If the daemon is a different build from your CLI, it says so and
  tells you to run `rl daemon restart`. If the daemon cannot write its log, a
  `log failure` line says why. On Windows, an `elevated` line says when the daemon
  runs as an administrator.
- **SSH config include.** Whether your `~/.ssh/config` pulls in the
  Ringleader-managed config, so standard `ssh <workstation>` resolves. If it is missing
  or in the wrong place, it points you at
  [`rl ssh-config install`](https://docs-stg.ringleader.dev/reference/cli/commands/workstation-access/#rl-ssh-config).
- **Origins / auth.** A `node` line with this computer's node ID, when it has one. The
  ID identifies the computer to your control plane. Then each Ringleader server (origin)
  you have logged in to: its URL, your user there, its version, and whether your login is
  still valid. For each origin you are still logged in to, a `subject` line shows the
  identity your login token carries. A `node registration` line below it says how
  registering this computer's node there went.
  [Node not registered](https://docs-stg.ringleader.dev/troubleshooting/#node-not-registered)
  explains each value. It never prints the login token itself.

This is the fastest first look, and it still works when Ringleader's own database on
this machine cannot be opened: the parts that do not need it are printed, and the part
that does is named as missing rather than left out.

## Diagnose a workstation

Point `rl troubleshoot` at a workstation to diagnose it:

```bash
rl troubleshoot my-box
```

You get these views, in this order:

- **Controller view.** What Ringleader believes about the workstation: its phase, its
  conditions, and what happened on the last pass over it.
- **Egress.** This view appears only for a workstation with an egress policy. It shows
  the rule set Ringleader built for the workstation and the destinations it permits.
  It also names any destination the rule set cannot hold. If an edge VM on this computer
  serves the workstation, it names that too. It lists what the workstation's
  [Edge](https://docs-stg.ringleader.dev/reference/resources/edge/) refused in the last 24 hours, newest first:
  up to 10 rows, each with the time, the destination and port, the reason and how many
  times it was refused. The list ends with the `rl workstation egress` command that
  shows the rest. [Enforcement points](https://docs-stg.ringleader.dev/security/outbound/enforcement/)
  says what holds the policy on each provider. A live reachability check dials some permitted destinations and, where
  it can, one the policy should block.
- **Device-local port forwarding.** Which port-forwarding rule (a LocalBinding) on this
  machine points at the workstation, and what it forwards. When none does, the section
  says so, because "nothing is forwarding" is usually the answer to "why can't I reach
  my port".
- **Live probes.** Ringleader connects to the workstation and checks what is actually
  there: the OS, the Ringleader agent, Docker, disk space, your login user.
- **Provisioning timeline.** The record the agent inside the workstation keeps of
  every step it ran to set the workstation up, and whether each one succeeded.

When a workstation has done a lot, narrow the timeline:

```bash
rl troubleshoot my-box --failed              # only steps that failed
rl troubleshoot my-box --kind devtool --since 1h
rl troubleshoot my-box --reconcile latest    # only the most recent configuration pass
rl troubleshoot my-box --report-only         # just the in-VM ledger
rl troubleshoot my-box --json                # machine-readable ledger
```

The full flag list is on the
[workstation access](https://docs-stg.ringleader.dev/reference/cli/commands/workstation-access/#rl-troubleshoot-workstation)
page.

## Review logs and adjust verbosity

The Ringleader daemon keeps a log on your machine: `daemon.log` in your data
directory (`~/.ringleader` unless you set `RINGLEADER_HOME`). When you need us to look
at a problem, do three things, in this order:

1. Raise the daemon's log level so it records more detail:
   `rl daemon log-level debug`.
2. Reproduce the problem.
3. Capture the log, on its own or inside a diagnostics bundle
   (`rl troubleshoot --all --diagnostics`).

Raise the level first, because at the default level the line that explains a failure
may never be written. The running daemon picks up the new level within a few seconds
and keeps it across restarts. Run `rl daemon log-level info` to go back to the
default. The [`rl daemon`](https://docs-stg.ringleader.dev/reference/cli/commands/daemon/) page has the details.

The desktop app's **Troubleshoot** page shows two logs. Switch between **App**, the
desktop app's own log, and **Daemon**, the daemon log, and click **Refresh** to read the
latest lines. The same page generates the bundle for you, and shows the command it runs
with a **Copy** button. `rl logs <workstation>` shows a different log: the one the
Ringleader agent keeps inside a workstation.

## Common problems

Each of these problems starts with something you see, such as a message or a line in the output of
`rl troubleshoot`, and then gives the cause and the fix.

| What you see | Where to look |
|--------------|---------------|
| A `node registration` line that reads `refused` or `notAttempted` | [Node not registered](https://docs-stg.ringleader.dev/troubleshooting/#node-not-registered) |
| `rl` refuses to create a local workstation and prints a sentence saying why | [New workstation refused](https://docs-stg.ringleader.dev/troubleshooting/#new-workstation-refused) |
| A line that says "Only this device can see this workstation" | [Workstation created before node-bound workstations](https://docs-stg.ringleader.dev/troubleshooting/#workstation-created-before-node-bound-workstations) |
| **Local workstations aren't available**, or `no local provider can run a workstation on this computer` | [Local workstations unavailable](https://docs-stg.ringleader.dev/troubleshooting/#local-workstations-unavailable) |
| `docker pull` fails with `docker-credential-desktop` not found | [Docker pull failures after removing Docker Desktop](https://docs-stg.ringleader.dev/troubleshooting/#docker-pull-failures-after-removing-docker-desktop) |
| A write refused with `unknown field` and a line naming two builds | [Write refused with two builds named](https://docs-stg.ringleader.dev/troubleshooting/#write-refused-with-two-builds-named) |

### Node not registered

Your control plane keeps a record of each computer that logs in to it, called the
computer's node. [Node-bound workstations](https://docs-stg.ringleader.dev/workstations/basics/#node-bound-workstations)
depend on that record. Under each origin you are logged in to, the `node registration`
line shows one of these values:

| Value | Means |
|-------|-------|
| `registered` | the control plane accepted this computer's node |
| `notAttempted` | no registration reached the control plane. A service account's login registers a node only with `rl auth login --register-node`, and a computer that cannot read its node identity says why. |
| `refused` | the last registration failed |
| `not recorded` | this computer holds no record of a registration there yet |
| `unreadable` | `rl troubleshoot` could not read the record, and the line says why |

When a reason was recorded, the next line, `registration message`, gives it. For a refusal,
the message is the error that registration returned, which carries the control plane's own
sentence when the control plane answered.

While the line reads `refused` or `notAttempted`, workstations your control plane stores for
this computer might not run. `rl workstation create` also refuses a new local workstation in
any namespace but `local`, as
[New workstation refused](#new-workstation-refused)
describes.

After a `refused`, the daemon tries again at your control plane every five minutes while it
runs, and the line reads `registered` once a registration succeeds. If the line still reads
`refused`, or reads `notAttempted`, fix the registration in two steps:

1. If there is a `registration message` line, fix the cause it names.
2. Run `rl auth login` again. A service account logs in with
   `rl auth login --register-node`.

### New workstation refused

When `rl` cannot create a new local workstation at Ringleader, it refuses the create, stores
nothing, and prints one sentence saying why. Where creating the workstation in `local` would
help, the sentence also says that `--namespace local` keeps it on your computer, as
[Storage of a new local workstation](https://docs-stg.ringleader.dev/workstations/basics/#storage-of-a-new-local-workstation)
describes. Fix the cause, then create the workstation again. This is what `rl` says and what to
do:

| Why `rl` refuses | What to do |
| --- | --- |
| Your computer is not logged in to a control plane. | Run `rl auth login`, or create the workstation in `local`. |
| The control plane does not run workstations on a device. | Ask whoever runs Ringleader for your organization to upgrade it. |
| The running daemon does not report that it can run workstations bound to this device. | Run `rl daemon restart`. |
| This computer has no default local provider, and the workstation names none. | Follow [Local workstations unavailable](#local-workstations-unavailable) to see why, and fix what it names. |
| This login has not registered this device's node. | Run `rl auth login` again. A service account logs in with `rl auth login --register-node`. If the control plane refused the registration, the sentence gives its reason: fix that, then log in again. |
| You asked for your computer with `--to self`, or the file sets `metadata.origin: self`. | Create the workstation in `local` instead. If you already have a node-bound workstation of that name, edit that one. |
| The control plane already holds a cloud workstation of that name. | Pick another name. To change that cloud workstation instead, add its cloud provider to the file's `spec.provider`. |
| Another person's node-bound workstation already has that name in the namespace. | Pick another name. |
| Your computer already stores a workstation of that name, and you asked for the control plane with `--to` or a file that sets `spec.node`. | Pick another name, or delete the workstation on your computer first. |

Ringleader can also refuse the create for its own reasons, such as the namespace's workstation
limit or a Secret you may not use. That refusal stores nothing anywhere either.

### Workstation created before node-bound workstations

An earlier release of `rl` could store a local workstation on your computer in a namespace other
than `local`. Such a workstation stays on your computer and keeps running. You can still stop,
start, edit and delete it there. `rl get`, `rl tui` and the Ringleader application show a line
on it:

```text
Only this device can see this workstation. New workstations in this namespace are no longer stored on this device.
```

Nothing turns such a workstation into a node-bound one. To have a workstation at Ringleader
instead, create a new one in that namespace, as
[Create a node-bound workstation](https://docs-stg.ringleader.dev/workstations/basics/#create-a-node-bound-workstation)
shows, and delete the old one with `rl workstation delete` once you have copied off what you need.
To give the new workstation the old one's name, delete the old one first.

### Local workstations unavailable

The desktop app may say **Local workstations aren't available**, or
`rl local-runtime create` may stop with `no local provider can run a workstation on this
computer`. Either way, Ringleader found no local provider it can use on this machine.
Cloud workstations still work. To see why, run:

```bash
rl status
```

Under **Local providers**, each provider gets one row in one of these states:

| State | Means |
|-------|-------|
| `available` | you can run a workstation here |
| `not-registered` | this computer can run it, but the daemon did not register it |
| `unavailable` | this computer, or your account, cannot run it, and the row says why |
| `unknown` | there is no check for it, or no permission to read one |

An `unavailable` row lists the checks that failed in brackets, then the reason, as in
`vz   unavailable [helper]: ...`. The row the daemon picked ends with `default for new
workstations that name no provider`. Fix what the reason names, then run
`rl daemon restart`, because the daemon picks its default when it starts.
[Mac workstations (vz)](https://docs-stg.ringleader.dev/workstations/providers/mac/) and
[Windows workstations (hcs)](https://docs-stg.ringleader.dev/workstations/providers/windows/) list what each local provider
needs.

### Docker pull failures after removing Docker Desktop

On a Mac or a Windows PC, every `docker pull` may fail with an error like
`error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH`.
Your Docker config still names Docker Desktop's sign-in helper, and the helper went
with the app. `docker compose` and `docker buildx` can go missing the same way.

Run `rl local-runtime repair-docker` to fix both.
[Repair Docker after removing Docker Desktop](https://docs-stg.ringleader.dev/guides/repair-docker-after-removing-docker-desktop/)
shows the repair, and how to undo it.

### Write refused with two builds named

`rl` and the control plane it talks to are built at different times, and the two can
disagree about what an object may contain. When a write is refused, for example with
`unknown field`, and the two builds differ, the refusal ends with a line naming both:

```text
This rl is 0.47.1-c0779c7733193. Origin acme runs 0.47.2-c91f3a2b7d40, which is newer than this rl.
```

When the two are different releases, the line says which side is older. It names no
cause, because a write can be refused for another reason while the builds differ. If the
control plane runs the newer release, update Ringleader on this machine and try again.

`rl version` prints this `rl`'s build and the version of the workstation agent it
expects. Once the daemon has checked your control plane, it also prints the line naming
both builds.

## Prepare a diagnostics bundle

A **diagnostics bundle** is one `.zip` file describing your Ringleader install, made to
be sent to us as it is. It gathers what you would otherwise collect by hand: what
`rl troubleshoot` prints, the daemon log and, when you ask for them, your workstations and
the records around them. It leaves out your login tokens, your Secret values and the text
of your sessions.

It is the first thing we ask for when you get in touch about a problem.

### Bundle contents

What a bundle holds depends on the command that made it. Every bundle describes this
computer and its Ringleader install:

- What the local report of `rl troubleshoot` covers, in one file each: the host, the
  daemon, the origins you are logged in to, and the `rl` version.
- Your feature flag values.
- The port-forwarding rules (LocalBindings) on this computer, and the workstations the
  daemon has already created a rule for.
- The CloudIdentities in the namespaces of the workstations the bundle covers.
- The most recent part of the daemon log.
- `diagnostics/COLLECTION.md`, which lists every item the bundle tried to collect and
  whether it got it.

`rl troubleshoot --diagnostics` holds only those items, and nothing about any workstation.

`rl troubleshoot my-box --diagnostics` adds a folder for `my-box`, and keeps only the
port-forwarding rules that point at it. The folder holds:

- What `rl troubleshoot my-box` prints, and the provisioning record from inside the
  workstation.
- The workstation itself, each configuration it applied, the ConfigMaps they refer to, and
  the Integrations that generated them.
- Its agent sessions, terminal sessions, scheduled sessions and worktree sets.
- The policies its configuration names, and its events.
- The [Edge](https://docs-stg.ringleader.dev/reference/resources/edge/) that serves it, and its pool and
  lease when it has them.
- The names of the Secrets it refers to, and whether each origin has them.

`rl troubleshoot --all --diagnostics` adds a folder for every workstation you can read. Each
folder holds what `rl troubleshoot <name>` prints, the provisioning record and the
workstation itself. The bundle then adds every record of these kinds that you can read,
whether or not a workstation uses it: agent sessions, terminal sessions, scheduled sessions,
worktree sets, WorkstationConfigs, ConfigMaps, Integrations, Edges, pools, leases and
policies. It also lists the name of every Secret you can read. The
Ringleader desktop app makes this bundle.

In either form, the folder of a Mac (vz) or Windows (hcs) workstation also holds the logs
this computer keeps for it. `README.md`, at the top of the zip, lists every file and the
order to read them in.

**A bundle is written even when parts of it fail.** A workstation that is powered
off, or a check that cannot run, does not stop the rest. Every failure is recorded
three times over: on your terminal, in `diagnostics/COLLECTION.md` inside the zip, and
in the command's exit code. In the zip, a `.error` file in place of an item holds the error
that stopped it. If Ringleader's database on this computer cannot be opened, the bundle has
no origins, port-forwarding rules, CloudIdentities or workstations, and says why. A partial bundle is still useful to us, so send it.

That also makes it the command for **when everything is broken**: if Ringleader itself
cannot start on your machine, the bundle still captures the machine, the daemon's
state and, most importantly, the log, and records why the rest is missing.

### Bundle privacy

A bundle leaves out the credentials Ringleader keeps for you and the text of your sessions:

- For each origin, the bundle names your user and the identity your login token carries,
  and says whether the token is still valid and until when. It never holds the token.
- The bundle lists Secrets by name and namespace, and says whether each origin has them. It
  never holds their values. Add `--secret-keys` to the command to list the names of the keys
  in each Secret too. A configuration that refers to a Secret as `${secret:NAME}` keeps the
  reference, and the bundle does not look up its value.
- The bundle holds no session transcripts or recordings. In each session, it replaces the
  prompt text, the environment values and the pane commands with their size in bytes.

Ringleader writes no credential it manages into a bundle. It cannot tell when you typed one
into a label, a script or a ConfigMap, though, and copies those as they are. Check these
before you send a bundle:

- The daemon log: the bundle holds its last 4 MiB, or more with `--log-since`.
  The bundle blanks out values that plainly look like tokens, and private-key blocks, but
  the log can name other workstations, and it holds whatever else the daemon wrote to it.
- ConfigMaps, with their full contents. With `--all`, that is every ConfigMap you can read.
- Workstations and WorkstationConfigs, with every value written into them, such as an
  environment variable or a script.
- The labels and annotations on every record in the bundle.
- `diagnostics/host.md`, which names this computer's network interfaces and their IP
  addresses, but not their hardware (MAC) addresses.

### Make a bundle


#### Use the application


The Ringleader desktop application, on macOS and on Windows, has a **Troubleshoot** page with a
**Generate bundle** button. It makes the bundle `rl troubleshoot --all --diagnostics` makes,
which [Bundle contents](https://docs-stg.ringleader.dev/troubleshooting/#bundle-contents) describes.

1. Open the application's window and choose **Troubleshoot**.
2. If you can, raise the daemon's log level and reproduce the problem first, so the
   log has the detail we need. To raise it, run `rl daemon log-level debug` in a
   terminal.
3. Click **Generate bundle**.

The application writes `ringleader-diagnostics.zip` into your Ringleader data directory,
shows its path on the page, and opens it. Under the path it shows the notes the
capture printed, such as the time range the daemon log covers. Attach the file to an
email or a chat. If some items could not be collected, the bundle is still written and
opened, and it notes what was skipped.

The page also shows the command it runs, with a **Copy** button, if you would rather
run it yourself.



#### Use the command line


```bash
rl troubleshoot --all --diagnostics
```

The desktop button runs this command with its own output path. Run from a
terminal, it writes `./ringleader-diagnostics-<timestamp>.zip` in the current
directory and prints the absolute path it wrote.

| Command | What it captures |
|---------|------------------|
| `rl troubleshoot --diagnostics` | Local diagnostics only (no workstation info). |
| `rl troubleshoot --all --diagnostics` | Local diagnostics plus every workstation and related record you can read. |
| `rl troubleshoot my-box --diagnostics` | Local diagnostics plus `my-box` and the records it uses. |
| `rl troubleshoot my-box --diagnostics --secret-keys` | The same, with the key names of each Secret it lists. |
| `rl troubleshoot --diagnostics=out.zip` | Write to an explicit path instead of the default. |
| `rl troubleshoot --diagnostics --log-since=6h` | Widen the bundled daemon log to reach at least 6 hours back. |

`--all` connects to every workstation over SSH, so with many workstations it takes a
little longer.

<div class="callout callout-note">
  <p class="callout-title">Check the log reaches back far enough</p>
  <div class="callout-body">
    Only the most recent part of the log goes into the bundle, so if the problem happened a
while ago, the bundled log may start after it. The time range it covers is printed when
the zip is written and recorded in <code>diagnostics/COLLECTION.md</code>. If it starts too late,
run the command again with <code>--log-since=&lt;duration&gt;</code>, for example <code>--log-since=6h</code>, and
it reaches further back.
  </div>
</div>


The covered-range line can end with one of these, and each tells you what to do:

- `INCOMPLETE: records before <time> are still on disk but NOT in this bundle`: older
  records exist on your machine. Capture again with `--log-since=<duration>` to include
  them.
- `INCOMPLETE: --log-since=<duration> is NOT covered`: the capture reached its size
  limit before it reached that far back, so the bundle starts later than you asked.
- `records before <time> are not on disk`: the log on your machine starts at that time,
  because the daemon could not keep the records before it. No flag brings them back.
- `INCOMPLETE: some records are missing before <time>`: the daemon could not write or
  keep some records, for example on a full disk, so the log has a gap inside the range.

The desktop app highlights a note that says `INCOMPLETE`.






### Read a bundle

If you are the one reading a bundle, start at the top:

1. `diagnostics/COLLECTION.md`: what was and was not captured.
2. `diagnostics/host.md` and `diagnostics/daemon.md`: is the environment sane and is
   the daemon alive?
3. `diagnostics/origins.md`: is the user logged in, is the token still valid, and does
   the node registration read `registered`?
   [Node not registered](https://docs-stg.ringleader.dev/troubleshooting/#node-not-registered)
   explains any other value.
4. `workstations/<…>/troubleshoot.txt`: the per-workstation controller view, egress
   checks, device-local forwarding, live probes, and provisioning timeline.
5. For a "my ports are not forwarded" report: `diagnostics/localbindings.yaml` (is
   there a binding at all, and what is its status?), then
   `diagnostics/seeded-bindings.md` (if there is none, was one ever seeded?).
6. For a "my configuration did not apply" report: the configurations the workstation
   says it applied. A bundle for one workstation has them in its folder, as
   `config-<name>.yaml`. A bundle made with `--all` has them in
   `diagnostics/resources/workstationconfigs.yaml`. For a cloud workstation that never came
   up, also read `diagnostics/cloudidentities.yaml`.
7. If a session or a configuration refers to a Secret: `secrets.yaml`, which says whether
   each origin has it. A bundle for one workstation has it in the workstation's folder, and
   a bundle made with `--all` has it in `diagnostics/resources/`. `diagnostics/COLLECTION.md` says when a read failed or an origin
   returned only part of a list.

## Get help from Ringleader

If all of that leaves you stuck, [prepare a diagnostics bundle](https://docs-stg.ringleader.dev/troubleshooting/#prepare-a-diagnostics-bundle) and reach out. Include the `.zip`
so we can see your install without a back-and-forth. Start at
[ringleader.dev](https://ringleader.dev/).

## Next steps

- [`rl troubleshoot`](https://docs-stg.ringleader.dev/reference/cli/commands/workstation-access/#rl-troubleshoot-workstation):
  the full command and every flag.

