您好,compose部署,尝试执行docker compose exec warp-clash python3 app.py optimize
ip优选操作时,发现无法正常工作。
app_background.log日志如下:
2024-02-25 08:52:18,503 - INFO - Get current account
2024-02-25 08:52:48,027 - WARNING - Failed to get account from Cloudflare.
2024-02-25 08:52:48,027 - WARNING - HTTPSConnectionPool(host='getproxy.bzpl.tech', port=443): Max retries exceeded with url: /get/ (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f4ffd00c210>, 'Connection to getproxy.bzpl.tech timed out. (connect timeout=None)'))
2024-02-25 08:53:00,502 - INFO - Get current account
2024-02-25 08:53:00,503 - INFO - WORK ON ID: d77e2fed-7b74-4113-b5de-fe979470150d
2024-02-25 08:55:11,377 - WARNING - Failed to get account from Cloudflare.
2024-02-25 08:55:11,377 - WARNING - HTTPSConnectionPool(host='getproxy.bzpl.tech', port=443): Max retries exceeded with url: /get/ (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f4ffd014990>, 'Connection to getproxy.bzpl.tech timed out. (connect timeout=None)'))
2024-02-25 08:55:24,502 - INFO - Get current account
2024-02-25 08:55:24,503 - INFO - WORK ON ID: d77e2fed-7b74-4113-b5de-fe979470150d
2024-02-25 08:56:18,503 - INFO - Get current account
使用内置账户和自己注册warp+账户均无法正常运行
docker日志如下:
root@iStoreOS:/opt/DockerCompose/WARPClashAPI # docker logs -f warpclashapi-warp-clash-1
/usr/local/lib/python3.11/site-packages/tzlocal/unix.py:193: UserWarning: Can not find any timezone configuration, defaulting to UTC.
warnings.warn("Can not find any timezone configuration, defaulting to UTC.")
2024-02-25 08:50:18,501 - INFO - Start scheduler.
2024-02-25 08:50:18,501 - INFO - DO_GET_WARP_DATA is True, will fetch WARP data per 18 seconds.
2024-02-25 08:50:18,502 - INFO - Start save account job, will update account info per 120 seconds.
[2024-02-25 08:50:18 +0000] [8] [INFO] Starting gunicorn 21.2.0
[2024-02-25 08:50:18 +0000] [8] [INFO] Listening at: http://0.0.0.0:3000 (8)
[2024-02-25 08:50:18 +0000] [8] [INFO] Using worker: sync
[2024-02-25 08:50:18 +0000] [10] [INFO] Booting worker with pid: 10
[2024-02-25 08:50:18 +0000] [11] [INFO] Booting worker with pid: 11
[2024-02-25 08:50:18 +0000] [12] [INFO] Booting worker with pid: 12
[2024-02-25 08:50:18 +0000] [13] [INFO] Booting worker with pid: 13
2024-02-25 08:50:36,503 - INFO - Get current account
2024-02-25 08:50:36,503 - INFO - WORK ON ID: d77e2fed-7b74-4113-b5de-fe979470150d
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:50:54 UTC)" skipped: maximum number of running instances reached (1)
2024-02-25 08:50:55,165 - INFO - Get current account
2024-02-25 08:50:55,166 - INFO - Reload entrypoints from ./config/result.csv
2024-02-25 08:50:57,779 - INFO - Get current account
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:51:12 UTC)" skipped: maximum number of running instances reached (1)
[2024-02-25 08:51:27 +0000] [8] [CRITICAL] WORKER TIMEOUT (pid:11)
[2024-02-25 08:51:27 +0000] [11] [INFO] Worker exiting (pid: 11)
[2024-02-25 08:51:27 +0000] [8] [ERROR] Worker (pid:11) exited with code 1
[2024-02-25 08:51:27 +0000] [8] [ERROR] Worker (pid:11) exited with code 1.
[2024-02-25 08:51:27 +0000] [145] [INFO] Booting worker with pid: 145
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:51:30 UTC)" skipped: maximum number of running instances reached (1)
2024-02-25 08:51:47,129 - INFO - Get current account
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:51:48 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:52:06 UTC)" skipped: maximum number of running instances reached (1)
[2024-02-25 08:52:18 +0000] [8] [CRITICAL] WORKER TIMEOUT (pid:10)
[2024-02-25 08:52:18 +0000] [10] [INFO] Worker exiting (pid: 10)
[2024-02-25 08:52:18 +0000] [8] [ERROR] Worker (pid:10) exited with code 1
[2024-02-25 08:52:18 +0000] [8] [ERROR] Worker (pid:10) exited with code 1.
[2024-02-25 08:52:18 +0000] [146] [INFO] Booting worker with pid: 146
2024-02-25 08:52:18,503 - INFO - Get current account
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:52:24 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:52:42 UTC)" skipped: maximum number of running instances reached (1)
2024-02-25 08:52:48,027 - WARNING - Failed to get account from Cloudflare.
2024-02-25 08:52:48,027 - WARNING - HTTPSConnectionPool(host='getproxy.bzpl.tech', port=443): Max retries exceeded with url: /get/ (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f4ffd00c210>, 'Connection to getproxy.bzpl.tech timed out. (connect timeout=None)'))
2024-02-25 08:53:00,502 - INFO - Get current account
2024-02-25 08:53:00,503 - INFO - WORK ON ID: d77e2fed-7b74-4113-b5de-fe979470150d
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:53:18 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:53:36 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:53:54 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:54:12 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "saveAccount (trigger: interval[0:02:00], next run at: 2024-02-25 08:54:18 UTC)" skipped: maximum number of running instances reached (1)
Job "saveAccount (trigger: interval[0:02:00], next run at: 2024-02-25 08:56:18 UTC)" raised an exception
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 198, in _new_conn
sock = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 85, in create_connection
raise err
File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Operation timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 793, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 491, in _make_request
raise new_e
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 467, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1099, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 616, in connect
self.sock = sock = self._new_conn()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 207, in _new_conn
raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x7f4ffd00e410>, 'Connection to api.cloudflareclient.com timed out. (connect timeout=None)')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 847, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/util/retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.cloudflareclient.com', port=443): Max retries exceeded with url: /v0i2308311933/reg/d77e2fed-7b74-4113-b5de-fe979470150d (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f4ffd00e410>, 'Connection to api.cloudflareclient.com timed out. (connect timeout=None)'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/apscheduler/executors/base.py", line 125, in run_job
retval = job.func(*job.args, **job.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/services/tasks.py", line 56, in saveAccount
info = getAccount(account)
^^^^^^^^^^^^^^^^^^^
File "/app/services/cloudflare.py", line 109, in getAccount
response = SESSION.get(f"{API_URL}/{API_VERSION}/reg/{account.account_id}",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 507, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='api.cloudflareclient.com', port=443): Max retries exceeded with url: /v0i2308311933/reg/d77e2fed-7b74-4113-b5de-fe979470150d (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f4ffd00e410>, 'Connection to api.cloudflareclient.com timed out. (connect timeout=None)'))
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:54:30 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:54:48 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:55:06 UTC)" skipped: maximum number of running instances reached (1)
2024-02-25 08:55:11,377 - WARNING - Failed to get account from Cloudflare.
2024-02-25 08:55:11,377 - WARNING - HTTPSConnectionPool(host='getproxy.bzpl.tech', port=443): Max retries exceeded with url: /get/ (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f4ffd014990>, 'Connection to getproxy.bzpl.tech timed out. (connect timeout=None)'))
2024-02-25 08:55:24,502 - INFO - Get current account
2024-02-25 08:55:24,503 - INFO - WORK ON ID: d77e2fed-7b74-4113-b5de-fe979470150d
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:55:42 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:56:00 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:56:18 UTC)" skipped: maximum number of running instances reached (1)
2024-02-25 08:56:18,503 - INFO - Get current account
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:56:36 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:56:54 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:57:12 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:57:30 UTC)" skipped: maximum number of running instances reached (1)
2024-02-25 08:57:34,737 - WARNING - Failed to get account from Cloudflare.
2024-02-25 08:57:34,737 - WARNING - HTTPSConnectionPool(host='getproxy.bzpl.tech', port=443): Max retries exceeded with url: /get/ (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f4ffcb85dd0>, 'Connection to getproxy.bzpl.tech timed out. (connect timeout=None)'))
2024-02-25 08:57:48,502 - INFO - Get current account
2024-02-25 08:57:48,503 - INFO - WORK ON ID: d77e2fed-7b74-4113-b5de-fe979470150d
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:58:06 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "saveAccount (trigger: interval[0:02:00], next run at: 2024-02-25 08:58:18 UTC)" skipped: maximum number of running instances reached (1)
Execution of job "doAddDataTaskOnce (trigger: interval[0:00:18], next run at: 2024-02-25 08:58:24 UTC)" skipped: maximum number of running instances reached (1)
Job "saveAccount (trigger: interval[0:02:00], next run at: 2024-02-25 09:00:18 UTC)" raised an exception
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 198, in _new_conn
sock = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 85, in create_connection
raise err
File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Operation timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 793, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 491, in _make_request
raise new_e
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 467, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1099, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 616, in connect
self.sock = sock = self._new_conn()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 207, in _new_conn
raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x7f4ffcb87750>, 'Connection to api.cloudflareclient.com timed out. (connect timeout=None)')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 847, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/util/retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.cloudflareclient.com', port=443): Max retries exceeded with url: /v0i2308311933/reg/d77e2fed-7b74-4113-b5de-fe979470150d (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f4ffcb87750>, 'Connection to api.cloudflareclient.com timed out. (connect timeout=None)'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/apscheduler/executors/base.py", line 125, in run_job
retval = job.func(*job.args, **job.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/services/tasks.py", line 56, in saveAccount
info = getAccount(account)
^^^^^^^^^^^^^^^^^^^
File "/app/services/cloudflare.py", line 109, in getAccount
response = SESSION.get(f"{API_URL}/{API_VERSION}/reg/{account.account_id}",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 507, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='api.cloudflareclient.com', port=443): Max retries exceeded with url: /v0i2308311933/reg/d77e2fed-7b74-4113-b5de-fe979470150d (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f4ffcb87750>, 'Connection to api.cloudflareclient.com timed out. (connect timeout=None)'))