Skip to content
tslink

Troubleshoot

Find your symptom below and work through its causes from the top, checking each before you move to the next. Most checks need the logs, so collect them first.

Collect information

  1. Run tslink diag, which shows the state of every endpoint.

  2. Show the end of each node’s tailscaled log:

    docker run --rm -v /var/lib/docker-plugins/tailscale:/data alpine \
      sh -c 'for d in /data/by-hostname/*/ /data/by-stack/*/*/; do
        echo "=== $d ==="; tail -20 "$d/tailscaled.log" 2>/dev/null
      done'
  3. Show the last hour of the plugin’s log. On Linux:

    journalctl -u docker --since -1h | grep -i tailscale

    On macOS with OrbStack, open a shell in the Linux VM first, then run the same command there:

    docker run --rm -it --privileged --pid=host alpine nsenter -t 1 -m -u -n -i sh

    The plugin also keeps its log in plugin.log in the data directory.

The plugin doesn’t enable

CauseCheckFix
The plugin can’t create or mount its data directorytslink: in the Docker daemon log, for example journalctl -u docker | grep tslink:Fix what the message names, such as a full or read-only /var/lib.

docker network create fails

CauseCheckFix
No credentialThe error contains no Tailscale credentialSet tslink.authkey, TS_AUTHKEY or the cluster credential. See Precedence.
tslink.tags is missingThe error contains tslink.tags is requiredAdd tslink.tags to the network.
An auth key has parametersThe error contains has parameters appendedRemove ?… from the auth key.
tslink.ephemeral contradicts the credentialThe error names tslink.ephemeralSee tslink.ephemeral.

The container runs, but has no node

CauseCheckFix
The plugin isn’t enableddocker plugin lsdocker plugin enable tslink
The credential is invalid or expiredNeedsLogin in tailscaled.log, or retrying in the status fileCreate a new credential, and recreate the network or replace the cluster credential.
The stack isn’t allowed the tagfailed in the status file, with outside stack in the errorUse tag:<stack>. See Tag rules.
The container isn’t in the network’s stackfailed in the status file, with does not match network stack in the errorDeploy the container in the same stack as the network: stacks can’t share each other’s networks.
Another container on the host has the same hostnametslink.hostname of the host’s containersWait for the other container to leave, or give each container its own hostname.

The node is offline in the admin console

CauseCheckFix
The container stoppeddocker ps -aStart the container.
The node’s key expiredThe admin console shows the node as expiredRenew the node’s key in the admin console, or disable its key expiry. A logged-in node doesn’t use its credential, so a new credential won’t help. See Rotation and revocation.
The host can’t reach the control serverConnection errors in tailscaled.logPermit outbound TCP to port 443. See Provision a host.

The container can’t reach the tailnet

CauseCheckFix
tailscaled hasn’t started yettailscaled.log doesn’t contain Switching ipn state Starting -> Running yetWait, and make the application retry. See Start-up delay.
The node needs to log inSwitching ipn state NeedsLogin in tailscaled.logCorrect the credential.
The veth setup failednetwork is unreachable in tailscaled.logFind the error in the plugin’s log, and restart the container.
Your tailnet policy doesn’t allow the connectionThe grants in the admin consoleChange the policy.

MagicDNS names don’t resolve

CauseCheckFix
The container doesn’t use tailscaled’s DNS servercat /etc/resolv.conf in the containerSet dns: [100.100.100.100] on the container. See MagicDNS.

A Service backend gets no traffic

CauseCheckFix
The container doesn’t serve every port of the Serviceports-uncovered from /ready, or a ports/<service> warning in the status file, which names the portsServe every port of the Service, or remove the port from the Service in the admin console. The control server sends nothing to a backend that serves only some of them.
The control server hasn’t fetched the node’s Service listawaiting-control from /ready, or a control/<service> warning in the status filetslink advertises the Service again, up to 3 times. If the warning stays, restart the container.
The control server hasn’t approved the backendawaiting-approval from /readyApprove the tag of the node for the Service in the admin console.

The node gets the name hostname-1

CauseCheckFix
An earlier node with the same name is still in the tailnetThe admin console shows an offline node with the nametslink logs out ephemeral nodes no container uses. Remove any other old node in the admin console.
The control server answered a registration after more than 5 minutes, and tailscaled registered a second nodeA node-name warning in the status file, and the admin console shows an offline node with the nameRemove the offline node in the admin console. See Slow registrations.

Get a new identity for a hostname

A container with the same hostname picks up the earlier container’s identity. To start over as a new node, stop the container and delete its state directory:

docker run --rm -v /var/lib/docker-plugins/tailscale:/data alpine \
  rm -rf /data/by-hostname/<hostname>

For a container in a stack, the directory is /data/by-stack/<stack>/<hostname>.

Warning

This deletes the node’s private keys, so the old node can never come back. Remove it in the admin console.

Remove a network

Stop the network’s containers, then remove it:

docker network rm my-tailnet

tslink removes ephemeral nodes from your tailnet. Other nodes stay in the admin console until you remove them there.