SG / Flow addon SSL troubleshooting

Hey community!
Working on an ongoing issue at our studio, regarding the SG addon failing at the MOV upload stage
I’m looking to get any advice on possible next moves in the troubleshooting process

Here’s the error (this log itself is a bit old, we’ve updated addons etc since this but the error is unchanged)

DEBUG: {'colorspaceData': {'colorspace': 'scene_linear',
                    'config': {'path': 'C:\\Users\\username\\AppData\\Local\\Ynput\\AYON\\addons\\ayon_ocio_1.1.1\\ayon_ocio\\configs\\OpenColorIOConfigs\\aces_1.2\\config.ocio',
                               'template': '{BUILTIN_OCIO_ROOT}/aces_1.2/config.ocio'}},
 'ext': 'exr',
 'files': ['renderCompMain.1001.exr',
           'renderCompMain.1002.exr',
           ...
           'renderCompMain.1479.exr',
           'renderCompMain.1480.exr'],
 'name': 'exr',
 'published_path': 'Y:/projects/AYON_dev/101/sq001/sh010/publish/render/renderCompMain/v041/ad_sh010_renderCompMain_v041.1001.exr',
 'stagingDir': 'Y:/projects/AYON_dev/101/sq001/sh010/work/Comp/renders/nuke/renderCompMain',
 'tags': []}
DEBUG: {'ext': 'mp4',
 'ffmpeg_cmd': 'C:\\Users\\username\\AppData\\Local\\Ynput\\AYON\\addons\\ayon_third_party_1.0.0\\ayon_third_party\\downloads\\ffmpeg\\bin\\ffmpeg.exe '
               '-apply_trc gamma22 -i '
               'Y:\\projects\\AYON_dev\\101\\sq001\\sh010\\work\\Comp\\renders\\nuke\\renderCompMain\\renderCompMain.baking.mov '
               '-pix_fmt yuv420p -crf 18 -intra -y '
               'Y:\\projects\\AYON_dev\\101\\sq001\\sh010\\work\\Comp\\renders\\nuke\\renderCompMain\\renderCompMain.baking_h264.mp4',
 'files': 'renderCompMain.baking_h264burnin.mp4',
 'fps': 25.0,
 'frameEnd': 1481,
 'frameEndFtrack': 1481,
 'frameStart': 1001,
 'frameStartFtrack': 1001,
 'name': 'h264_mov',
 'outputDef': {'bg_color': [0, 0, 0, 0.0],
               'burnins': [],
               'ext': 'mp4',
               'ffmpeg_args': {'audio_filters': [],
                               'input': ['-apply_trc gamma22'],
                               'output': ['-pix_fmt yuv420p',
                                          '-crf 18',
                                          '-intra'],
                               'video_filters': []},
               'filename_suffix': 'h264',
               'filter': {'custom_tags': [],
                          'families': ['render', 'review', 'ftrack'],
                          'product_names': [],
                          'single_frame_filter': 'multi_frame'},
               'height': 0,
               'letter_box': {'enabled': False,
                              'fill_color': [0, 0, 0, 1.0],
                              'line_color': [255, 0, 0, 1.0],
                              'line_thickness': 0,
                              'ratio': 0.0},
               'name': 'h264',
               'overscan_color': [0, 0, 0, 1.0],
               'overscan_crop': '',
               'scale_pixel_aspect': True,
               'tags': ['burnin', 'shotgridreview'],
               'width': 0},
 'outputName': 'h264',
 'published_path': 'Y:\\projects\\AYON_dev\\101\\sq001\\sh010\\publish\\render\\renderCompMain\\v041\\ad_sh010_renderCompMain_v041_h264.mp4',
 'resolutionHeight': 1080,
 'resolutionWidth': 1920,
 'stagingDir': 'Y:\\projects\\AYON_dev\\101\\sq001\\sh010\\work\\Comp\\renders\\nuke\\renderCompMain',
 'tags': ['baking', 'review', 'reformatted', 'burnin', 'shotgridreview']}
DEBUG: {'ext': 'jpg',
 'files': 'renderCompMain.baking_thumb.jpg',
 'name': 'thumbnail',
 'outputName': 'baking',
 'published_path': 'Y:\\projects\\AYON_dev\\101\\sq001\\sh010\\publish\\render\\renderCompMain\\v041\\ad_sh010_renderCompMain_v041_baking.jpg',
 'stagingDir': 'C:\\Users\\REECE~1.MUL\\AppData\\Local\\Temp\\pyblish_tmp_1va3dbzv',
 'tags': ['thumbnail'],
 'thumbnail': True}
INFO: Integrating Shotgrid version with code: sh010_renderCompMain_Comp_v041
INFO: Create Shotgrid version: {'id': 92481, 'project': {'id': 2272, 'name': 'AYON_dev', 'type': 'Project'}, 'entity': {'id': 13240, 'name': 'sh010', 'type': 'Shot'}, 'code': 'sh010_renderCompMain_Comp_v041', 'sg_task': {'id': 49573, 'name': 'Comp', 'type': 'Task'}, 'type': 'Version'}
INFO: Upload review: Y:\projects\AYON_dev\101\sq001\sh010\publish\render\renderCompMain\v041\ad_sh010_renderCompMain_v041_h264.mp4 for version shotgrid 92481
Traceback (most recent call last):
  File "C:\Program Files\Nuke15.0v1\python310.zip\urllib\request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "C:\Program Files\Nuke15.0v1\python310.zip\http\client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "C:\Program Files\Nuke15.0v1\python310.zip\http\client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "C:\Program Files\Nuke15.0v1\python310.zip\http\client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "C:\Program Files\Nuke15.0v1\python310.zip\http\client.py", line 1037, in _send_output
    self.send(msg)
  File "C:\Program Files\Nuke15.0v1\python310.zip\http\client.py", line 975, in send
    self.connect()
  File "C:\Users\username\AppData\Local\Ynput\AYON\dependency_packages\ayon_2403071252_windows.zip\dependencies\shotgun_api3\shotgun.py", line 4253, in connect
    self.sock = context.wrap_socket(self.sock)
  File "C:\Program Files\Nuke15.0v1\python310.zip\ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "C:\Program Files\Nuke15.0v1\python310.zip\ssl.py", line 1071, in _create
    self.do_handshake()
  File "C:\Program Files\Nuke15.0v1\python310.zip\ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\username\AppData\Local\Ynput\AYON\dependency_packages\ayon_2403071252_windows.zip\dependencies\pyblish\plugin.py", line 527, in __explicit_process
    runner(*args)
  File "C:\Users\username\AppData\Local\Ynput\AYON\addons\shotgrid_0.4.2-dev.5\ayon_shotgrid\plugins\publish\integrate_shotgrid_version.py", line 116, in process
    sg_session.upload(
  File "C:\Users\username\AppData\Local\Ynput\AYON\dependency_packages\ayon_2403071252_windows.zip\dependencies\shotgun_api3\shotgun.py", line 2460, in upload
    return self._upload_to_storage(entity_type, entity_id, path, field_name, display_name,
  File "C:\Users\username\AppData\Local\Ynput\AYON\dependency_packages\ayon_2403071252_windows.zip\dependencies\shotgun_api3\shotgun.py", line 2497, in _upload_to_storage
    self._upload_file_to_storage(path, upload_info["upload_url"])
  File "C:\Users\username\AppData\Local\Ynput\AYON\dependency_packages\ayon_2403071252_windows.zip\dependencies\shotgun_api3\shotgun.py", line 4008, in _upload_file_to_storage
    self._upload_data_to_storage(fd, content_type, file_size, storage_url)
  File "C:\Users\username\AppData\Local\Ynput\AYON\dependency_packages\ayon_2403071252_windows.zip\dependencies\shotgun_api3\shotgun.py", line 4106, in _upload_data_to_storage
    result = self._make_upload_request(request, opener)
  File "C:\Users\username\AppData\Local\Ynput\AYON\dependency_packages\ayon_2403071252_windows.zip\dependencies\shotgun_api3\shotgun.py", line 3626, in _make_upload_request
    result = opener.open(request)
  File "C:\Program Files\Nuke15.0v1\python310.zip\urllib\request.py", line 519, in open
    response = self._open(req, data)
  File "C:\Program Files\Nuke15.0v1\python310.zip\urllib\request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "C:\Program Files\Nuke15.0v1\python310.zip\urllib\request.py", line 496, in _call_chain
    result = func(*args)
  File "C:\Users\username\AppData\Local\Ynput\AYON\dependency_packages\ayon_2403071252_windows.zip\dependencies\shotgun_api3\shotgun.py", line 4272, in https_open
    return self.do_open(self.create_https_connection, req)
  File "C:\Program Files\Nuke15.0v1\python310.zip\urllib\request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:997)>

Prerequisites-

Ayon server 1.0.3
SG addon 0.4.4
Windows OS 10.0.19045.4780
Up to date certificates (following suggestion from @jakub.jezek, thx man)
Running a squid proxy server

Troubleshooting process so far-

Checked our studio’s proxy- Autodesk + AWS URLs are allowed through
Updated windows & certificates
Installed AWS certificates, just to be sure
pinged a random s3 aws page ( urlopen(‘SSL Test’) ), successful
came across the shotgun-toolbox (connectivity test tool), converted to py3 and ran with no problems

I’ve just noticed now that Ayon’s “SSL_CERT_FILE” env var is set to the install dir of AYON 1.0.0 and not 1.0.3, I’ll have to look into this
Also not sure if the referenced cacert.pem would override any local certs

Anyways, this is here mainly to document the current steps taken, hope I’m not pestering too much - if anyone has any suggestions for troubleshooting steps please fire away :slight_smile:

1 Like

Hey, we found a solution for our studio! We have MOVs on Shotgrid!

The trick was mimicking the way our current config of Deadline’s SG integration works, specifically the “No SSL Validation” setting

There’s no exposed parameter in the Ayon Shotgrid addon for this. So, following the Shotgun API reference, I added this line into the addon’s integrate_shotgrid_version.py, to force it on

Bit of a weird place to put this, also I had to import the shotgun_api3 in here. This is a bad way to do this but it works. Would be awesome to have a less evil implementation of this eventually, but we’re happy for now

2 Likes

Thanks, created an issue here to track the ‘feature’.

3 Likes