sakarie9 / TG-EFB-QQ-Docker

QQ和Telegram的双向消息转发
GNU Affero General Public License v3.0
193 stars 17 forks source link

wsl2 中 gocq 连接上报服务器失败 #13

Open RekiDunois opened 2 years ago

RekiDunois commented 2 years ago

[2021-11-08 16:45:28] [INFO]: HTTP POST上报器已启动: 127.0.0.1:11451 [2021-11-08 16:45:28] [INFO]: CQ HTTP 服务器已启动: 127.0.0.1:15722

[2021-11-08 16:45:33] [WARNING]: 上报Event到 HTTP 服务器 127.0.0.1:11451 时出现错误: Post "http://127.0.0.1:11451": dial tcp 127.0.0.1:11451: connect: connection refused 将重试. [2021-11-08 16:45:33] [WARNING]: 上报Event数据 {"interval":5000,"meta_event_type":"heartbeat","post_type":"meta_event","self_id":386897035,"status":{"app_enabled":true,"app_good":true,"app_initialized":true,"good":true,"online":true,"plugins_good":null,"stat":{"packet_received":57,"packet_sent":52,"packet_lost":0,"message_received":0,"message_sent":0,"disconnect_times":1,"lost_times":0,"last_message_time":0}},"time":1636389933} 到 127.0.0.1:11451 失败: Post "http://127.0.0.1:11451": dial tcp 127.0.0.1:11451: connect: connection refused [2021-11-08 16:45:33] [INFO]: 检查更新完成. 当前已运行最新版本. [2021-11-08 16:45:38] [WARNING]: 上报Event到 HTTP 服务器 127.0.0.1:11451 时出现错误: Post "http://127.0.0.1:11451": dial tcp 127.0.0.1:11451: connect: connection refused 将重试.

不管是原来的端口还是我修改之后的端口连接都一直失败。开了 debug 模式也看不到其他的日志。

不知道需不需要在系统中再设置什么其他的东西?

sakarie9 commented 2 years ago

docker logs efb 检查efb是否正常启动

2021-11-09 04:26:23,939 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:169)
     All middlewares are initialized.
[09/Nov/2021:04:26:24] ENGINE Bus STARTING
[09/Nov/2021:04:26:24] ENGINE Started monitor thread 'Autoreloader'.
[09/Nov/2021:04:26:24] ENGINE Serving on http://127.0.0.1:8000
[09/Nov/2021:04:26:24] ENGINE Bus STARTED

以及这两处的端口号是否一致

https://github.com/xzsk2/TG-EFB-QQ-Docker/blob/4a40dc9c09adaca5a1939f22274427b55d886338/gocq/config.yml#L80-L95

https://github.com/xzsk2/TG-EFB-QQ-Docker/blob/4a40dc9c09adaca5a1939f22274427b55d886338/efb/profiles/default/milkice.qq/config.yaml#L2-L7

RekiDunois commented 2 years ago

2021-11-08 16:58:52,866 [Level 99]: ehforwarderbot.main (main.init; main.py:129) Initializing slave milkice.qq... Traceback (most recent call last): File "/usr/local/bin/ehforwarderbot", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/site-packages/ehforwarderbot/main.py", line 335, in main init(conf) File "/usr/local/lib/python3.8/site-packages/ehforwarderbot/main.py", line 135, in init coordinator.add_channel(cls(instance_id=instance_id)) File "/usr/local/lib/python3.8/site-packages/efb_qq_slave/init.py", line 44, in init self.init_client_manager() File "/usr/local/lib/python3.8/site-packages/efb_qq_slave/init.py", line 73, in init_client_manager self.QQClientMgr = ClientMgr(self.config['Client'], self.config, self) File "/usr/local/lib/python3.8/site-packages/efb_qq_slave/ClientMgr.py", line 31, in init raise Exception("Specified client not found!") Exception: Specified client not found! sleep for 20sec

端口是没问题的,efb 似乎一直卡在这里

sakarie9 commented 2 years ago

检查一下efb下面的配置文件?似乎是初始化efb的时候就出问题了

RekiDunois commented 2 years ago
# ===================================
# EH Forwarder Bot Configuration File
# ===================================
# 
# This file determines what modules, including master channel, slave channels,
# and middlewares, are enabled in this profile.
# 
# 
# Master Channel
# --------------
# Exactly one instance of a master channel is required for a profile.
# Fill in the module ID and instance ID (if needed) below.

master_channel: blueset.telegram

# Slave Channels
# --------------
# 
# At least one slave channel is required for a profile.
# Fill in the module ID and instance ID (if needed) of each slave channel
# to be enabled below.

slave_channels:
- milkice.qq
#middlewares:
#- xzsk2.filter

这个文件是仓库默认的,没有修改过。blueset.telegram 的配置文件我只添加了 token 和管理员 id

Client: GoCQHttp                      # 指定要使用的 QQ 客户端(此处为 GoCQHttp)
GoCQHttp:
    type: HTTP                        # 指定 efb-qq-plugin-go-cqhttp 与 GoCQHttp 通信的方式 现阶段仅支持 HTTP
    access_token:
    api_root: http://127.0.0.1:15722/  # GoCQHttp API接口地址/端口
    host: 127.0.0.1                   # efb-qq-slave 所监听的地址用于接收消息
    port: 11451                        # 同上

milkice.qq 的配置文件只对端口号进行了修改

Sunnnight commented 2 years ago

遇到了同样的问题