内网脚本运行失败

内网部署的 python脚本运行失败 日志如下

Traceback (most recent call last):
File “/root/.local/lib/python3.11/site-packages/urllib3/connection.py”, line 198, in _new_conn
sock = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/root/.local/lib/python3.11/site-packages/urllib3/util/connection.py”, line 85, in create_connection
raise err
File “/root/.local/lib/python3.11/site-packages/urllib3/util/connection.py”, line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/root/.local/lib/python3.11/site-packages/urllib3/connectionpool.py”, line 793, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File “/root/.local/lib/python3.11/site-packages/urllib3/connectionpool.py”, line 496, in _make_request
conn.request(
File “/root/.local/lib/python3.11/site-packages/urllib3/connection.py”, line 400, in request
self.endheaders()
File “/usr/local/lib/python3.11/http/client.py”, line 1298, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/usr/local/lib/python3.11/http/client.py”, line 1058, in _send_output
self.send(msg)
File “/usr/local/lib/python3.11/http/client.py”, line 996, in send
self.connect()
File “/root/.local/lib/python3.11/site-packages/urllib3/connection.py”, line 238, in connect
self.sock = self._new_conn()
^^^^^^^^^^^^^^^^
File “/root/.local/lib/python3.11/site-packages/urllib3/connection.py”, line 213, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fea1dff7d50>: Failed to establish a new connection: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/root/.local/lib/python3.11/site-packages/requests/adapters.py”, line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File “/root/.local/lib/python3.11/site-packages/urllib3/connectionpool.py”, line 847, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File “/root/.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: HTTPConnectionPool(host=‘127.0.0.1’, port=810): Max retries exceeded with url: /api/v2.1/dtable/app-access-token/ (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x7fea1dff7d50>: Failed to establish a new connection: [Errno 111] Connection refused’))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/scripts/index.py”, line 7, in
base.auth()
File “/root/.local/lib/python3.11/site-packages/seatable_api/main.py”, line 98, in auth
response = requests.get(url, headers=headers, timeout=self.timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/root/.local/lib/python3.11/site-packages/requests/api.py”, line 73, in get
return request(“get”, url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/root/.local/lib/python3.11/site-packages/requests/api.py”, line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/root/.local/lib/python3.11/site-packages/requests/sessions.py”, line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/root/.local/lib/python3.11/site-packages/requests/sessions.py”, line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/root/.local/lib/python3.11/site-packages/requests/adapters.py”, line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host=‘127.0.0.1’, port=810): Max retries exceeded with url: /api/v2.1/dtable/app-access-token/ (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x7fea1dff7d50>: Failed to establish a new connection: [Errno 111] Connection refused’))