cyanray / mirai-cpp

本项目为 mirai-api-http 的 C++ 封装,方便使用 C++ 开发基于 mirai-api-http 插件。
GNU Affero General Public License v3.0
148 stars 38 forks source link

提问 #110

Closed imag-er closed 2 years ago

imag-er commented 2 years ago

mah settings.yml: host: 0.0.0.0 port: 12345 main.cpp: MiraiBot bot("0.0.0.0", 12345); 为啥实际使用时一直说网络错误 平台是树莓派raspbian

cyanray commented 2 years ago

0.0.0.0 改成 localhost 试试? 然后检测 mah 有没有正常工作:curl http://localhost:12345/abot 看看有没有响应

imag-er commented 2 years ago

0.0.0.0 改成 localhost 试试? 然后检测 mah 有没有正常工作:curl http://localhost:12345/abot 看看有没有响应

换成localhost没用,还是一样 mah貌似没有正常工作 报错curl: (7) Failed to connect to localhost port 12345: Connection refused

cyanray commented 2 years ago

0.0.0.0 改成 localhost 试试? 然后检测 mah 有没有正常工作:curl http://localhost:12345/abot 看看有没有响应

换成localhost没用,还是一样 mah貌似没有正常工作 报错curl: (7) Failed to connect to localhost port 12345: Connection refused

那你应该先去解决 mah 的问题。你的 mah 也部署在树莓派吗?

imag-er commented 2 years ago

0.0.0.0 改成 localhost 试试? 然后检测 mah 有没有正常工作:curl http://localhost:12345/abot 看看有没有响应

换成localhost没用,还是一样 mah貌似没有正常工作 报错curl: (7) Failed to connect to localhost port 12345: Connection refused

那你应该先去解决 mah 的问题。你的 mah 也部署在树莓派吗?

对 所有东西都在树莓派上

cyanray commented 2 years ago

0.0.0.0 改成 localhost 试试? 然后检测 mah 有没有正常工作:curl http://localhost:12345/abot 看看有没有响应

换成localhost没用,还是一样 mah貌似没有正常工作 报错curl: (7) Failed to connect to localhost port 12345: Connection refused

那你应该先去解决 mah 的问题。你的 mah 也部署在树莓派吗?

对 所有东西都在树莓派上

可能是你没有正确地启动 mah,可以带着日志去 mah 的仓库发 issues。