更新与回滚错误
解决自动更新失败,阅读更新日志,并回滚到上一个二进制文件。
wantasticd version 显示预期版本且服务为 Connected,或你已安全回滚。
开始之前
- root 或管理员权限。
- /tmp 中的更新日志(wantasticd-update-*.log)。
更新的工作原理
- wantasticd 在启动 1 分钟后检查更新,之后每小时检查一次。如需立即更新,运行 sudo wantasticd update。
- 旧的二进制文件会保存为 .previous。如果新版本无法启动,会自动恢复旧版本。
- 更新失败时隧道会继续运行,下一次检查时会再次尝试。
- "No newer release available: current=… offered=…" 是正常的。
ls -t /tmp/wantasticd-update-*.log | head -1 | xargs tail -n 50检查要点
- 1在服务日志中找到失败行,然后阅读其中指明的更新日志。
- 2下载错误:检查网络。版本错误:检查 CPU 和 /tmp。健康检查错误:将日志发送给支持团队。
- 3如果设备不稳定,请手动回滚。
$ sudo wantasticd updateError: updated service failed health verification; restoring previous binary1Self-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已自动回滚
$ sudo mv /usr/local/bin/wantasticd.previous /usr/local/bin/wantasticd$ sudo systemctl restart wantasticd$ wantasticd statusStatus Connected
速查表
| 错误 | 最简单的修复方法 |
|---|---|
| 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 version | CPU 不匹配或 TMPDIR 为 noexec。 |
| Error: cannot back up / cannot write to <dir> | 以 root 身份运行;释放空间。 |
| Error: updated service failed health verification… | 已经回滚;请发送日志。 |
| update-finish: … (Windows) | 参见下方的 Windows 问题。 |
验证结果
错误与解决方法
更新失败,但代理仍在运行。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 日志
更新脚本因错误而停止。
阅读其中指明的日志文件。
ls -t /tmp/wantasticd-update-*.log | head -1 | xargs tail -n 50更新超时。update attempt timed out after 7m0s (log kept at …)wantasticd 日志
链路速度慢(LTE 或卫星)。
使用更长的下载超时时间手动运行更新。
sudo WANTASTIC_UPDATE_DOWNLOAD_TIMEOUT=900 wantasticd update下载失败。Error: download failed (HTTP N)更新日志
代理、防火墙或 DNS 阻止了访问 get.wantastic.app。
允许访问 get.wantastic.app 的 HTTPS。
curl -I https://get.wantastic.app/latest设备上没有下载工具。Error: no downloader available (curl, wget or uclient-fetch)更新日志
系统镜像为精简版。
安装一个下载工具。
opkg update && opkg install uclient-fetch libustream-mbedtls ca-bundle新的二进制文件无法运行。Error: downloaded binary does not report target version更新日志
CPU 无法运行该构建版本,或 TMPDIR 以 noexec 挂载。
使用其他临时目录手动更新。
sudo mkdir -p /var/tmp/wt && sudo TMPDIR=/var/tmp/wt wantasticd update无法备份当前的二进制文件。Error: cannot back up <bin>更新日志
磁盘已满或为只读。
释放空间,然后重新更新。
df -h
sudo wantasticd update安装目录不可写。Error: cannot write to <dir> (check permissions)更新日志
更新未以 root 身份运行,或文件系统为只读。
使用 sudo 运行更新。
sudo wantasticd update自定义部署环境拒绝更新。Error: no supported service manager found; refusing an unverifiable update更新日志
wantasticd 未在 launchd、systemd、procd、OpenRC 或 init.d 下运行。
使用快速安装来安装服务,或手动更新并使用 --no-auto-update 运行。
curl -fsSL https://get.wantastic.app/install.sh | sudo sh更新后健康检查失败。Error: updated service failed health verification; restoring previous binary更新日志
新版本未能在规定时间内正常启动。
无需撤销,它已自动回滚。请将更新日志发送至 hello@wantastic.app。
开发构建版本无法更新。Invalid update version: parse current version: version "dev" is not major.minor.patchwantasticd update
你运行的是自行构建的二进制文件。
安装官方发布版本。
curl -fsSL https://get.wantastic.app/install.sh | sudo sh已是最新版本。No newer release available: current=… offered=…wantasticd update
这是正常现象。系统从不安装更旧的版本。
无需操作。
Windows:更新后服务状态异常。update-finish: <svc> unhealthy after update to <v>: …; restoring previous binaryWindows (update-finish)
新版本未进入 Running 状态。
它会自动回滚。请将前台运行日志发送给支持团队。
Windows:没有可恢复的备份。update-finish: no backup at …Windows (update-finish)
缺少 wantasticd.exe.previous。
在以管理员身份运行的 PowerShell 中用 install.ps1 重新安装。
irm https://get.wantastic.app/install.ps1 | iexWindows:回滚也失败了。update-finish: previous binary did not start eitherWindows (update-finish)
问题出在配置或系统上,而不是二进制文件。
在前台运行以查看错误(参见 macOS 和 Windows 错误),修复后启动服务。
sc.exe start wantasticdWindows:下载的二进制文件已损坏。new binary does not runWindows (update)
下载的文件已损坏或被杀毒软件删除。"new binary reports 'x', want v" 和 "wantasticd.exe not found in release archive" 与此相关。
在杀毒软件中放行 C:\Program Files\Wantastic,然后重试。
& "C:\Program Files\Wantastic\wantasticd.exe" update继续阅读
仍然无法解决?
请通过邮件发送设备名称、平台和完整的错误文本。切勿发送令牌、密钥或密码。