aws-samples / aws-samples/appstream-serverless-image-creation-automation
WinRM Connection reset buy peer errors in AS2_Automation_Windows_FN02_Scripted_Install
- Dominant language
- Python
- Stars
- 14
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
Intermittent WinRM Connection reset buy peer errors in AS2_Automation_Windows_FN02_Scripted_Install:
```
[ERROR] ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 181, in lambda_handler
install_application(s3_bucket, tempdir, host, user, password, 'SSMS')
File "/var/task/lambda_function.py", line 50, in install_application
result = session.run_ps(command)
File "/opt/python/winrm/__init__.py", line 52, in run_ps
rs = self.run_cmd('powershell -encodedcommand {0}'.format(encoded_ps))
File "/opt/python/winrm/__init__.py", line 39, in run_cmd
shell_id = self.protocol.open_shell()
File "/opt/python/winrm/protocol.py", line 166, in open_shell
res = self.send_message(xmltodict.unparse(req))
File "/opt/python/winrm/protocol.py", line 243, in send_message
resp = self.transport.send_message(message)
File "/opt/python/winrm/transport.py", line 334, in send_message
response = self._send_message_request(prepared_request, message)
File "/opt/python/winrm/transport.py", line 339, in _send_message_request
response = self.session.send(prepared_request, timeout=self.read_timeout_sec)
File "/opt/python/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/opt/python/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
```
These don't seem to be related to the lambda timeout or lambda RAM allocation.
Contributor guide
Research direction
Start in lambda_function.py at lambda_handler line 181 and install_application line 50, then trace the WinRM call through the vendored winrm package paths shown in the traceback. Reproduce or instrument the intermittent failure and identify a reliable resolution; done means the connection-reset errors are explained and the installation flow handles them successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, powershell, python
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100