> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agent.golf/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshoot Uplink

> Find the cause and the fix for each log message, dashboard state, and HTTP status that a Self-Hosted Uplink instance shows.

Find your symptom, then follow the cause and the fix. Most fixes start with the Uplink log: `journalctl -u uplink`, `docker logs uplink`, or `kubectl --namespace uplink logs uplink-0 -c uplink`.

If a fix on this page does not work, contact [support@agent.golf](mailto:support@agent.golf).

## Find your symptom

| What you see | Go to |
| - | - |
| The instance shows as stale | [The instance shows as stale](#the-instance-shows-as-stale) |
| The instance is healthy, but no new sessions show | [No sessions in the dashboard](#no-sessions-in-the-dashboard) |
| The pod or the service is not ready | [Uplink key](#uplink-key) |
| Uplink restarts in a loop | [Uplink stops because the key variable holds no Uplink key](#uplink-stops-because-the-key-variable-holds-no-uplink-key), [Uplink stops because the key no longer works](#uplink-stops-because-the-key-no-longer-works), and [An engine is down or degraded](#an-engine-is-down-or-degraded) |
| An engine is down or degraded | [An engine is down or degraded](#an-engine-is-down-or-degraded) |
| The log shows `No space left on device` | [When the disk is full](https://docs.agent.golf/uplink/install.md#when-the-disk-is-full) |
| The harness gets HTTP 401, 413, 415, or 429 | [Harness data](#harness-data) |
| Session content does not show | [The dashboard does not show session content](#the-dashboard-does-not-show-session-content) |

## Uplink key

While Uplink has no key that Agent Golf accepts, it keeps running but starts no engines and stays not ready. A Kubernetes pod runs but is not ready. Uplink logs one of these warnings every 30 seconds. The exception is a value in `AGENTGOLF_UPLINK_KEY` that is not an Uplink key: Uplink then stops at start.

### Uplink stops because the key variable holds no Uplink key

**Log:** `uplink exiting` with the error `AGENTGOLF_UPLINK_KEY must hold an Uplink key, which starts with agu_`

**Cause:** `AGENTGOLF_UPLINK_KEY` holds a value that does not start with `agu_`, for example a placeholder or a publishing key. Uplink checks the variable at start and exits with a non-zero status. A restart policy such as `--restart on-failure` then starts it again in a loop.

**Fix:** Put an Uplink key (`agu_...`) in `AGENTGOLF_UPLINK_KEY`, or remove the variable and give the key in a key file. In Docker, remove the container and run it again with the new value.

### Uplink has no Uplink key

**Log:** `the uplink instance has no Uplink key and does not start; create a key in Settings > Uplink > Self-Hosted or with "uplink auth create-key", then set AGENTGOLF_UPLINK_KEY or -uplink-key-file, or write the key to the uplink-key file (mode 0600); "uplink auth login -key" creates the key and writes the file`

**Cause:** Uplink found no key.

**Fix:** [Create an Uplink key](https://docs.agent.golf/uplink/install.md#create-an-uplink-key), then do one of these:

* Put the key in `AGENTGOLF_UPLINK_KEY`, in the `AGENTGOLF_UPLINK_KEY_FILE` file, or in the Kubernetes Secret, and restart Uplink.
* Run `uplink auth login -key` with the same user, environment, and volume as Uplink. Uplink finds the new `uplink-key` file within a few seconds, logs `found the Uplink key file; continuing startup`, and starts without a restart.

### Agent Golf refuses the Uplink key

**Log:** `agent.golf refused the Uplink key; create an Uplink key in Settings > Uplink > Self-Hosted and give it to the uplink instance`

**Cause:** The key in the source that `uplink_key_source` names is unknown or revoked.

**Fix:** Create a new key in **Settings > Uplink > Self-Hosted** and put it in the same source. Uplink reads a key file or a Secret again before each try, so the new key takes effect without a restart. For `AGENTGOLF_UPLINK_KEY`, restart Uplink; in Docker, remove the container and run it again with the new value. When Agent Golf accepts the key, Uplink logs `agent.golf accepted the Uplink key; continuing startup`.

### The Uplink key is not usable

**Log:** `the Uplink key is not usable; create an Uplink key in Settings > Uplink > Self-Hosted and give it to the uplink instance`

**Cause:** Uplink cannot read the key file, or the file does not hold an Uplink key. The `error` field tells which:

| `error` | Cause |
| - | - |
| Starts with `the value is a publishing key (agk_), not an Uplink key (agu_)` | The source holds a publishing key. A publishing key sends harness data and cannot start Uplink. |
| `an Uplink key starts with agu_` | The value is not a key, for example a placeholder. |
| `the Uplink key is empty` | The file is empty. An empty `AGENTGOLF_UPLINK_KEY` counts as not set. |
| Starts with `read the Uplink key file` | Uplink cannot read the file. Check the path and the file permissions. |

**Fix:** Put an Uplink key (`agu_...`) in the key file.

### The Uplink key exchange fails

**Log:** `the Uplink key exchange failed; retrying`

**Cause:** Uplink cannot reach `api.agent.golf`, or the API answered with a temporary error. Uplink retries with a backoff.

**Fix:** Allow outbound HTTPS to `api.agent.golf` on port 443. See [Network](https://docs.agent.golf/uplink/network.md).

### Uplink stops because the key no longer works

**Log:** `the Uplink key no longer works; stopping`

**Cause:** An admin revoked the key, or the key source now holds a key of another workspace or organization. Uplink exits with a non-zero status, its service manager starts it again, and the new start waits for a usable key.

**Fix:** Put a new key in the key source. Make sure that Uplink runs with a [restart policy](https://docs.agent.golf/uplink/install.md#use-a-restart-policy).

### Uplink stops because the key belongs to another workspace

**Log:** `uplink exiting` with an error that starts with `the Uplink key belongs to another workspace`

**Cause:** `AGENTGOLF_WORKSPACE_ID` names a different workspace from the key's workspace, or the key is the key of an organization.

**Fix:** Use a key from the workspace in `AGENTGOLF_WORKSPACE_ID`, or correct the ID. For the key of an organization, remove `AGENTGOLF_WORKSPACE_ID`. See [Configuration](https://docs.agent.golf/uplink/configuration.md#uplink-key).

### `uplink auth` commands fail

| Message | Fix |
| - | - |
| `the sign-in code expired before approval; run the command again` | Run the command again, and approve the code in the browser sooner. |
| `the sign-in was denied` | Someone selected **Deny**. Run the command again. |
| `workspace selection needs an interactive terminal; run the command in a terminal (for example docker exec -it or kubectl exec -it)` | Run the command with `-it`, or set `AGENTGOLF_WORKSPACE_ID`. |
| An error that says that creating an Uplink key needs the **Manage Uplink Keys** permission | Approve with a user who has **Manage Uplink Keys**. |

## Startup

### Uplink stops after a credential change

**Log:** an error that says that a user key changed and that you must restart Uplink.

**Cause:** Agent Golf refused an old data connection key, so Uplink made new credentials. It exits so that it starts again with them. This exit is expected.

**Fix:** None, if Uplink runs with a [restart policy](https://docs.agent.golf/uplink/install.md#use-a-restart-policy).

### Uplink does not start because of its own telemetry

**Log:** `OTEL_EXPORTER_OTLP_ENDPOINT points to this OTLP receiver; the process would ingest its own telemetry`. The message can name `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT` or `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` instead.

**Cause:** The variable points at this instance's own OTLP listener.

**Fix:** Point it at your collector, or remove it. See [Monitoring](https://docs.agent.golf/uplink/monitoring.md#send-logs-and-traces-to-your-collector).

### The local API does not start

| Message | Fix |
| - | - |
| Starts with `local-api-addr host` and ends with `requires -local-api-allow-external` | Set `UPLINK_LOCAL_API_ALLOW_EXTERNAL=true`, or bind a loopback host. |
| Starts with `local-api-advertise-url travels on metrics publishes` | Set `UPLINK_METRICS_PUSH=true`, or remove `UPLINK_LOCAL_API_ADVERTISE_URL`. |
| `local-api-advertise-url requires -local-api-addr` | Set `UPLINK_LOCAL_API_ADDR`. See [Local API](https://docs.agent.golf/uplink/local-api.md). |
| `local API TLS requires both -local-api-tls-cert-file and -local-api-tls-key-file` | Set both TLS files. |

### Startup errors that need support

These errors need Agent Golf support. Send [support@agent.golf](mailto:support@agent.golf) the time and the error message.

> [accordion] Errors and causes
>
> * **An error that says that the uplink role of the credential user needs a permission in this workspace.** Agent Golf refused the instance's data connection credentials. The `uplink` role must hold **Publish Telemetry**. Agent Golf sets this role's permissions, so an admin cannot change them, and assigning the role again does not help.
> * **An error that says that the Agent Golf API serves no endpoints for the data connection.** Agent Golf did not return the data connection address. Uplink stops, and its service manager starts it again. Contact support only if the error continues.
> * **An error that names the file `leaf.creds` in the state directory and says that it is not an owner-only regular file.** The data connection credentials file is a symlink or not a regular file, or other users can read it. Uplink keeps the file and stops, because the key in it can be exposed. In Kubernetes, a change of `podSecurityContext.fsGroupChangePolicy` can cause this. Ask support to revoke the key, then delete the file. Uplink makes a new key at its next start.

## Harness data

### The OTLP listener runs over plain HTTP

**Log:** `OTLP listener accepts plain unauthenticated HTTP beyond loopback; restrict network access or set OTLP_TLS_CERT_FILE and OTLP_TLS_KEY_FILE`

**Cause:** The OTLP listener binds an address that other hosts can reach, without TLS. The harnesses then send their publishing keys in plain text.

**Fix:** Turn on TLS, or keep the listener on a trusted network. See [Secure the OpenTelemetry listener](https://docs.agent.golf/uplink/network.md#secure-the-opentelemetry-listener).

### The harness gets HTTP 401

**Cause:** The export to `/v1/traces`, `/v1/metrics`, or `/v1/logs` has no well-formed user publishing key (`agk_...`) in the `x-agentgolf-publishing-key` header or in `Authorization: Bearer`, or its key is revoked. Uplink refuses it, and the harness does not retry, so the data is lost. `uplink_ingestion_rejections_total` counts each refusal with the reason `missing_publishing_key`, `malformed_publishing_key`, or `revoked_publishing_key`:

```bash theme={null}
curl -s http://127.0.0.1:4319/metrics | grep publishing_key
```

Uplink refuses revoked keys. See [Require a publishing key](https://docs.agent.golf/uplink/install.md#require-a-publishing-key). A key is revoked when:

* Its owner or an admin revokes it.
* Its owner leaves the workspace.
* Your identity provider removes its owner.
* Agent Golf deletes the data of Cloud Uplink after you turn it off.

Uplink checks only the form of each other key. Agent Golf links each session to the key owner, and does not accept a session whose key it cannot link to a workspace user. The instance page lists these sessions for the current month under **Traffic Without a Publishing Key**.

**Fix:** Give the user a publishing key and run `agentgolf harness setup`, then restart the harness. For the reason `revoked_publishing_key`, the user creates a new key. When a collector sits between the harness and Uplink, make it forward the `x-agentgolf-publishing-key` header. See [Publishing keys](https://docs.agent.golf/harnesses/overview.md#publishing-keys).

### The harness gets HTTP 429 or 413

**Cause:** The OTLP requests in progress hold more memory than `MAX_OTLP_IN_FLIGHT_BYTES`, 256 MiB by default. Uplink answers `429` with `Retry-After: 1`, and a harness that retries sends the export again. Uplink answers `413` to a body larger than `MAX_OTLP_REQUEST_BYTES`, or to a request too large to decode within the limit. The harness drops that request. `uplink_ingestion_rejections_total` counts these answers with the reasons `in_flight_limit`, `payload_too_large`, and `decode_limit`.

**Fix:** When `in_flight_limit` rises on a large shared instance, raise `MAX_OTLP_IN_FLIGHT_BYTES` and the instance memory. See [Sizing](https://docs.agent.golf/uplink/install.md#sizing).

### The harness gets HTTP 415

**Cause:** The export is compressed or uses OTLP JSON. For OTLP over HTTP, Uplink accepts only uncompressed Protobuf. `uplink_ingestion_rejections_total` counts these answers with the reasons `unsupported_content_encoding` and `unsupported_content_type`.

**Fix:** Set the harness protocol to `http/protobuf`, or to `grpc` when the instance has a gRPC listener. Turn off compression on the harness or the collector exporter. Over gRPC, a compressed export gets `UNIMPLEMENTED`. See [Listeners and default binds](https://docs.agent.golf/uplink/network.md#listeners-and-default-binds), [Manual setup requirements](https://docs.agent.golf/harnesses/overview.md#manual-setup-requirements), and [A collector between the harness and Uplink](https://docs.agent.golf/harnesses/overview.md#a-collector-between-the-harness-and-uplink).

### No sessions in the dashboard

1. Check **Needs Attention** on the **Dashboard** for a billing notice such as "Processing of new data stopped". While processing is stopped, Uplink keeps new data and sends it when the limit ends. See [Processing limits](https://docs.agent.golf/account/usage.md#processing-limits).
2. Run `uplink -version`, or read the version on the instance page. Agent Golf does not accept sessions from releases below 0.1.22. See [Minimum release](https://docs.agent.golf/uplink/upgrade.md#minimum-release).
3. Confirm that Uplink is ready. See [Verify the installation](https://docs.agent.golf/uplink/verify.md#check-that-uplink-is-ready).
4. Confirm that Uplink receives data: run `curl -s http://127.0.0.1:4319/metrics | grep uplink_ingestion_requests_total` on the Uplink host, and check that the `outcome="accepted"` counts rise while the harness works.
5. If they do not rise, check the harness:
   * The endpoint uses `http://` or `https://` with the Uplink host and port `4318`, or port `4317` for OTLP over gRPC. For Cloud Uplink, the endpoint is `https://uplink.agent.golf` for both protocols.
   * The protocol is `http/protobuf`, or `grpc` when the gRPC listener of the Self-Hosted Uplink instance is on. The binary starts no gRPC listener unless `OTLP_GRPC_PORT` is set. Cloud Uplink accepts `http/protobuf` and `grpc`.
   * The harness machine can reach the host. Try `curl -v https://<uplink-host>:4318/v1/logs` from it.
6. If `outcome="rejected"` counts rise, check `uplink_ingestion_rejections_total` for the reason.
7. Confirm that your role can see the session. A role without **View Team Activity** lists only your own sessions. To open another user's session, a role needs **View Team Sessions**.

## Dashboard

### The instance does not show in the Uplink section

**Cause:** Uplink has not sent its first health report or its first session. It sends reports only after Agent Golf accepts its key.

**Fix:** Check the log for an [Uplink key](#uplink-key) message. Confirm outbound access to port 7422. See [Network](https://docs.agent.golf/uplink/network.md). With `UPLINK_METRICS_PUSH=false`, the instance shows after its first session, but without health data. See [Monitoring](https://docs.agent.golf/uplink/monitoring.md#in-the-dashboard).

### The instance shows as stale

**Message:** "This uplink instance last reported" and the age, then "Check that it is running and can connect to us."

**Cause:** The last health report is older than two minutes. Uplink is down, cannot reach Agent Golf, or reports less often than every two minutes.

**Fix:** Check that Uplink runs and that outbound access to port 7422 works. Keep `UPLINK_METRICS_FLUSH_INTERVAL` at two minutes or less.

### An engine is down or degraded

**Message:** "An engine is down on" and the instance name in **Needs Attention**, or "engine is down" or "engine is degraded" and the engine names under **Health** on the instance page.

**Cause:**

* **Down:** the engine stopped. Uplink then logs `uplink exiting` with an error that contains `engine <name> failed` and the engine's last error, and exits so that its service manager starts it again.
* **Degraded:** the engine runs but makes no progress. Uplink logs `engine degraded: live but making no progress` with the `engine` and `last_error` fields, and `engine recovered from degraded state` when it recovers.

**Fix:**

1. Read the log line for the engine and its last error.
2. Make sure that Uplink runs with a [restart policy](https://docs.agent.golf/uplink/install.md#use-a-restart-policy). For a degraded engine that does not recover, restart Uplink.
3. If the engine fails again after the restart, contact [support@agent.golf](mailto:support@agent.golf) with the log lines.

### The dashboard does not show session content

| Message in the dashboard | Fix |
| - | - |
| "Not advertised. Start the uplink instance with -local-api-advertise-url to set it." under **Instance API URL** | Enable the local API and set `UPLINK_LOCAL_API_ADVERTISE_URL`. See [Local API](https://docs.agent.golf/uplink/local-api.md). |
| "The uplink instance that stores this value does not advertise a local API URL." | The same fix. |
| "The uplink instance did not answer." and a hint | Check that the browser can reach the advertised URL, that the certificate is trusted, and that the user allowed local network access. Uplink allows only the dashboard origin of its Agent Golf API. For another dashboard origin, add it to `UPLINK_LOCAL_API_ALLOWED_ORIGINS`. See [Local API](https://docs.agent.golf/uplink/local-api.md). |
| "The uplink instance answered, but it cannot reach the cloud key set yet; revealing content will fail until it can." | Uplink cannot reach Agent Golf to check access. Check outbound access to `api.agent.golf` on port 443. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.