Connection with Secure Tunnel is not established.

0

I am trying to build a C++ client application using AWS IoT Device SDK V2. I am using IoT service apis. I application is not able to establish a stable connection. I am getting success from connect API but immediately it terminating. I am not getting the possible root cause and solution. I need some solution or clue. Thanks in advance.

Application log:

Connection attempt failed with error code 2065(aws-c-io: AWS_IO_READ_WOULD_BLOCK, Read operation would block, try again later)

AWS SDK Log:

[tls-handler] - id=0x7f8644003060: Bytes read 376 [channel] - id=0x7f8644002d60: sending read message of size 376, from slot 0x7f863c004640 to slot 0x7f864402b770 with handler 0x7f8644029458. [http-connection] - id=0x7f8644029450: Incoming message of size 376. [http-stream] - id=0x7f86440170a0: Incoming response status: 426 (Upgrade Required). [http-stream] - id=0x7f86440170a0: Incoming header: content-type: application/json [http-stream] - id=0x7f86440170a0: Incoming header: content-length: 98 [http-stream] - id=0x7f86440170a0: Incoming header: date: Tue, 11 Jul 2023 09:49:42 GMT [http-stream] - id=0x7f86440170a0: Incoming header: x-amzn-RequestId: 0db4750f-4c3b-867b-a49d-798f5096793c [http-stream] - id=0x7f86440170a0: Incoming header: connection: keep-alive [http-stream] - id=0x7f86440170a0: Incoming header: x-amzn-ErrorType: InternalFailureException: [http-stream] - id=0x7f86440170a0: Incoming header: sec-websocket-version: 13,8,7 [http-stream] - id=0x7f86440170a0: Main header block done. [http-stream] - id=0x7f86440170a0: Incoming body: 98 bytes received. [http-stream] - id=0x7f86440170a0: Client request complete, response status: 426 (Upgrade Required). http-connection] - id=0x7f8644029450: Shutting down connection with error code 0 (AWS_ERROR_SUCCESS). [channel] - id=0x7f8644002d60: channel shutdown task is scheduled [channel] - id=0x7f8644002d60: scheduling task with wrapper task id 0x7f8644002f60. [event-loop] - id=0x7f864c000ae0: scheduling task 0x7f8644002f60 in-thread for timestamp 0 [task-scheduler] - id=0x7f8644002f60: Scheduling channel_shutdown task for immediate execution [http-stream] - id=0x7f86440170a0: Stream refcount released, 1 remaining. [http-stream] - id=0x7f86440170a0: Final stream refcount released. [http-connection] - id=0x7f8644029450: Connection refcount released, 1 remaining. [http-connection] - id=0x7f8644029450: Current incoming stream is now (nil). [http-connection] - id=0x7f8644029450: Decoded 376 bytes of message, 0 bytes remain.

gefragt vor 10 Monaten318 Aufrufe
1 Antwort
0

Hi Dheeraj. From the information supplied, it's not clear to me what you're doing or when/where exactly it's failing. Nonetheless, I recommend you consult the AWS IoT Device Client source code as an example. It's a reference implementation of a Linux-based AWS IoT device, built on top of the AWS IoT Device SDK for CPP V2. It's includes an implementation of secure tunneling: https://github.com/awslabs/aws-iot-device-client/tree/main/source/tunneling

profile pictureAWS
EXPERTE
Greg_B
beantwortet vor 10 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen