Closed davidparks21 closed 3 years ago
I have the same problem, tried to update from awscrt==0.9.10 awsiotsdk==1.5.2
to awsiotsdk==1.5.14
and got the exact same error
If you could attach trace level logs that would be very helpful, as well as the code snippet that triggers it. Also I see two completely different errors, one post-connection, one building the tls context -- a log for the tls context error would be ideal.
I noticed a very strange bug that causes the runtime issue RuntimeError: 1033 (AWS_IO_TLS_CTX_ERROR): Failed to create tls context
mentioned here while using the pubsub.py
script included in this SDK.
When I used the SDK as instructed in the tutorial it worked fine the first time. Then, I simply added a few print statements before the connection builder ran, which caused the error to appear:
I'm guessing there is some kind of a race condition between when the connection dependency stuff is set up, and when it is used in the mqtt_connection_builder.mtls_from_path()
:
event_loop_group = io.EventLoopGroup(1)
host_resolver = io.DefaultHostResolver(event_loop_group)
client_bootstrap = io.ClientBootstrap(event_loop_group, host_resolver)
...
mqtt_connection = mqtt_connection_builder.mtls_from_path(
endpoint=args.endpoint,
cert_filepath=args.cert,
pri_key_filepath=args.key,
client_bootstrap=client_bootstrap,
...
When I push that stuff into the mtls_from_path
definition, like so:
client_bootstrap=io.ClientBootstrap(event_loop_group, io.DefaultHostResolver(event_loop_group))
,
the code works again:
A fix for this is pending. We should be able to have it released on Monday.
We are hoping this has been addressed in the v1.5.17 release. Please reopen if you're still seeing an issue.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Known Issue
<prefix>-ats.iot.<region>.amazonaws.com
Describe the bug Originally posted on SO: https://stackoverflow.com/questions/67308198/awsiot-runtimeerror-1033-aws-io-tls-ctx-error-failed-to-create-tls-context
I recently upgraded the packaged awsiotsdk and awscrt from versions 1.5.7 -> 1.5.10 and 0.10.8 -> 0.11.4. After doing so I'm getting the following error:
The error is coming from the following function which works in the previous version.
SDK version number awsiotsdk: 1.5.7 -> 1.5.10 awscrt: 0.10.8 -> 0.11.4
Platform/OS/Device Ubuntu 20.10
Logs/output