aws-samples / appstream-serverless-image-creation-automation

This repository contains the file associated with the Amazon AppStream 2.0 Serverless Image Automation blog posts.
MIT No Attribution
11 stars 6 forks source link

WinRM Connection reset buy peer errors in AS2_Automation_Windows_FN02_Scripted_Install #10

Open gregn610 opened 1 year ago

gregn610 commented 1 year ago

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.