Skip to content

Troubleshooting ​

This guide addresses high-frequency issues encountered during everyday platform operations, along with standard diagnostic procedures.


1. Scanning Probe (Client) Issues ​

1. Probe process running, but Web UI shows "Offline" ​

  • Step 1: Check Client Secret
    • The -secret command-line flag passed to testnet-client must match the server's TESTNET_CLIENT_SECRET environment variable character-for-character. Mismatched secrets cause the server to reject registration attempts.
  • Step 2: Test Server Reachability
    • Run curl -k -s -o /dev/null -w "%{http_code}\n" https://<server-ip>:3100 on the probe node. A 200 response confirms network reachability and that the port is not blocked by firewall or security group rules (the default deployment publishes port 3100 only).
  • Step 3: NTP Clock Synchronization
    • Align probe and server hosts to a common time source (e.g., ntpdate pool.ntp.org) so log timelines can be cross-referenced and TLS certificate validation stays stable.

2. Docker tool fails with an image pull error ​

  • Network & mirror source: containerized tool images are hosted on the private registry registry.cn-hangzhou.aliyuncs.com/testnet-tools/; the node must be able to reach it (mainland-China nodes can use the Aliyun accelerator directly).
  • Pull timeout: for large images the default docker.pull_timeout: 15m may be too short — raise it in the node's config.yaml and retry.
  • Private registry auth: if the registry requires authentication, configure username / password / server under docker.registry_auth.
  • Socket permission: confirm docker exec testnet-client docker ps works (see the permission entry below).

3. Probe is online, but workflow tasks remain "Queued" ​

  • Verify Node Tool Whitelist:
    • If an online node's tool whitelist does not include the tool used by the task, the dispatcher will not assign the task to it. Open "Scanning Nodes" → "Configure" to review the whitelist (empty means unrestricted).
  • Concurrency Saturation:
    • If active jobs consume all configured execution slots on a node, new jobs wait in queue until slots free up.

4. Online self-upgrade fails or gets stuck ​

  • Read the failure reason: the node card shows the most recent upgrade error (download / verification / smoke check / restart are all recorded); semantics in Node Online Self-Upgrade.
  • Download fails on self-signed HTTPS: make sure server.tls.insecure_skip_verify: true on the node (upgrade requests inherit that TLS policy).
  • Verification failure skips the round: every download source enforces SHA-256; when the checksum is unavailable the round is skipped (fail-closed) — the binary is never overwritten without verification.
  • New version fails to start: the old binary is rolled back automatically and the reason reported; set upgrade.enabled: false in the node's config.yaml to fall back to manual script upgrades.
  • Docker container nodes: cannot self-update (skipped automatically by the console) — upgrade them with the images.

5. Docker Error: permission denied while trying to connect to the Docker daemon socket ​

  • Cause: The OS user executing testnet-client lacks permissions to access /var/run/docker.sock.
  • Resolution:
    bash
    sudo usermod -aG docker $USER
    newgrp docker
    # Or grant read/write access directly
    sudo chmod 666 /var/run/docker.sock

2. Workflows & Scan Task Issues ​

1. Workflow stalls at a specific node ​

  • Check Upstream Output Volume:
    • If an upstream stage (e.g., Subdomain Enumeration) yielded zero discovered targets, downstream stages (e.g., Web Probing) gracefully exit without error.
  • Inspect Execution Logs:
    • Open "Run Center", find the task, and click "View Logs" to inspect whether tools failed due to target DNS resolution failure or Out-Of-Memory (OOM) crashes.

2. Execution Error: Command not found / Tool not installed ​

  • Native Shell Mode: Ensure binaries (e.g., subfinder, httpx) are installed and present in the system $PATH.
  • Docker Mode Recommendation: Prefer containerized tool definitions (e.g., registry.cn-hangzhou.aliyuncs.com/testnet-tools/subfinder:latest). Probes automatically pull images on first execution.

3. Workflow has an AUTO trigger but never fires when assets are ingested ​

  • Workflow is DISABLEd: the enable toggle pauses both cron (CRON) and asset-event (AUTO) triggering — confirm the workflow is enabled.
  • assetTypes doesn't cover the ingested type: AUTO matching only considers types declared in trigger.input.assetTypes (e.g., [SUBDOMAIN] will not react to new web sites) — extend the list as needed.
  • filter doesn't participate in matching: trigger.input.filter is currently a schema-reserved field and is ignored for trigger decisions; do target filtering in node input bindings and when conditions.
  • Check the event source: AUTO is driven by asset-ingestion events — assets inserted directly via DB or API do trigger as well, but make sure the workflow's bound project matches the asset's project.

3. Task COMPLETED but zero assets produced ​

  • Parser mismatch with actual output: the output parser declared in the tool DSL (LINE/JSON/JSONL/REGEX/FILE/CSV/XML) must match the tool's real stdout format; on mismatch the parse result is empty. Paste a real output sample into the designer's mock execution (or CLI test --mock) to verify parsing quickly.
  • identity uniqueness conflicts: the output channel's identity.field deduplicates records — if the field is always empty or constant, every record is treated as a duplicate and dropped.
  • Upstream empty, node skipped: nodes with skipOnNoInput: true skip gracefully when input is empty — expected behavior.
  • Saves blocked by rules: check the task details and asset config rules (allow/block lists); blocked records count toward the batch blocked stat and are not ingested.

4. Scheduled trigger (CRON) never fires ​

  • Confirm the workflow is enabled: the DISABLE toggle pauses both CRON and AUTO triggering.
  • Mind the timezone: cron expressions are evaluated in the server JVM timezone. The server container defaults to UTC in Docker deployments (no TZ is set in the image or compose). For "02:00 Beijing time daily", either add a TZ=Asia/Shanghai environment variable to the server service in docker-compose.yml and restart, or convert the expression to UTC (02:00 CST = 18:00 UTC the previous day, i.e. 0 0 18 * * ?).
  • Expression format: 6-field Spring format (sec min hour day month weekday); invalid expressions are rejected at compile time — if it saved, the format is valid.
  • Distinguish "not triggered" from "triggered but failed": at the scheduled time, check "Run Center → Workflow Records" for a run with trigger source CRON — no record means it never fired (see the two points above); a record means it fired and you should troubleshoot the nodes/tasks instead.

3. Asset Inventory Issues ​

1. Assets imported, but not appearing in the table ​

  • Check Top Project Selector:
    • TestNet enforces strict project isolation. Assets created or imported are pinned to the currently active project. Confirm that your active project matches the target workspace.
  • Inspect Quick Filters:
    • Check whether quick filters or advanced query conditions are active. Clear the active filters to expose all records.

2. Why wasn't a duplicate host created? ​

  • Automated Deduplication: TestNet enforces strict deduplication rules:
    • Root domains deduplicated by normalized lowercase FQDN;
    • IP addresses deduplicated by IPv4/IPv6 canonical notation;
    • Web applications deduplicated by standardized URI (scheme + host + port).
  • Re-scanning an existing target refreshes the Last Seen timestamp and updates signatures without polluting data tables.

4. AI & MCP Integration Issues ​

1. Claude Desktop / Cursor Error: SSE connection failed (401 Unauthorized) ​

  • Validate API Key:
    • Verify that the Authorization: Bearer <API_KEY> or query parameter matches the key shown in "AI" → "MCP Access".
  • Disable Proxy Buffering:
    • When proxying SSE connections through Nginx, disable proxy buffering:
      nginx
      proxy_set_header Connection '';
      proxy_http_version 1.1;
      chunked_transfer_encoding off;
      proxy_buffering off;
      proxy_cache off;
      proxy_read_timeout 86400s;

2. MCP requests rejected with SCOPE_DENIED ​

  • This is the strict scope guard working as designed: the project has strictScope enabled, so HTTP relay / batch probing / response diff targets must belong to a registered project asset (domain / sub_domain / web-attached host).
  • Fix: register the target as a project asset first (or turn on autoRegisterAsset on relay to register automatically), then retry; targets outside the authorized scope should not be probed at all.
  • Disabling the guard: if truly needed, set strictScope to false via testnet_project(action="update") (off by default).

5. Licensing Issues ​

1. Built-in / standalone client keeps restarting before license activation ​

  • Symptom: Before a license file is uploaded (or after it expires), docker compose ps shows the testnet-client container being recreated repeatedly; for standalone installs, systemctl status testnet-client shows frequent restarts with server license is not activated in the logs.
  • Cause: While the system is not activated, the server's LicenseInterceptor rejects /api/v1/client/register with HTTP 403 (business code 40301), so the client cannot register. Combined with container restart: unless-stopped and systemd Restart=on-failure, this produces a rapid restart loop. This is expected — the four core containers (db/redis/server/web) are unaffected; only scanning nodes stay offline.
  • Resolution:
    1. Sign in to the web console and upload a license file under "System" → "License" to activate the system;
    2. The client detects the inactive state and switches to a low-frequency retry (once every 3 minutes); it registers automatically once activation succeeds, with no manual intervention;
    3. To apply it immediately, restart the client with ./testnet.sh restart (or bash install-client.sh restart).
  • Note: The client distinguishes "license inactive (40301/40302)" from "secret mismatch (other 403)". The former waits at low frequency, while the latter still fails fast so real configuration issues surface quickly.

2. "License Expired or Invalid Machine ID" ​

  • Cause: Reinstalling the OS or altering network cards modifies the hardware fingerprint.
  • Resolution:
    1. Run ./testnet-license show-machine-id on the server host to obtain the current fingerprint.
    2. Request an updated .lic file from your license issuer.
    3. Upload the new file under "System" → "License"; the system validates and activates it immediately.

最近更新

Released under the MIT License