17TheWord / nonebot-plugin-mcqq

基于NoneBot的与Minecraft Server互通消息的插件
MIT License
92 stars 5 forks source link

【错误反馈】ws服务器连不上 #74

Closed letianpai-lpt closed 6 months ago

letianpai-lpt commented 6 months ago

运行环境

nonebot2.2, centos7, python3.9

NB插件及版本号

最新

MC插件及版本号

minecraft在另一台window服务器上,paper1.20.2

错误描述

ws服务器连不上, MC日志 image nonebot日志 image

报错日志(如果有)

No response

letianpai-lpt commented 6 months ago

当我安装它的时候提示 Successfully installed nonebot-adapter-minecraft-1.0.7 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Task exception was never retrieved future: <Task finished name='Task-9' coro=<load_module_data.._request() done, defined at /root/training/Python-3.9.10/lib/python3.9/site-packages/nb_cli/handlers/store.py:61> exception=ConnectError('All connection attempts failed')> anyio._backends._asyncio.ExceptionGroup: 0 exceptions were raised in the task group:

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/_exceptions.py", line 8, in map_exceptions yield File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/root/training/Python-3.9.10/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 225, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions yield File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request raise exc File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request response = await connection.handle_async_request(request) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/_async/connection.py", line 86, in handle_async_request raise exc File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request stream = await self._connect(request) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/_async/connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/root/training/Python-3.9.10/lib/python3.9/contextlib.py", line 137, in exit self.gen.throw(typ, value, traceback) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions raise to_exc(exc) httpcore.ConnectError: All connection attempts failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/root/training/Python-3.9.10/lib/python3.9/site-packages/nb_cli/handlers/store.py", line 63, in _request return await client.get(url) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_client.py", line 1757, in get return await self.request( File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_client.py", line 1533, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_client.py", line 1620, in send response = await self._send_handling_auth( File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_client.py", line 1648, in _send_handling_auth response = await self._send_handling_redirects( File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects response = await self._send_single_request(request) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_client.py", line 1722, in _send_single_request response = await transport.handle_async_request(request) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "/root/training/Python-3.9.10/lib/python3.9/contextlib.py", line 137, in exit self.gen.throw(typ, value, traceback) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: All connection attempts failed Task exception was never retrieved future: <Task finished name='Task-8' coro=<load_module_data.._request() done, defined at /root/training/Python-3.9.10/lib/python3.9/site-packages/nb_cli/handlers/store.py:61> exception=ConnectError('All connection attempts failed')> anyio._backends._asyncio.ExceptionGroup: 0 exceptions were raised in the task group:

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/_exceptions.py", line 8, in map_exceptions yield File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/root/training/Python-3.9.10/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 225, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions yield File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request raise exc File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request response = await connection.handle_async_request(request) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/_async/connection.py", line 86, in handle_async_request raise exc File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request stream = await self._connect(request) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/_async/connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "/root/training/Python-3.9.10/lib/python3.9/contextlib.py", line 137, in exit self.gen.throw(typ, value, traceback) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions raise to_exc(exc) httpcore.ConnectError: All connection attempts failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/root/training/Python-3.9.10/lib/python3.9/site-packages/nb_cli/handlers/store.py", line 63, in _request return await client.get(url) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_client.py", line 1757, in get return await self.request( File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_client.py", line 1533, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_client.py", line 1620, in send response = await self._send_handling_auth( File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_client.py", line 1648, in _send_handling_auth response = await self._send_handling_redirects( File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects response = await self._send_single_request(request) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_client.py", line 1722, in _send_single_request response = await transport.handle_async_request(request) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "/root/training/Python-3.9.10/lib/python3.9/contextlib.py", line 137, in exit self.gen.throw(typ, value, traceback) File "/root/training/Python-3.9.10/lib/python3.9/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: All connection attempts failed

17TheWord commented 6 months ago

403你需要查看你mc那边的连接地址是否配置正确 同时你需要检查mc适配器成功加载 image

letianpai-lpt commented 6 months ago

感谢指导,现在有另一个小问题,当我在服务器中发消息时,他能够转发到群,但是会再次将bot的话转到服务器。 image image

17TheWord commented 6 months ago

感谢指导,现在有另一个小问题,当我在服务器中发消息时,他能够转发到群,但是会再次将bot的话转到服务器。 image image

你的机器人是上报了自己的消息吗? 如果是的话,我没有做这个过滤

letianpai-lpt commented 6 months ago

好的,感谢,我尝试先自行修改一点代码实现吧

17TheWord commented 6 months ago

已在 mcqq-tool v1.1.4 对OneBot群事件增加过滤规则

qingtian-crazy commented 6 months ago

403你需要查看你mc那边的连接地址是否配置正确 同时你需要检查mc适配器成功加载 image

我使用的nonebot是ATRI,安装插件后启动没有看到Minecraft适配器加载的信息,当然最后mc服务器也连接不上onebot

17TheWord commented 6 months ago

403你需要查看你mc那边的连接地址是否配置正确 同时你需要检查mc适配器成功加载 image

我使用的nonebot是ATRI,安装插件后启动没有看到Minecraft适配器加载的信息,当然最后mc服务器也连接不上onebot

如果没有更详细的日志,我无法看出什么问题。另外我没有用过ATRI,这类问题应该自行解决。