Open NekoMirra opened 2 years ago
Mirai 有安装 Mirai-api-http 吗?如果有,监听在了哪个端口,可以用 netstat -lntp
看下
配置文件
adapters: - http - ws
enableVerify: true verifyKey: @.***
debug: false
singleMode: false
cacheSize: 4096
adapterSettings: ## 详情看 http adapter 使用说明 配置 http: host: 127.0.0.1 port: 8080 cors: [*]
## 详情看 websocket adapter 使用说明 配置 ws: host: 127.0.0.1 port: 8080 reservedSyncId: -1
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年2月9日(星期三) 晚上8:13 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [ehForwarderBot/efb-qq-slave] 无法初始化efb,Specified client not found (Issue #105)
Mirai 有安装 Mirai-api-http 吗?如果有,监听在了哪个端口,可以用 netstat -lntp 看下
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>
补充
------------------ 原始邮件 ------------------ 发件人: "ehForwarderBot/efb-qq-slave" @.>; 发送时间: 2022年2月9日(星期三) 晚上8:13 @.>; @.**@.>; 主题: Re: [ehForwarderBot/efb-qq-slave] 无法初始化efb,Specified client not found (Issue #105)
Mirai 有安装 Mirai-api-http 吗?如果有,监听在了哪个端口,可以用 netstat -lntp 看下
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>
和楼上一模一样的日志和情况。 Mirai-api-http 这边配置也和楼上一样。 Mirai 已经可以登陆并看到聊天信息的日志。 efb-qq-slave通信一直显示不能连接
遇到了同样的问题。使用netstat -lntp查看到
tcp 0 0 ::ffff:127.0.0.1:8080 :::* LISTEN 192/java
但是依然连接不上。使用的是alpine的docker环境。
2022-06-29 17:02:39,928 [Level 99]: ehforwarderbot.main (main.init; main.py:129)
Initializing slave milkice.qq...
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/efb_qq_slave/ClientMgr.py", line 25, in init
c = entry_point.load()
File "/usr/lib/python3.10/site-packages/pkg_resources/init.py", line 2471, in load
return self.resolve()
File "/usr/lib/python3.10/site-packages/pkg_resources/init.py", line 2477, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/lib/python3.10/site-packages/efb_qq_plugin_mirai/init.py", line 1, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/ehforwarderbot", line 33, in
已经找到问题,退回python3.8环境就正常了。3.10环境下 from collections import MutableSequence 要改成 from collections.abc import MutableSequence
同样是这个问题 只不过客户端GoCQHttp python版本3.8
配置文件如下
Client: GoCQHttp # 指定要使用的 QQ 客户端(此处为 GoCQHttp) GoCQHttp: type: HTTP # 指定 efb-qq-plugin-go-cqhttp 与 GoCQHttp 通信的方式 现阶段仅支持 HTTP access_token: api_root: http://127.0.0.1:5700/ # GoCQHttp API接口地址/端口 host: 127.0.0.1 # efb-qq-slave 所监听的地址用于接收消息 port: 8000 # 同上
root@1092536304hax:~# ehforwarderbot 2022-02-08 02:54:09,982 [Level 99]: ehforwarderbot.main (main.init; main.py:129) Initializing slave milkice.qq... Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 969, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa File "/usr/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection raise exceptions[0] File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection sock = await self._connect_sock( File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock await self.sock_connect(sock, address) File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect return await fut File "/usr/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 8080)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/mirai_core/network.py", line 98, in post response = await self.session.post(self.base_url + url, headers=headers, json=data) File "/usr/local/lib/python3.9/dist-packages/aiohttp/client.py", line 520, in _request conn = await self._connector.connect( File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 535, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 892, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 1051, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 1020, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 975, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:8080 ssl:default [Connect call failed ('127.0.0.1', 8080)]
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/efb_qq_slave/ClientMgr.py", line 27, in init self.client = cls(name, config, channel) File "/usr/local/lib/python3.9/dist-packages/efb_qq_plugin_mirai/mirai.py", line 66, in init self.loop.run_until_complete(self.bot.handshake()) File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/usr/local/lib/python3.9/dist-packages/mirai_core/bot.py", line 58, in handshake await self.verify() File "/usr/local/lib/python3.9/dist-packages/mirai_core/bot.py", line 65, in verify result = await self.session.post('/verify', data={'verifyKey': self.verify_key}) File "/usr/local/lib/python3.9/dist-packages/mirai_core/network.py", line 100, in post raise NetworkException('Unable to reach Mirai console') mirai_core.exceptions.NetworkException: Unable to reach Mirai console
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/bin/ehforwarderbot", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/dist-packages/ehforwarderbot/main.py", line 335, in main
init(conf)
File "/usr/local/lib/python3.9/dist-packages/ehforwarderbot/main.py", line 135, in init
coordinator.add_channel(cls(instance_id=instance_id))
File "/usr/local/lib/python3.9/dist-packages/efb_qq_slave/init.py", line 44, in init
self.init_client_manager()
File "/usr/local/lib/python3.9/dist-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.9/dist-packages/efb_qq_slave/ClientMgr.py", line 30, in init
raise Exception("Specified client not found!")
Exception: Specified client not found!
issues所有方法都试了一遍,还是这样。。