Bỏ qua để đến nội dung
Troubleshooting Fix a server that won't come online, stuck or failed jobs (queued, expired_offline, server_offline, exit 127), SSL issuance, backup errors, and the API/MCP errors an AI agent meets.

Troubleshooting

Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.

Most problems are visible from the dashboard. Start with the server’s status and its activity / job log, then work down this list. On the box itself, every panel action maps to an mz … --json command you can run over SSH to see the raw result. That helps when the dashboard only shows a failure summary.

The agent dials outbound to wss://ws.mzpanel.com:443, and the VPS opens no inbound ports. If a server stays offline after install:

  1. Check that the service is running. On the VPS:

    Terminal window
    systemctl status mzagent
    journalctl -u mzagent -f
  2. Check outbound HTTPS (443). The VPS must reach ws.mzpanel.com and api.mzpanel.com on port 443. A firewall or egress proxy that blocks outbound 443 keeps the agent stuck reconnecting (exponential backoff up to 60 s). Test it:

    Terminal window
    curl -fsS https://api.mzpanel.com/health
  3. Check the token. The install token is valid for 1 hour. If the install was slow, or retried after expiry, generate a fresh Add server command and run it again. Once registered, the agent uses a long-lived token. If the server was removed from the fleet in the dashboard, that token stops working and you must enrol the box again.

  4. Plan quota. The quota is checked when you add a server: adding one over the plan’s VPS quota fails with 402 server_limit. Upgrade, or buy a vps-slot add-on. Servers that are already connected are never cut off. See Plans & pricing.

Operations run as jobs dispatched to the agent over the WebSocket. See Jobs for the full lifecycle.

  • Stuck queued: the agent is offline. Durable jobs wait and run automatically when it reconnects. After 24 hours they are failed with expired_offline instead of running late. Fix connectivity (above). Don’t dispatch the job again, or it will run twice.
  • 409 server_offline on dispatch: this kind is never queued (env writes and kinds that carry credentials). Retry once the server is online.
  • Failed: open the job’s log in the dashboard. The result includes the exit code and the error, and the streamed output shows what the engine reported. Re-run after fixing the cause (a busy package manager, low disk, a service that’s down).
  • Exit code 127: the agent on that box has no native handler for the job kind, because it is an older agent. Update the agent (server Settings, or the agent_update operation), wait for it to reconnect, then retry.
  • Timed out: every job has a time budget (600 s by default; provisioning and backups get longer). Retry, and if it keeps timing out, check server load and disk space.

SSL uses Let’s Encrypt through the agent (ssl.issue / ssl.renew jobs). Common causes:

  • DNS not pointing at the server. The domain’s A/AAAA record must resolve to the VPS for the HTTP-01 challenge. Check that the record has propagated before retrying.
  • Port 80 blocked. HTTP-01 needs inbound port 80 reachable on the VPS during validation.
  • Rate limits. Let’s Encrypt limits repeated attempts for the same domain. Wait before retrying a domain that has failed several times.
  • Wildcard / DNS-01. Wildcard certificates use DNS-01 and need a DNS provider connected at Advanced → DNS providers (/connect/dns) whose zone covers the domain. They are available on every plan.

Backups run as archive jobs that produce a .tar.gz and a manifest, pushed to the job’s destination. Restores, existence checks and deletes are the matching restore, verify and delete jobs.

  • A run fails immediately with “server offline”: the agent isn’t connected. Bring the server online (see above), then run the job again.
  • Local or disk failures: usually disk space on the VPS while the archive is staged. Check free space and prune old snapshots.
  • Offsite destination fails: check the destination credentials and that the remote (S3, R2, B2, Google Drive) is reachable. Object-storage destinations need the Plus plan. Server-to-server (peer) destinations are not supported yet.
  • Encrypted backups: advanced (encrypted) jobs seal each archive with a per-server passphrase. You must keep that passphrase to restore. Download it from the backup settings; without it an encrypted archive cannot be recovered.
  • A restore stalls or reports missing: the daily existence check flags snapshots whose archive is no longer at the destination. If a restore stalls, open the job log for the exit code and confirm the archive still exists at the destination.

Errors an automation or AI agent meets, by error.code. The full table, with the recommended reaction for each, is in the REST API quickstart.

CodeUsual causeFix
unauthorized (401)Token missing, mistyped, expired or revokedMint a new token at /developer and send Authorization: Bearer mzmcp_…
access_level (403)read token on an operate call, or operate on a full oneUse a token with the level in details.required_level
scope_required (403)The operation needs an opt-in scopeMint a token with details.required_scope. Scopes can’t be added to an existing token
fleet_wide (403)The token has a server allowlist, and the operation spans serversUse a token without an allowlist
tier_required (403)The feature needs a higher planUpgrade, or skip the feature
not_exposed (403)The route or job kind is dashboard-only (billing, 2FA, terminal, login links, …)Do it in the dashboard
not_found (404)Wrong id, or the resource is outside the token’s allowlistUse ids from servers_list, and check whoami → server_scope
bad_request (400)Unknown or invalid body keysRead details, jobs_schema or GET /v1/api/job-kinds/{type}
rate_limited (429)Over the per-token budget (Free 60 · Plus 120 · Pro 300 · Max 600 per minute)Wait for the Retry-After seconds
app_limit (402)Creating a new Docker app or stack over the plan’s shared Docker apps & stacks quota (Free 3, Plus 5 per server; details.used, details.limit, details.tier)Delete an app or stack, add a server slot (Plus) or upgrade. Redeploying an existing name still works
automation_trial_ended (402)A write (any operation above level read) through MCP or /v1/api on the Free plan after its 30-day automation trial (details.required_tier: "plus", details.trial_ended_at)Don’t retry. Upgrade to Plus, or make the change in the dashboard. Reads keep working
agent_update_required (409)Deploying from an upload or with db, or an SMTP relay password (mail.send-set relayPass, mail.routes-smtp pass: 0.2.157), or another sealed credential (mailbox, DB and IMAP-import passwords, the Cloudflare sending token, a Resend / SES key: 0.2.161), needs a newer agent (details.current, details.required)Run agent_update on the server, then retry
server_key_missing (409)A job that carries a sealed password or key went to a server whose agent has not published its encryption key yetWait for the agent to reconnect (or restart mzagent on the box), then retry
bad_upload (400)apps_deploy got an unknown, expired or already used uploadId, or the upload’s curl hasn’t run yetCall apps_source_upload again and run its curl before apps_deploy
domain_required (400)A new app needs a domain and no instant URL is available (or domain: null was sent)Pass domain with a hostname that points at the server
direct_upload_unavailable (503)Direct uploads to the server aren’t availableDeploy from a Git repository instead (source: {git: {url}})
no_placement (409)apps_fleet_deploy / apps_fleet_source_upload found no server that fits (details.candidates[].reason per server)Relax placement, free resources, update the agent, or pin placement.serverId
ambiguous_app (409)The app name exists on several serversPass placement.serverId, or use the per-server apps_deploy
placement_conflict (409)The app already runs on another server than the one the upload went toapps_fleet_source_upload with the same name, run its curl, deploy again
tunnel_required (409)The action needs a Cloudflare Tunnel on the server: a tunnel hostname route, or a source upload to a homelab boxCreate one with servers_tunnel_create (Cloudflare Tunnel), or deploy from Git
cf_tunnel_scope (403)The Cloudflare token of the DNS connection lacks Account → Cloudflare Tunnel: EditAdd the permission to the token in the Cloudflare dashboard, then retry

MCP tools missing from the client? tools/list shows only what the token’s level and scopes allow. Check allowed_for_this_token in GET /v1/api/operations. See Connect your AI client.

Use the in-dashboard Assistant (the Ask AI button in the top bar) to get help or escalate to a human. The drawer keeps your conversation history and can hand off to support. When you report an issue, include the server ID and the job ID from the activity log; they tie directly to the audit record. See Security model.