Build troubleshooting
Build and container-specific issues. For runtime network, auth, and peer connectivity problems, see Reference Troubleshooting.
Compose stack won't start
docker compose build fails pulling a base image
Symptoms:
ERROR: failed to pull image ...: manifest unknownor similar duringtask build.
Causes:
- A pinned base image tag was removed from Docker Hub.
- Docker Hub is rate-limiting.
Solutions:
-
Confirm connectivity
-
If rate-limited: authenticate with
docker login. The free tier raises the anonymous rate limit. - If the pinned image reference is actually gone: update the relevant Dockerfile in a PR and review any related CI or devcontainer pins at the same time.
analyst container exits immediately
Symptoms:
docker compose up analyststarts then stops.docker compose logs analystshowsSet the LOGIN_URL and AUTH_KEY environment variables in .env to run the MESH analyst client.
Solutions:
- Run
task analyst(notdocker compose up analyst). The Task wrapper prompts for missing values. - Or edit
.envdirectly. Set bothLOGIN_URLandAUTH_KEY.
analyst container starts but tunnel doesn't come up
Symptoms:
- Logs show
tun device creation failedoroperation not permitted.
Causes:
/dev/net/tunis not available on the host.- The container isn't getting
NET_ADMINorNET_RAW. - User namespace remapping (such as rootless Docker) is blocking the capability.
Solutions:
-
Check
/dev/net/tun -
Check for rootless Docker
-
Rootless Docker requires additional capabilities to pass
/dev/net/tunthrough. The simplest fix is to run the analyst under normal Docker. The broader fix is documented upstream.
ui container: envsubst: error while loading shared libraries
Symptoms:
uicontainer fails to start with a dynamic linker error aboutenvsubst.
Cause:
- You've replaced the
nginx:alpinebase with a non-Alpine variant that doesn't includegettextby default.
Solutions:
- Revert the base image.
- Or add
gettextto the Dockerfile's runtime stage.envsubstis in thegettextpackage.
ui container: 502 Bad Gateway on /api/*
Symptoms:
- The UI loads, but API calls return 502.
Causes:
headscaleservice isn't running.uiwas started with--no-deps, bypassingdepends_on.- The Compose project name doesn't match because the stack was started from two different directories.
Solutions:
-
Check service state
-
Check DNS inside
ui -
Restart from the repo root
Task (go-task) issues
task: command not found
Solution:
Install go-task. See taskfile.dev/installation. On Ubuntu:
Prompts stuck in a loop
Symptoms:
task controlPlaneasks for the same question twice or loops.
Cause:
- The prompt writes to
.envviaecho >> .env. If the task fails between prompt and append, inspect.envfor duplicates or stale entries.
Solutions:
-
Inspect
.envRemove duplicate or empty lines.
-
Or start over
task tidy modifies files unexpectedly
Symptoms:
- Fresh checkout followed by
task tidymodifiesgo.sum.
Causes:
- Genuine dependency drift.
- Your Go version differs from the one in
go.mod'stoolchain:directive.
Solutions:
-
Check your Go version
-
If the Go versions don't match, switch to the repo's declared version. Otherwise CI and your local tidy will continually diverge.
Taskfile.dev.yml task not found
Symptoms:
task buildAnalystsays "task not found".
Cause:
- Developer tasks live in
Taskfile.dev.yml, not the defaultTaskfile.yml.
Solution:
Use the -t flag:
Dockerfile build failures
go mod download fails in analyst build stage
Symptoms:
- First-stage build fails with
cannot find moduleor a hash mismatch.
Cause:
- The build context is wrong.
analyst/Dockerfilerequirescontext: .at the repo root so it can see bothgo.modand theanalyst/srcdirectory.docker build -f analyst/Dockerfile analyst/would only seeanalyst/.
Solution:
Always build via task build.
Android SDK stage: sha256sum --strict --check fails
Symptoms:
- Build fails with
sha256sum: WARNING: 1 computed checksum did NOT match.
Cause:
- Google changed the command-line tools archive behind the pinned filename without changing the version identifier.
Solutions:
-
Read the current pinned archive name from the source of truth
Check
ANDROID_TOOLS_VERSIONinanalyst/Dockerfileor.devcontainer/Dockerfile, depending on which build failed. -
Manually download and verify that archive
-
If it actually changed, open a PR updating the checksum in every place that installs that archive. In this repo that usually means both
analyst/Dockerfileand.devcontainer/Dockerfile.
control-plane/mesh-ui build: pnpm install --frozen-lockfile fails
Symptoms:
ERR_PNPM_OUTDATED_LOCKFILE.
Cause:
- Someone changed
package.jsonwithout runningpnpm installto updatepnpm-lock.yaml.
Solutions:
Devcontainer issues
Devcontainer build fails on Java install
Symptoms:
error: unsupported architecture: 'riscv64'or similar during the JDK stage.
Cause:
- The Dockerfile only knows about
amd64andarm64(the two JDK binaries Microsoft publishes). Other host architectures fail.
Solutions:
- Use a
linux/amd64orlinux/arm64host. On Apple Silicon, VS Code's devcontainer extension builds anarm64variant automatically. - On a less common host, you need a different JDK source. Modify the Dockerfile, or don't use the devcontainer.
Release script failures
working tree dirty after 'task tidy' + 'task generate'
Symptoms:
- The script aborts at the reproducibility check.
Causes:
go.modorgo.sumhas changed.- The tailscale submodule doesn't match upstream.
Solutions:
- The script prints
git status --short. Ifgo.modorgo.sumis listed, commit the tidy changes in a separate PR first. -
If files under
tailscale/are listed, the submodule HEAD is wrong:The two hashes must match.
go tool yq is not available or not v4
Cause:
- yq is a Go tool declared in
go.mod(see thetooldirective). On a fresh clone it hasn't been built yet.
Solution:
CI workflow failures
pin-github-actions.yml fails with "Some github actions versions need pinning"
Cause:
- A PR added or modified a workflow and included a non-SHA action reference.
Solution:
Run task pinGithubActions locally and commit the result:
task -t Taskfile.dev.yml pinGithubActions
git add .github/workflows
git commit -m "ci: pin github actions"
govulncheck fails on a submodule path
Cause:
- MESH is using a tailscale package that contains (or transitively imports) a known-vulnerable Go stdlib function.
Solutions:
- Upgrade Go: bump
goingo.mod(and thetoolchain:line if pinned). - Upgrade the vulnerable dependency: if it's a direct dependency, run
go get <pkg>@latest && go mod tidy. - Patch the tailscale submodule: if the vulnerable code lives there, the fix goes in
github.com/BARGHEST-ngo/mesh-tailscale.
Getting help
If you can't resolve your issue:
- Runtime/network issues: see Reference Troubleshooting.
- File an issue with the log output from
docker compose logsand the failing command: github.com/BARGHEST-ngo/MESH/issues. - Supply-chain concerns (vulnerability, key compromise, SLSA failure): see
SECURITY.mdfor private disclosure.