Throws an error after 1 hour on linux (Connection reset by peer)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- firebase, linux, python, raspberry-pi
- Domain
- authentication, backend, databases
Research direction
The failure is reported from StatusControllers.py line 110 while calling db.reference('roomsDevices').get(), with the traceback passing through firebase_admin, google-auth, requests, and urllib3. Start by reproducing the long-running Linux request and inspect the service-account token refresh path. Done requires a confirmed cause and a reproducible fix or documented configuration guidance.
Written by the indexing model from the issue text.
Description
The program worked for a long time on windows. Ported to linux (raspberry pi 4). After 1 hour of work, it gives an error. I assume that this is related to the id token. Please help me solve this problem
Python 3.9.2 (default, Mar 12 2021, 04:06:34)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license()" for more information.
=============== RESTART: /home/sabri/Desktop/StatusControllers.py ==============
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.9/http/client.py", line 1347, in getresponse
response.begin()
File "/usr/lib/python3.9/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.9/http/client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.9/socket.py", line 704, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.9/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.9/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3/dist-packages/six.py", line 718, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.9/http/client.py", line 1347, in getresponse
response.begin()
File "/usr/lib/python3.9/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.9/http/client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.9/socket.py", line 704, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.9/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.9/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sabri/.local/lib/python3.9/site-packages/google/auth/transport/requests.py", line 193, in call
response = self.session.request(
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/sabri/Desktop/StatusControllers.py", line 110, in
jsonStr = db.reference('roomsDevices').get() #получаем данные
File "/home/sabri/.local/lib/python3.9/site-packages/firebase_admin/db.py", line 221, in get
return self._client.body('get', self._add_suffix(), params=params)
File "/home/sabri/.local/lib/python3.9/site-packages/firebase_admin/_http_client.py", line 131, in body
resp = self.request(method, url, **kwargs)
File "/home/sabri/.local/lib/python3.9/site-packages/firebase_admin/db.py", line 929, in request
return super(_Client, self).request(method, url, **kwargs)
File "/home/sabri/.local/lib/python3.9/site-packages/firebase_admin/_http_client.py", line 118, in request
resp = self._session.request(method, self.base_url + url, **kwargs)
File "/home/sabri/.local/lib/python3.9/site-packages/google/auth/transport/requests.py", line 545, in request
self.credentials.before_request(auth_request, method, url, request_headers)
File "/home/sabri/.local/lib/python3.9/site-packages/google/auth/credentials.py", line 135, in before_request
self.refresh(request)
File "/home/sabri/.local/lib/python3.9/site-packages/google/oauth2/service_account.py", line 429, in refresh
access_token, expiry, _ = _client.jwt_grant(
File "/home/sabri/.local/lib/python3.9/site-packages/google/oauth2/_client.py", line 299, in jwt_grant
response_data = _token_endpoint_request(
File "/home/sabri/.local/lib/python3.9/site-packages/google/oauth2/_client.py", line 260, in _token_endpoint_request
response_status_ok, response_data, retryable_error = _token_endpoint_request_no_throw(
File "/home/sabri/.local/lib/python3.9/site-packages/google/oauth2/_client.py", line 209, in _token_endpoint_request_no_throw
request_succeeded, response_data, retryable_error = _perform_request()
File "/home/sabri/.local/lib/python3.9/site-packages/google/oauth2/_client.py", line 185, in _perform_request
response = request(
File "/home/sabri/.local/lib/python3.9/site-packages/google/auth/transport/requests.py", line 199, in call
six.raise_from(new_exc, caught_exc)
File "", line 3, in raise_from
google.auth.exceptions.TransportError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 359
- Avg merge
- 5d 6m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/firebase-admin-python
-
api: remoteconfig
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
firebase/firebase-admin-python#957 · 1 comment ·
-
api: database type: feature request
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
firebase/firebase-admin-python#978 · 1 comment ·
-
[FR] Support VERIFY_AND_CHANGE_EMAIL in generate_email_action_link (parity with firebase-admin-node) Openapi: auth
firebase/firebase-admin-python#949 · 2 comments · 1 reaction · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 43/100
firebase/firebase-admin-python#945 · 1 comment · 1 reaction ·
All issues in firebase/firebase-admin-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Openarea: ci bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-connect#1057 ·