Coder Social home page Coder Social logo

Comments (7)

djylb avatar djylb commented on June 28, 2024

有可能是ip变化导致cookie失效了。最好是在同一个IP下获取cookie,这个取决于微软那边的环境检测。

返回“网络异常或服务器关闭”说明koishi插件无法和后端通信,引起这个的原因比较多,参考下面排查一下吧。
koishi和后端在不同服务器上的话可能是防火墙没开端口。
如果本地访问后端也没有返回的话可能是cookie失效 或 cookie格式错误 或 cookie.json文件缺失导致后端启动失败。
示例:wget -q -O - http://127.0.0.1:8006/ping

from koishi-bingchat-server.

kagangtuya-star avatar kagangtuya-star commented on June 28, 2024

使用docker镜像在vps上搭了一个火狐浏览器获取到了同网络环境的cookie,且测试后端返回是正常的
如下

root@ucvps:~/koishi-bingchat-server# wget -q -O - http://127.0.0.1:8006/ping
{"message":"pong"}root@ucvps:~/koishi-bingchat-server# 

但机器人仍然发回“网络异常或服务器关闭”,这是否说明后端没有问题?

from koishi-bingchat-server.

djylb avatar djylb commented on June 28, 2024

有正常返回的话后端大概率是没问题。
你在插件里填的后端地址是 http://<ip>:8006/bing 吗?
eg.
image

http://127.0.0.1:8006/bing

from koishi-bingchat-server.

kagangtuya-star avatar kagangtuya-star commented on June 28, 2024

依然是这样...“网络异常或服务器关闭”,但我将后端的地址改为了 http://<服务器的公网ip>:8006/bing,并开放了防火墙,而且 wget访问ping结果为{"message":"pong"},应该没问题

现在机器人返回的是
ppEu0t1.png

服务端docker容器日志为

*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/10_syslog-ng.init...
Mar  1 18:14:38 e7d50aadadbb syslog-ng[14]: syslog-ng starting up; version='3.35.1'
*** Booting runit daemon...
*** Runit started as PID 23
Mar  1 18:14:39 e7d50aadadbb cron[27]: (CRON) INFO (pidfile fd = 3)
Mar  1 18:14:39 e7d50aadadbb cron[27]: (CRON) INFO (Running @reboot jobs)
Mar  1 18:17:01 e7d50aadadbb CRON[40]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  1 19:17:02 e7d50aadadbb CRON[45]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  1 20:17:01 e7d50aadadbb CRON[51]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  1 21:17:02 e7d50aadadbb CRON[55]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  1 22:17:01 e7d50aadadbb CRON[60]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  1 23:17:01 e7d50aadadbb CRON[65]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 00:17:02 e7d50aadadbb CRON[69]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 01:17:01 e7d50aadadbb CRON[75]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 02:17:02 e7d50aadadbb CRON[81]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 03:10:01 e7d50aadadbb CRON[85]: (root) CMD (test -e /run/systemd/system || SERVICE_MODE=1 /sbin/e2scrub_all -A -r)
Mar  2 03:17:01 e7d50aadadbb CRON[90]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 04:17:01 e7d50aadadbb CRON[95]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 05:17:01 e7d50aadadbb CRON[100]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 06:17:02 e7d50aadadbb CRON[105]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 06:25:01 e7d50aadadbb CRON[110]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))
Mar  2 07:17:01 e7d50aadadbb CRON[143]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 08:17:02 e7d50aadadbb CRON[148]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 09:17:02 e7d50aadadbb CRON[152]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 10:17:01 e7d50aadadbb CRON[158]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 11:17:01 e7d50aadadbb CRON[163]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 12:17:02 e7d50aadadbb CRON[167]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 13:17:01 e7d50aadadbb CRON[172]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 14:17:02 e7d50aadadbb CRON[176]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 15:17:01 e7d50aadadbb CRON[181]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 16:17:01 e7d50aadadbb CRON[185]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 17:17:02 e7d50aadadbb CRON[189]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 18:17:01 e7d50aadadbb CRON[194]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 19:17:01 e7d50aadadbb CRON[198]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 20:17:02 e7d50aadadbb CRON[204]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 21:17:01 e7d50aadadbb CRON[208]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 22:17:02 e7d50aadadbb CRON[212]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  2 23:17:01 e7d50aadadbb CRON[218]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 00:17:01 e7d50aadadbb CRON[222]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 01:17:01 e7d50aadadbb CRON[226]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 02:17:01 e7d50aadadbb CRON[231]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 03:10:02 e7d50aadadbb CRON[236]: (root) CMD (test -e /run/systemd/system || SERVICE_MODE=1 /sbin/e2scrub_all -A -r)
Mar  3 03:17:01 e7d50aadadbb CRON[241]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 04:17:01 e7d50aadadbb CRON[246]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 05:17:01 e7d50aadadbb CRON[251]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 06:17:02 e7d50aadadbb CRON[255]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 06:25:01 e7d50aadadbb CRON[260]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))
Mar  3 06:39:52 e7d50aadadbb syslog-ng[14]: Configuration reload request received, reloading configuration;
Mar  3 06:39:52 e7d50aadadbb syslog-ng[14]: Configuration reload finished;
Mar  3 07:17:01 e7d50aadadbb CRON[287]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 08:17:01 e7d50aadadbb CRON[292]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 09:17:02 e7d50aadadbb CRON[297]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 10:17:01 e7d50aadadbb CRON[302]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 11:17:01 e7d50aadadbb CRON[307]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 12:17:01 e7d50aadadbb CRON[312]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 13:17:02 e7d50aadadbb CRON[315]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 14:17:01 e7d50aadadbb CRON[320]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 15:17:02 e7d50aadadbb CRON[323]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 16:17:02 e7d50aadadbb CRON[328]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 17:17:01 e7d50aadadbb CRON[334]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 18:17:01 e7d50aadadbb CRON[338]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 19:17:02 e7d50aadadbb CRON[342]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 20:17:01 e7d50aadadbb CRON[348]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 21:17:01 e7d50aadadbb CRON[352]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 22:17:02 e7d50aadadbb CRON[357]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  3 23:17:01 e7d50aadadbb CRON[361]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  4 00:17:01 e7d50aadadbb CRON[367]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  4 01:17:02 e7d50aadadbb CRON[371]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  4 02:17:01 e7d50aadadbb CRON[376]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  4 03:10:01 e7d50aadadbb CRON[380]: (root) CMD (test -e /run/systemd/system || SERVICE_MODE=1 /sbin/e2scrub_all -A -r)
Mar  4 03:17:01 e7d50aadadbb CRON[387]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  4 04:17:01 e7d50aadadbb CRON[392]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  4 05:17:01 e7d50aadadbb CRON[396]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  4 06:17:01 e7d50aadadbb CRON[402]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  4 06:25:01 e7d50aadadbb CRON[408]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))
Mar  4 06:50:00 e7d50aadadbb syslog-ng[14]: Configuration reload request received, reloading configuration;
Mar  4 06:50:00 e7d50aadadbb syslog-ng[14]: Configuration reload finished;
Mar  4 07:17:02 e7d50aadadbb CRON[435]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  4 08:17:01 e7d50aadadbb CRON[440]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  4 09:17:01 e7d50aadadbb CRON[444]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  4 10:17:02 e7d50aadadbb CRON[449]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  4 11:17:01 e7d50aadadbb CRON[453]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Mar  4 12:17:02 e7d50aadadbb CRON[458]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)

koishi控制台只有重载的信息
2023-03-04 12:59:22 [I] app reload plugin bingchat:o9v03z

from koishi-bingchat-server.

djylb avatar djylb commented on June 28, 2024

from koishi-bingchat-server.

kagangtuya-star avatar kagangtuya-star commented on June 28, 2024

ppEYxZ6.png
版本号为2.1.7的最新版本

from koishi-bingchat-server.

djylb avatar djylb commented on June 28, 2024

估计是插件和后端之间通信可能有问题,具体原因得一点点试了。我自己搭的运行起来是正常的。

from koishi-bingchat-server.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.