Enrollment troubleshooting
A collector enrols when its opampsupervisor makes its first OpAMP handshake
with the LinkMesh server at /v1/opamp, presenting the enrollment token. It
appears in the fleet within a few seconds. If a collector doesn’t show up, work
through this list top-down.
Collector doesn’t appear in the fleet
Section titled “Collector doesn’t appear in the fleet”Give it ~30 seconds, then check from the collector host that the server is reachable and the supervisor is running:
# The supervisor holds the OpAMP connection — watch the handshake
systemctl is-active opamp-supervisor
sudo journalctl -u opamp-supervisor -f
Common causes:
- Bad / expired token — the enrollment token in
/etc/otelcol-supervisor/supervisor.yamlis wrong, expired, or already consumed. Mint a fresh one in the wizard and re-run the installer. - Server unreachable — outbound HTTPS/WSS blocked, DNS doesn’t resolve, or
the server is behind a VPN/network the host isn’t on. Test with
curl -v https://your-server.example.com/health(a healthy server returns200). - Wrong endpoint — the supervisor’s
server.endpointmust bewss://<server>/v1/opamp(same host and port as the web UI). See Onboard an OpenTelemetry Collector via OpAMP. - WebSocket upgrades blocked — some corporate proxies and load balancers
refuse them. Re-run the installer with
--transport httpto use OpAMP over HTTP polling instead, and with--proxy <URL>if outbound downloads must go through a proxy.
The two headings in quotes below are [FAIL] messages from the installers your
server hosts (/install.sh, /install-opamp.sh). The token, reachability and
TLS causes after them apply to the collector too.
“Enrollment token required”
Section titled ““Enrollment token required””You ran the installer without a token. The installer takes its token and
server as flags, not environment variables — pass them after sh -s --
so the piped shell forwards them to the script:
curl -fsSL https://your-server.example.com/install.sh | \
sudo sh -s -- --token eyJ... --server https://your-server.example.com
--server defaults to the server the script was downloaded from, so you only
need it when agents must reach the server under a different address. The OpAMP collector installer takes the same flags:
install-opamp.sh --token <TOKEN> [--server <URL>].
“Download failed” — server unreachable
Section titled ““Download failed” — server unreachable”The installers download their binaries from your LinkMesh server first, so this is usually the host failing to reach the server. Check:
curl -v https://your-server.example.com/health
A reachable, healthy server answers 200.
Common causes:
- Outbound HTTPS blocked by host firewall
- Internal DNS doesn’t resolve the server hostname from this host
- Server is behind a VPN the host isn’t on
If your server has no agent binary for the host’s platform, install.sh
downloads the agent from the artifacts server
(https://artifacts.opensight.ch/binaries/linkmesh-agent/latest) instead and
says so. It reports Download failed: neither <server URL> nor <artifacts URL> served the agent when the host reaches neither. A host without internet access
needs a server with the agent binaries bundled, or point the installer at an
internal mirror that holds linkmesh-agent-<os>-<arch>:
curl -fsSL https://your-server.example.com/install.sh | \
sudo sh -s -- --token eyJ... --agent-fallback-url https://mirror.example.com/linkmesh-agent
--agent-fallback-url '' turns the fallback off, so the installer never
contacts anything but your server.
The OpAMP installer reports Download failed (mirror + upstream) when neither
your server’s mirror nor the upstream release download is reachable.
Token rejected (401 unauthorized)
Section titled “Token rejected (401 unauthorized)”The installers don’t check the token themselves: it is presented on the first
connection, and a rejection shows up in the collector’s or agent’s journal as
401 unauthorized. A single-use token was already used, or the token is
invalid or expired. Each single-use token enrols exactly one collector — mint a
fresh one for the next host, or use a reusable token for a fleet.
If you didn’t intentionally use it twice, check the audit log — someone or something has already redeemed this token.
Optional agent: “linkmesh-agent restarted” but it doesn’t appear in the UI
Section titled “Optional agent: “linkmesh-agent restarted” but it doesn’t appear in the UI”This applies only if you’re running the optional onboarding agent. Wait 30 seconds — the agent’s first heartbeat to the server takes up to a heartbeat interval to land. If it’s still missing after 60s:
journalctl -u linkmesh-agent -f
Common failure modes the journal will reveal:
- Server unreachable — the agent can’t reach the server’s HTTPS endpoint. Run
linkmesh-agent preflight(ornc -vz your-server.example.com 443) from the host. The control channel is a WebSocket over HTTPS on the same port as the web UI — there is no separate gRPC port. 401 unauthorized— the enrollment token is invalid, already used, or expired. Mint a fresh token in the Add Collector wizard. A single-use token can’t enroll a second host — use a reusable token for fleets.- TLS verify failure — the journal shows
x509: certificate is valid for …, not <addr>. The server’s TLS certificate doesn’t cover the address the agent dials. See just below.
“tls: failed to verify certificate” / “certificate is valid for … not …”
Section titled ““tls: failed to verify certificate” / “certificate is valid for … not …””The agent’s journal repeats a line like:
tls: failed to verify certificate:
x509: certificate is valid for 10.0.1.3, 127.0.0.1, ::1, not 35.230.148.135
The agent reached the server, but the server’s TLS certificate — terminated
by the ingress / reverse proxy in front of the server — has no
SAN for the address the
agent connects to (35.230.148.135 above). The agent authenticates with a Bearer
token, not a client certificate, so the fix is always on the server’s TLS front
door.
Why it happens: on a cloud VM the external IP is a 1:1 NAT that never appears on the VM’s own interface, so a certificate generated from local interface IPs won’t list it — you reach the box on an address its cert doesn’t know about.
Fix — reissue the server’s TLS certificate at your ingress / reverse proxy
with the address agents use as a SAN. A DNS name is preferred (it survives IP
changes); point the agent’s server.url at that same name.
Lab-only escape hatch: for a throwaway host, set
certificates.insecureSkipVerify: true in the agent config to skip server-cert
verification (the agent logs a WARN while it’s on). Never use it in production —
it exposes the control channel to a man-in-the-middle. See
Agent configuration.
Throwaway lab and can’t touch the server right now? The agent has an escape
hatch — certificates.insecureSkipVerify: true in
/etc/linkmesh/config.yaml — that connects without verifying the server
cert. It disables MITM protection on the control plane and the agent will nag
with a WARN on every connect, so treat it as dev-only and never ship it. The
fix above is the right one for anything real; details under the agent
config.yaml entry in the configuration reference.
“Two operators using the same token”
Section titled ““Two operators using the same token””The first one wins. With a single-use token the second gets 401 unauthorized
(enrollment token already used). The second operator should mint their own
token (or use a reusable one for a shared fleet).
If you’re scripting bulk enrolment via Ansible/Terraform, mint one token per host inside the loop — don’t share.
Kubernetes: “error when stopping the collector: permission denied”
Section titled “Kubernetes: “error when stopping the collector: permission denied””The collector pod is in CrashLoopBackOff and its log ends with:
failed to start supervisor: could not get bootstrap info from the Collector: error when stopping the collector: permission denied
The cause is AppArmor on the node. The supervisor stops and restarts the
collector it runs by sending it a signal, inside the same container. On Ubuntu
nodes whose kernel stacks AppArmor labels (kernel 7.0.0-42 and later), the
container runtime’s default AppArmor profile refuses that signal. The collector
itself starts; the supervisor then cannot stop it and exits. Setting the
profile to RuntimeDefault does not help, because the default profile is the
one refusing the signal.
To confirm, look for the denial in the node’s audit log (as root on the node):
sudo grep 'apparmor="DENIED" operation="signal"' /var/log/audit/audit.log | grep opampsupervisor
# or, without auditd:
sudo journalctl -k | grep 'apparmor="DENIED" operation="signal"'
Fix: run the supervisor container AppArmor-unconfined. The manifests
LinkMesh renders for the standard install already do this with a pod
annotation: the node collector DaemonSet from the Add Collector wizard, and the
cluster collector Deployment from the node group’s Kubernetes tab. If yours do
not have it, add it; the pods are replaced with the new setting:
# node collector
kubectl -n linkmesh patch ds linkmesh-otelcol --type merge -p \
'{"spec":{"template":{"metadata":{"annotations":{"container.apparmor.security.beta.kubernetes.io/supervisor":"unconfined"}}}}}'
# cluster collector
kubectl -n linkmesh patch deploy linkmesh-otelcol-cluster --type merge -p \
'{"spec":{"template":{"metadata":{"annotations":{"container.apparmor.security.beta.kubernetes.io/supervisor":"unconfined"}}}}}'
Only the supervisor container changes; the init containers keep the default
profile. The annotation works on every Kubernetes version. On 1.30 and later
kubectl prints a deprecation warning for it and the setting still applies;
do not replace it with the appArmorProfile field if any of your clusters run
a version before 1.30, which refuses the whole workload over that field.
Nodes without AppArmor (OpenShift, RHEL) ignore the annotation.
Pod Security. The levels baseline and restricted refuse an unconfined
AppArmor profile. In a namespace that enforces either, kubectl apply warns
would violate PodSecurity ... forbidden AppArmor profile and the pods are
never created (kubectl -n linkmesh get events shows FailedCreate). The
standard node collector needs the privileged level in any case, for its host
directories, so on the standard install the linkmesh namespace already allows
the annotation. The manifests for OpenShift, GKE Autopilot and EKS Fargate do
not set it: OpenShift and Fargate nodes run no AppArmor, and GKE Autopilot
admits an unconfined profile only for allowlisted workloads.
All collectors went offline after a server restart
Section titled “All collectors went offline after a server restart”This resolves itself. Telemetry never flows through the server, so your data keeps moving during the restart; once the server is healthy again each collector reconnects its control channel automatically within a short backoff (seconds to a minute or two). The enrollment token each host holds is a durable reconnect credential, so no manual re-enrollment is needed — the fleet flips back to healthy on its own.
If a collector is still offline more than a couple of minutes after the server is back:
- Confirm the server is actually healthy (
/healthreturns 200) and reachable from the host. - A
401on the handshake now means the token was revoked or the collector was deregistered — not a transient restart. Re-enrol it with a fresh token. - Otherwise check the collector’s own journal for the reconnect attempts and any TLS/endpoint error — see the sections above.
Still stuck?
Section titled “Still stuck?”- Check the server’s audit log under Settings → Audit Log for the enrollment attempt — server-side error messages are richer than what the script can surface to a piped curl.
- Open the relevant journal:
journalctl -u opamp-supervisor -ffor the collector (the collector’s own output is in/var/lib/otelcol-supervisor/agent.log),journalctl -u linkmesh-agent -ffor the onboarding agent.