分享一个clawdbot启用Telegram后反复崩溃的问题

昨天看到站内大佬们分享的clawdbot配置教程,心痒难耐也自己试了一把。

开局直接丢给opencode,让它自动安装/配置,一切都很顺利,直到我配置了telegram,开始通过bot发消息。

最开始还比较顺利,过了几分钟发现发消息没任何反应,怀疑是不是进程挂了,ps看了下果然pid已经变了:

root@xxxxxx:~# !ps
ps aux|grep clawd
root         920  0.0  0.7 1012432 55232 ?       Ssl  10:02   0:00 clawdbot
root        1302 15.5  5.5 12397396 415828 ?     Sl   10:02   0:25 clawdbot-gateway
root        1676  0.0  0.0   6544  2432 pts/1    S+   10:05   0:00 grep --color=auto clawd
root@xxxxxx:~# ps aux|grep clawd
root        1837  0.0  0.7 1012260 56804 ?       Ssl  10:15   0:00 clawdbot
root        1844  7.2  4.6 12309976 344928 ?     Sl   10:15   0:04 clawdbot-gateway
root        1870  0.0  0.0   6544  2432 pts/1    S+   10:16   0:00 grep --color=auto clawd

翻了翻日志,发现有大量的报错,直接丢给opencode去分析原因:

并没有什么有价值的信息,继续分析:

这里提到了是tg的问题,回想下确实是支持tg后才出现的,拿着报错去查询,发现有其他人遇到过:

修改hosts:

149.154.166.110 api.telegram.org

问题得到解决,终于可以畅快的使用tg了。

12 Likes

opencode配?很好的思路,谢谢分享, 晚上回去试一下

这样的话是不是cc也可以帮我配

应该也是可以的