AutoUpdateJdCookie icon indicating copy to clipboard operation
AutoUpdateJdCookie copied to clipboard

没有监听3000端口

Open shiny6667 opened this issue 10 months ago • 3 comments

发送验证码后报错如下: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1091, in _wrap_create_connection sock = await aiohappyeyeballs.start_connection( File "/usr/local/lib/python3.10/site-packages/aiohappyeyeballs/impl.py", line 104, in start_connection raise first_exception File "/usr/local/lib/python3.10/site-packages/aiohappyeyeballs/impl.py", line 82, in start_connection sock = await _connect_sock( File "/usr/local/lib/python3.10/site-packages/aiohappyeyeballs/impl.py", line 174, in _connect_sock await loop.sock_connect(sock, address) File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect return await fut File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 541, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 111] Connect call failed ('10.0.14.7', 3000)

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

Traceback (most recent call last): File "/app/main.py", line 640, in get_jd_pt_key await sms_recognition(page, user, mode) File "/app/main.py", line 441, in sms_recognition response = await send_request(url=sms_webhook, method="post", headers=headers, data=data) File "/app/utils/tools.py", line 364, in send_request async with session.request(method, url=url, json=data, headers=headers, **kwargs) as response: File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1359, in aenter self._resp: _RetType = await self._coro File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 663, in _request conn = await self._connector.connect( File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 563, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1032, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1366, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1335, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1106, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 10.0.14.7:3000 ssl:default [Connect call failed ('10.0.14.7', 3000)]

shiny6667 avatar Apr 25 '25 10:04 shiny6667

你的sms_func配置为 "webhook",然后sms_webhook配置的是10.0.14.7:3000。当触发验证码时就去调用10.0.14.7:3000拿验证码,你的3000端口又没监听,就报错了呀。你如果不用webhook的话,sms_func就改成manual_input,手动去写验证码

icepage avatar Apr 25 '25 15:04 icepage

OK

shiny6667 avatar Apr 26 '25 04:04 shiny6667

你的sms_func配置为 "webhook",然后sms_webhook配置的是10.0.14.7:3000。当触发验证码时就去调用10.0.14.7:3000拿验证码,你的3000端口又没监听,就报错了呀。你如果不用webhook的话,sms_func就改成manual_input,手动去写验证码

我的AutoUpdateJdCookie和SmsCodeWebhook运行在两个docker容器中,那https://127.0.0.1:3000/api/getCode中的ip地址还是用127.0.0.1吗,AutoUpdateJdCookie容器如何能访问到SmsCodeWebhook的3000端口呢

be-engineer avatar Jun 10 '25 05:06 be-engineer