Skip to content

Latest commit

 

History

History
190 lines (147 loc) · 19.8 KB

TROUBLESHOOTING.md

File metadata and controls

190 lines (147 loc) · 19.8 KB

Troubleshooting

Full troubleshooting guide: Wiki — Troubleshooting

Operating System Compatibility

RedAmon is fully Dockerized and runs on any OS that supports Docker Engine 28.0.0 or newer and Docker Compose v2+. Below are common OS-specific issues and their fixes.

Linux

Problem Cause Fix
Docker socket permission denied User not in docker group sudo usermod -aG docker $USER then log out and back in
docker compose not found Old Docker version uses docker-compose (hyphen) Install Docker Compose V2 plugin or use docker-compose
Port already in use (3000, 8010, etc.) Another service occupies the port Change ports in .env or stop the conflicting service
Containers killed (OOM) Insufficient RAM Increase swap or free memory — see minimum requirements
Volume mount denied (SELinux) Fedora / RHEL / CentOS enforce SELinux Add :z suffix to volume mounts in docker-compose.yml, or run sudo setsebool -P container_manage_cgroup on
Firewall blocks container traffic firewalld or ufw blocking Docker bridge sudo ufw allow in on docker0 or allow the Docker subnet in firewalld
DNS fails inside containers systemd-resolved conflicts (Ubuntu 22.04+) Add {"dns": ["8.8.8.8", "8.8.4.4"]} to /etc/docker/daemon.json and restart Docker
/var/run/docker.sock not found Docker not running or rootless Docker uses a different path sudo systemctl start docker or set DOCKER_HOST to the correct socket path

Windows

Problem Cause Fix
Docker socket unavailable Windows uses named pipes, not Unix sockets Use Docker Desktop with WSL2 backend enabled
Line ending errors (\r\n) Git auto-converts LF → CRLF on Windows git config --global core.autocrlf input then re-clone the repo
Path too long errors Windows 260-character path limit git config --global core.longpaths true
Volume mount fails Windows path format incompatible with Linux containers Run from inside WSL2 filesystem (~/redamon), not from /mnt/c/
Extremely slow performance Bind mounts across Windows ↔ WSL boundary Store the project inside WSL2 home (~/), not on a Windows-mounted drive
Docker Desktop won't start WSL2 or Hyper-V not enabled Run wsl --install in PowerShell (admin), reboot, then install Docker Desktop
Socket permission error in WSL2 Docker Desktop integration not enabled for your WSL distro Docker Desktop → Settings → Resources → WSL Integration → enable your distro

macOS

Problem Cause Fix
Slow bind-mount performance macOS filesystem sharing overhead Upgrade to Docker Desktop 4.x+ and enable VirtioFS in Settings → General
Port 5000 conflict macOS AirPlay Receiver uses port 5000 Disable AirPlay Receiver in System Settings → General → AirDrop & Handoff, or remap the port in .env
docker compose not found Docker CLI plugins not in PATH Run brew install docker-compose or reinstall Docker Desktop
Containers OOM-killed during install Docker Desktop default Memory below RedAmon minimum Docker Desktop → Settings → Resources → Memory: set to 4 GB (8 GB with --gvm), then ./redamon.sh install
Cannot connect to the Docker daemon Docker Desktop not started open /Applications/Docker.app and wait until the whale icon stops animating before running ./redamon.sh
Mounts denied / path not shared Repo cloned outside Docker Desktop's File Sharing allowlist Clone the repo under ~/ (default-allowed), or add the custom path in Settings → Resources → File Sharing
SYN scans (naabu, masscan) miss hosts on the local LAN network_mode: host joins Docker Desktop's LinuxKit VM, not the Mac's network Expected on Docker Desktop. Internet targets work normally; for LAN scans, run RedAmon on a Linux host
Login fails after install with no error in logs Non-interactive shell (CI, agents, some multiplexers) injected a \u0001 SOH byte into the admin email/password prompt Run ./redamon.sh create-admin to (re)create the admin cleanly (reset-password only works once an admin already exists)
No admin prompt appeared at install / can't log in Webapp was slow to come up on first boot (common with --gvm or a small VM), so the automatic admin prompt was skipped Run ./redamon.sh create-admin once the stack is up (./redamon.sh status); it waits for the webapp, then prompts. Safe to re-run

install, update or up stops before starting anything

Both checks run before any core service is (re)created, so a stack that was running keeps running.

Symptom Cause Fix
RedAmon needs Docker Engine 28.0.0 or newer; this host runs <version>. (or Could not read the Docker Engine version) The plugin platform's networks use gateway_mode_ipv4: isolated, which older engines reject. install, update (before its git pull) and up check the engine before building anything. An unreadable version means the Docker daemon is not running Upgrade Docker (Docker Engine, or the latest Docker Desktop), confirm with docker version --format '{{.Server.Version}}', then rerun the command. An update that already pulled says the code is updated but not rebuilt: run ./redamon.sh update again and it finishes that update (.update-pending records where it started). Until then ./redamon.sh up warns that some images may be older than the code
The plugin platform cannot run on this host: <reason>. The plugin preflight found the named problem: INTERNAL_API_KEY unset or changeme; PLUGIN_RUNNER_KEY or PLUGIN_CALL_TOKEN_SECRET empty, changeme, too short or equal to another secret; the runner image does not build; or Docker refuses the plugin networks, volume or containers (for example another network already uses 10.213.80.0/24 or 10.213.81.0/24) Follow the hint after the reason. For a secret, delete its line from .env and rerun: install, update and up generate a new one. For the image, docker compose build plugin-runner shows the error; for the networks, docker compose --profile plugins up --no-start plugin-runner plugin-gateway. ./redamon.sh status repeats the reason. An update that stopped here finishes when you run ./redamon.sh update again

The graph page hangs, 502s, or Neo4j logs "network aborts"

These three symptoms usually appear together on a project with a very large graph. They have distinct causes, so check them in this order.

Symptom Cause Fix
Neo4j logs Increase in network aborts detected, connection count climbs steadily Fixed in this release. The webapp used to create a new Neo4j driver (and a new pool of up to 50 Bolt connections) on every production request, abandoning the previous one Update. Confirm with CALL dbms.listConnections() — the count must stay flat while you reload the graph page, not climb
API requests sit in [pending] forever, no error, no timeout Fixed in this release. The driver's connection timeouts only bound acquiring a connection, so an unbounded whole-graph query ran forever Update. Tune with NEO4J_QUERY_TIMEOUT_MS (default 120000) if you legitimately run long analytical queries
HTTP 502 from nginx, recv() failed (104: Connection reset by peer) in its error log The webapp container was OOM-killed mid-response. A reset with no timeout means the process died, rather than the request being slow Check ./redamon.sh status for OOM-killed containers and restart counts. Memory limits are sized from host RAM automatically; see README.MEMORY_GOVERNOR.md
Containers OOM-killed generally Host genuinely too small, or limits pinned by hand in .env ./redamon.sh status shows the computed allocation and warns when a running container has drifted from it

Useful checks:

./redamon.sh status                                    # OOM kills, restarts, allocation, disk
docker logs redamon-neo4j --tail 50 | grep -i abort    # Bolt connection aborts
docker inspect redamon-webapp --format '{{.RestartCount}} {{.State.OOMKilled}}'

./redamon.sh update refuses to pull

RedAmon's own scans used to dirty the git checkout. recon/ is bind mounted read-write into the spawned recon container, and two of its git-tracked data directories are re-downloaded there whenever their 24h cache expires:

Path Written by Contents
recon/main_recon_modules/data/mitre_db/ add_mitre.py MITRE CVE/CAPEC/CWE database, 15 files
recon/main_recon_modules/data/wappalyzer_cache/ http_probe.py Wappalyzer fingerprints, technologies.json

So after a scan or two git pull --ff-only refused, and the error advised git commit -am 'local changes', which converts a self-healing dirty tree into a permanent dead end: the checkout then has a commit the project does not and a fast-forward can never happen again (issue #185).

update now restores both directories before pulling. Never commit files under them; they are machine-local caches that every scan may rewrite.

Symptom Cause Fix
Could not pull updates: the working tree has local changes with no file list under it, and git status is clean Not local changes at all: the branch has diverged. git log --oneline origin/master..HEAD shows a local changes commit Update once from a version that has this fixed. If you are already stuck, see the one-time recovery below
Same error, with a list of modified files under recon/main_recon_modules/data/ Fixed in this release. update restored only a .last_update marker that had since been gitignored, so it was doing nothing while the database directories beside it were what actually drifted Update. Never commit those files — they are re-downloaded on every scan
Permission denied writing .torch-variant, .git/index, or similar An earlier sudo ./redamon.sh … or sudo git … left root-owned files in a user-owned checkout sudo chown -R "$(id -un):$(id -gn)" ., then re-run without sudo. update now checks this up front rather than failing halfway
Could not pull updates. plus a NOTE: 'git status' failed here block Another git process (an IDE, a hook, an interrupted command) holds .git/index.lock, or the index is corrupt. update deliberately refuses to auto-recover while it cannot read your working tree Wait for the other git process to finish, or remove a stale .git/index.lock only if none is running. Do not reset --hard until git status works — it would discard uncommitted work nobody can see
error: unable to unlink … Permission denied on a file under recon/main_recon_modules/data/ The scan container creates those cache directories as root inside a user-owned checkout, so neither git nor you can replace the file Same chown. update now warns about root-owned runtime files before a release that changes one makes the pull fail

One-time recovery if your checkout has already diverged. The fix ships inside redamon.sh, which is the file you cannot pull, so a checkout that is already in this state needs one manual reset. It discards the bogus local changes commit only; run git log --oneline origin/master..HEAD first and copy anything of your own onto a branch if that list contains real work.

cd ~/redamon
sudo chown -R "$(id -un):$(id -gn)" .   # only if an earlier run used sudo
git fetch origin
git reset --hard origin/master
./redamon.sh update

From that release on, update recovers by itself: a diverging commit whose files are all RedAmon runtime files is reset automatically and reported, while a commit touching anything else stops the update with instructions that keep your work.

The automatic reset is the only destructive step in update, and it is gated four ways: the working tree must be clean, git status must be readable, every file in the diverging commits must sit under a RedAmon runtime data directory, and no path may contain a traversal. To disable it entirely and always recover by hand, set REDAMON_NO_AUTO_RESET=1.

A finding disappeared, or something is refused while mute rules apply

Mute Rules mute whole classes of findings, and an "apply to current graph" is a tracked graph writer, so both show up as surprises elsewhere.

Symptom Cause Fix
A finding is gone from the Graph Map, the tables, the AI agent and reports A person or a mute rule muted it. Nothing is deleted Open Muted Nodes (the ▾ menu on the All Nodes tab): each row says what muted it. Unmute brings it back and exempts it from every rule; or disable the rule and apply to the current graph
Cannot start a partial recon while mute rules are being applied to the graph (or the same for a scan, a triage run, a version activation or save, an unmute, the hostname list) An "apply to current graph" is running, and it excludes every other graph writer on the project Wait for it: the Mute Rules tab shows Applying… N nodes checked. A run whose agent stopped answering is treated as lost after 5 minutes
... while the mute-rule apply state could not be verified The webapp could not read the apply state, so it assumes an apply is running Check that Postgres is healthy (docker compose ps postgres), then retry
The rules are active on new scans, but a scan left passive CVEs, OSV advisories or malicious packages unmuted A scan's end-of-run sweep covers only recon's own finding sources; these come from Shodan, Netlas, CriminalIP and the supply-chain scanner Apply… → Current graph after the scan
A stopped scan left noise the rules should have muted A stopped scan exits without its end-of-run sweep Apply… → Current graph, or let the next scan finish
A rule-muted finding vanished from Muted Nodes after a scan The scan no longer reported it, and a rule mute is pruned like any other finding (a person's mute is kept and marked stale) Nothing to fix. Mute it by hand if it must stay on record

Where the logs are, and why one is missing

Each project's scan, agent chat, Triage and CodeFix logs are files in ./logs/projects/<project>/, listed in the graph page's Logs tab (README.LOGS.md). docker compose logs <service> is something else: each service's own console output, Docker's copy, at most three files of 10 MB per service, emptied by a recreate.

Symptom Cause Fix
./logs is root-owned and its files cannot be deleted without sudo The stack was started with plain docker compose up before ./logs existed ./redamon.sh up creates it as you first, and the orchestrator gives a root-owned ./logs back to the checkout's owner at start; by hand, sudo chown -R "$(id -u):$(id -g)" logs
Nothing is written to ./logs on Fedora / RHEL / CentOS SELinux refuses the unlabelled bind mount Add :z to the two ./logs:/redamon-logs:rw mounts (recon-orchestrator, agent)
No chat, Triage or CodeFix log appears under ./logs The agent cannot write its logs root (no ./logs:/redamon-logs:rw mount, a :ro one, SELinux), so it writes no log file, console only; docker logs redamon-agent shows one ERROR, The logs root /redamon-logs is missing or not writable Check that ./logs exists and the agent's mount is read-write, as docker-compose.yml ships it, then ./redamon.sh up, which creates ./logs
A one-time could not give … to the logs folder's owner line Docker Desktop's file sharing or rootless Docker refused the chown Nothing to fix
On Docker Desktop for Mac a chat's log is in logs/system/agent/agent.log instead of its folder Two session ids differing only in case would share a folder on a case-insensitive disk Expected

The other cases (the archive off, no Verbose/Debug detail, the quota) are in README.LOGS.md.

Saving a plugin's proposal for one of your own skills is refused

A plugin such as Skiller can propose a new version of one of your own Agent Skills; Save as new skill in the review window creates it. These are the refusals you may meet there.

Symptom Cause Fix
503 platform_not_ready: "The database does not accept saved proposals yet" The plugin tables' status check still predates the adopted status: the constraint script did not run at start (dev mode never runs it), or it failed. The webapp log has ERROR [plugins] plugin_overrides has no status check listing every status or [plugins] constraint script failed Restart the webapp container (docker compose restart webapp): its entrypoint re-applies the constraints (plugin_overrides_status_ck2). In dev mode run docker compose exec webapp node scripts/apply-plugin-constraints.mjs once
409 proposer_unavailable ("… is not available at the version that made this proposal") The plugin that made the proposal is disabled, uninstalled, revoked, no longer allowed to propose versions of your skills, or was updated since Run the plugin again on the session to get a proposal from the version installed now, or delete this proposal
409 risk_not_acknowledged The new text adds lines flagged for review (they send data out, name a host or URL, or drop a guard) Read them and tick "I have read the flagged lines"
409 too_many_enabled_skills The project already uses 20 of your skills Keep "instead of " checked, untick "Use it in project", or turn a skill off in the project
409 name_taken / 409 skill_limit Another of your skills has that name (case and spacing ignored) / you have 1,000 skills Take the suggested name, or type another / delete a skill in Global Settings
A skill is "Quarantined" in Global Settings and its toggle is disabled The plugin catalog revoked the plugin version that proposed it, so it was turned off in every project Read it (Download), then Release it to use it again, or delete it. Only its owner can release it

Host and Docker gotchas

None of these errors out. Each one looks like a broken command or a broken feature.

Symptom Cause Fix
A container sees an empty directory where you bind-mounted one under /tmp, or a docker build context under /tmp is "not found" Snap-installed Docker has a private /tmp and never sees the host's Put anything a container or a build must read beside the project, not under /tmp
An edited bind-mounted config file has no effect after docker compose restart Snap Docker binds a single file by inode docker compose up -d --force-recreate <service>
A stray empty, root-owned file appears in the repository Bind-mounting a single FILE whose source does not exist creates an empty placeholder at the source path Delete it, and check the source path before mounting
Removing a directory after a containerised test run fails with Permission denied The run left root-owned __pycache__ behind Delete from inside a container: docker run --rm -v "$PWD/<dir>":/w alpine sh -c "find /w ! -user $(id -u) -depth -exec rm -rf {} +"
The desktop freezes, or the editor is killed, during a webapp image build The Next.js build (NODE_OPTIONS=--max-old-space-size=4096 in webapp/Dockerfile) pushed the host into a global OOM while other stacks were running. pick_parallelism in redamon.sh only looks at total Docker memory, so it does not warn Run free -m first. Build only with roughly 5 GB available and free swap; otherwise stop the other stacks or wait