Closed Bug 1757815 Opened 3 years ago Closed 3 years ago

systemtests ssl error

Categories

(Socorro :: Antenna, task, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

Details

Attachments

(1 file)

When I run the system tests against stage, I get an SSL error:

test_25mblimit.py::Test25mbLimit::test_crash_size[26214401-413] FAILED                                                         [ 15%]
test_25mblimit.py::Test25mbLimit::test_26mb_and_low_content_length FAILED                                                      [ 20%]
...

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/local/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1076, in _send_output
    self.send(chunk)
  File "/usr/local/lib/python3.10/http/client.py", line 998, in send
    self.sock.sendall(data)
  File "/usr/local/lib/python3.10/ssl.py", line 1236, in sendall
    v = self.send(byte_view[count:])
  File "/usr/local/lib/python3.10/ssl.py", line 1205, in send
    return self._sslobj.write(data)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2384)

I don't remember the last time I ran the system tests. I'm guessing something changed. Maybe the Python version?

Assignee: nobody → willkg
Status: NEW → ASSIGNED

I downgraded the container to Python 3.9.10 and the problems go away. Then I read the failing test code.

What's going on is that requests uses httplib and when it's writing to the socket and hits an error (the HTTP server severs the connection because the body was too large), it doesn't read the server response and instead raises an error. Previously, the error is ultimately a requests.exception.ConnectionError. Now it's a requests.exception.SSLError.

So I updated the code accordingly. Everything is fine with stage and the extract_payload changes and the systemtest failures are from updating Python from 3.9 to 3.10.

This is fixed now.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: