Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

請求支援解析配置文件中的 hostname #63

Closed
AkazaRenn opened this issue Mar 11, 2023 · 1 comment
Closed

請求支援解析配置文件中的 hostname #63

AkazaRenn opened this issue Mar 11, 2023 · 1 comment

Comments

@AkazaRenn
Copy link

2023-03-11 04:34:56,444 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:129)
     Initializing slave milkice.qq... 
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 186, in connect_tcp
    addr_obj = ip_address(remote_host)
  File "/usr/local/lib/python3.9/ipaddress.py", line 53, in ip_address
    raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address')
ValueError: 'gocq' does not appear to be an IPv4 or IPv6 address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
    yield
  File "/usr/local/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 111, in connect_tcp
    stream: anyio.abc.ByteStream = await anyio.connect_tcp(
  File "/usr/local/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 189, in connect_tcp
    gai_res = await getaddrinfo(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/socket.py", line 954, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name does not resolve

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
    yield
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
    raise exc
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
    response = await connection.handle_async_request(request)
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 86, in handle_async_request
    raise exc
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request
    stream = await self._connect(request)
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 111, in _connect
    stream = await self._network_backend.connect_tcp(**kwargs)
  File "/usr/local/lib/python3.9/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp
    return await self._backend.connect_tcp(
  File "/usr/local/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 111, in connect_tcp
    stream: anyio.abc.ByteStream = await anyio.connect_tcp(
  File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc)
httpcore.ConnectError: [Errno -2] Name does not resolve

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiocqhttp/api_impl.py", line 66, in call_action
    resp = await client.post(self._api_root + action,
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1848, in post
    return await self.request(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1533, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1620, in send
    response = await self._send_handling_auth(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1648, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1722, in _send_single_request
    response = await transport.handle_async_request(request)
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectError: [Errno -2] Name does not resolve

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/efb_qq_plugin_go_cqhttp/GoCQHttp.py", line 809, in _coolq_api_wrapper
    res = await self.coolq_bot.call_action(func_name, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/aiocqhttp/__init__.py", line 238, in call_action
    return await self._api.call_action(action=action, **params)
  File "/usr/local/lib/python3.9/site-packages/aiocqhttp/api_impl.py", line 185, in call_action
    result = await self._http_api.call_action(action, **params)
  File "/usr/local/lib/python3.9/site-packages/aiocqhttp/api_impl.py", line 75, in call_action
    raise NetworkError('HTTP request failed')
aiocqhttp.exceptions.NetworkError: HTTP request failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/efb_qq_plugin_go_cqhttp/GoCQHttp.py", line 849, in check_status_periodically
    flag = await self.check_running_status()
  File "/usr/local/lib/python3.9/site-packages/efb_qq_plugin_go_cqhttp/GoCQHttp.py", line 826, in check_running_status
    res = await self._coolq_api_wrapper("get_status")
  File "/usr/local/lib/python3.9/site-packages/efb_qq_plugin_go_cqhttp/GoCQHttp.py", line 811, in _coolq_api_wrapper
    raise CoolQDisconnectedException(("Unable to connect to CoolQ Client!" "Error Message:\n{}").format(str(e)))
efb_qq_plugin_go_cqhttp.Exceptions.CoolQDisconnectedException: Unable to connect to CoolQ Client!Error Message:
HTTP request failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/efb_qq_slave/ClientMgr.py", line 27, in __init__
    self.client = cls(name, config, channel)
  File "/usr/local/lib/python3.9/site-packages/efb_qq_plugin_go_cqhttp/GoCQHttp.py", line 531, in __init__
    asyncio.run(self.check_status_periodically(run_once=True))
  File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.9/site-packages/efb_qq_plugin_go_cqhttp/GoCQHttp.py", line 852, in check_status_periodically
    self.deliver_alert_to_master(
  File "/usr/local/lib/python3.9/site-packages/efb_qq_plugin_go_cqhttp/GoCQHttp.py", line 905, in deliver_alert_to_master
    self.send_msg_to_master(context)
  File "/usr/local/lib/python3.9/site-packages/efb_qq_plugin_go_cqhttp/GoCQHttp.py", line 977, in send_msg_to_master
    raise Exception(context["message"])
Exception: We're unable to communicate with CoolQ Client.
Please check the connection and credentials provided.
Unable to connect to CoolQ Client!Error Message:
HTTP request failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/ehforwarderbot", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/ehforwarderbot/__main__.py", line 335, in main
    init(conf)
  File "/usr/local/lib/python3.9/site-packages/ehforwarderbot/__main__.py", line 135, in init
    coordinator.add_channel(cls(instance_id=instance_id))
  File "/usr/local/lib/python3.9/site-packages/efb_qq_slave/__init__.py", line 44, in __init__
    self.init_client_manager()
  File "/usr/local/lib/python3.9/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.9/site-packages/efb_qq_slave/ClientMgr.py", line 30, in __init__
    raise Exception("Specified client not found!")
Exception: Specified client not found!

設置文件:

Client: GoCQHttp
GoCQHttp:
  type: HTTP                        # 指定 efb-qq-plugin-go-cqhttp 与 GoCQHttp 通信的方式 现阶段仅支持 HTTP
  access_token: xxx
  api_root: http://gocq:5700/  # GoCQHttp API接口地址/端口
  host: 0.0.0.0                   # efb-qq-slave 所监听的地址用于接收消息
  port: 5701                        # 同上
@AkazaRenn
Copy link
Author

Not a problem on this project

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant