文档/故障排查5 分钟

更新与回滚错误

解决自动更新失败,阅读更新日志,并回滚到上一个二进制文件。

完成后你将得到

wantasticd version 显示预期版本且服务为 Connected,或你已安全回滚。

开始之前

  • root 或管理员权限。
  • /tmp 中的更新日志(wantasticd-update-*.log)。

更新的工作原理

  • wantasticd 在启动 1 分钟后检查更新,之后每小时检查一次。如需立即更新,运行 sudo wantasticd update。
  • 旧的二进制文件会保存为 .previous。如果新版本无法启动,会自动恢复旧版本。
  • 更新失败时隧道会继续运行,下一次检查时会再次尝试。
  • "No newer release available: current=… offered=…" 是正常的。
阅读最新的更新日志bash
ls -t /tmp/wantasticd-update-*.log | head -1 | xargs tail -n 50

检查要点

  1. 1在服务日志中找到失败行,然后阅读其中指明的更新日志。
  2. 2下载错误:检查网络。版本错误:检查 CPU 和 /tmp。健康检查错误:将日志发送给支持团队。
  3. 3如果设备不稳定,请手动回滚。
失败:自动回滚
$ sudo wantasticd update
Error: updated service failed health verification; restoring previous binary1
Self-update failed; agent remains active and will retry on the next scheduled check: update script failed: exit status 1 (log kept at /tmp/wantasticd-update-a1B2.log)
  1. 1已自动回滚
更新失败,已自动恢复上一个版本。
手动回滚(Linux)
$ sudo mv /usr/local/bin/wantasticd.previous /usr/local/bin/wantasticd
$ sudo systemctl restart wantasticd
$ wantasticd status
Status Connected
恢复 .previous 并重启服务。

速查表

错误最简单的修复方法
Self-update failed… / update script failed…阅读其中指明的日志。
update attempt timed out after 7m0s延长下载超时时间。
Error: download failed (HTTP N)允许访问 get.wantastic.app 的 HTTPS。
Error: downloaded binary does not report target versionCPU 不匹配或 TMPDIR 为 noexec。
Error: cannot back up / cannot write to <dir>以 root 身份运行;释放空间。
Error: updated service failed health verification…已经回滚;请发送日志。
update-finish: … (Windows)参见下方的 Windows 问题。

验证结果

wantasticd version 显示预期版本。
wantasticd status 显示 Connected。

错误与解决方法

更新失败,但代理仍在运行。Self-update failed; agent remains active and will retry on the next scheduled check: …wantasticd 日志
原因

某个更新步骤失败,原因在冒号之后。

解决方法

在此列表中查找原因。

验证: 下一次每小时检查成功。
更新脚本失败。update script failed: … (log kept at /tmp/wantasticd-update-XXXX.log)wantasticd 日志
原因

更新脚本因错误而停止。

解决方法

阅读其中指明的日志文件。

Shellbash
ls -t /tmp/wantasticd-update-*.log | head -1 | xargs tail -n 50
验证: 你在日志中看到了原因。
更新超时。update attempt timed out after 7m0s (log kept at …)wantasticd 日志
原因

链路速度慢(LTE 或卫星)。

解决方法

使用更长的下载超时时间手动运行更新。

Shellbash
sudo WANTASTIC_UPDATE_DOWNLOAD_TIMEOUT=900 wantasticd update
验证: 更新完成。
下载失败。Error: download failed (HTTP N)更新日志
原因

代理、防火墙或 DNS 阻止了访问 get.wantastic.app。

解决方法

允许访问 get.wantastic.app 的 HTTPS。

Shellbash
curl -I https://get.wantastic.app/latest
验证: 该命令显示 HTTP 200。
设备上没有下载工具。Error: no downloader available (curl, wget or uclient-fetch)更新日志
原因

系统镜像为精简版。

解决方法

安装一个下载工具。

Shellbash
opkg update && opkg install uclient-fetch libustream-mbedtls ca-bundle
验证: wantasticd update 完成。
新的二进制文件无法运行。Error: downloaded binary does not report target version更新日志
原因

CPU 无法运行该构建版本,或 TMPDIR 以 noexec 挂载。

解决方法

使用其他临时目录手动更新。

Shellbash
sudo mkdir -p /var/tmp/wt && sudo TMPDIR=/var/tmp/wt wantasticd update
验证: wantasticd version 显示新版本。
无法备份当前的二进制文件。Error: cannot back up <bin>更新日志
原因

磁盘已满或为只读。

解决方法

释放空间,然后重新更新。

Shellbash
df -h
sudo wantasticd update
验证: 更新后存在 <bin>.previous。
安装目录不可写。Error: cannot write to <dir> (check permissions)更新日志
原因

更新未以 root 身份运行,或文件系统为只读。

解决方法

使用 sudo 运行更新。

Shellbash
sudo wantasticd update
验证: 更新完成。
自定义部署环境拒绝更新。Error: no supported service manager found; refusing an unverifiable update更新日志
原因

wantasticd 未在 launchd、systemd、procd、OpenRC 或 init.d 下运行。

解决方法

使用快速安装来安装服务,或手动更新并使用 --no-auto-update 运行。

Shellbash
curl -fsSL https://get.wantastic.app/install.sh | sudo sh
验证: wantasticd version 显示新版本。
更新后健康检查失败。Error: updated service failed health verification; restoring previous binary更新日志
原因

新版本未能在规定时间内正常启动。

解决方法

无需撤销,它已自动回滚。请将更新日志发送至 hello@wantastic.app。

验证: wantasticd status 在旧版本上显示 Connected。
开发构建版本无法更新。Invalid update version: parse current version: version "dev" is not major.minor.patchwantasticd update
原因

你运行的是自行构建的二进制文件。

解决方法

安装官方发布版本。

Shellbash
curl -fsSL https://get.wantastic.app/install.sh | sudo sh
验证: wantasticd version 显示 vX.Y.Z+sha。
已是最新版本。No newer release available: current=… offered=…wantasticd update
原因

这是正常现象。系统从不安装更旧的版本。

解决方法

无需操作。

验证: wantasticd version 显示当前版本。
Windows:更新后服务状态异常。update-finish: <svc> unhealthy after update to <v>: …; restoring previous binaryWindows (update-finish)
原因

新版本未进入 Running 状态。

解决方法

它会自动回滚。请将前台运行日志发送给支持团队。

验证: sc.exe query wantasticd 显示 RUNNING。
Windows:没有可恢复的备份。update-finish: no backup at …Windows (update-finish)
原因

缺少 wantasticd.exe.previous。

解决方法

在以管理员身份运行的 PowerShell 中用 install.ps1 重新安装。

PowerShell(管理员)powershell
irm https://get.wantastic.app/install.ps1 | iex
验证: 服务正在运行。
Windows:回滚也失败了。update-finish: previous binary did not start eitherWindows (update-finish)
原因

问题出在配置或系统上,而不是二进制文件。

解决方法

在前台运行以查看错误(参见 macOS 和 Windows 错误),修复后启动服务。

PowerShell(管理员)powershell
sc.exe start wantasticd
验证: 服务正在运行。
Windows:下载的二进制文件已损坏。new binary does not runWindows (update)
原因

下载的文件已损坏或被杀毒软件删除。"new binary reports 'x', want v" 和 "wantasticd.exe not found in release archive" 与此相关。

解决方法

在杀毒软件中放行 C:\Program Files\Wantastic,然后重试。

PowerShell(管理员)powershell
& "C:\Program Files\Wantastic\wantasticd.exe" update
验证: wantasticd version 显示新版本。

继续阅读

仍然无法解决?

请通过邮件发送设备名称、平台和完整的错误文本。切勿发送令牌、密钥或密码。

hello@wantastic.app