amazon-kinesis-video-streams-webrtc-sdk-c icon indicating copy to clipboard operation
amazon-kinesis-video-streams-webrtc-sdk-c copied to clipboard

[BUG] Can't run the kvsWebrtcClientMasterGst Sample with AWS_IOT_CORE_ENABLE_CREDENTIALS is activated

Open lnoth opened this issue 1 year ago • 0 comments

Logging [KVS GStreamer Master] Using trickleICE by default [2022/08/09 16:35:27:9108] N: LWS: 4.2.1-v4.2.2, loglevel 7 [2022/08/09 16:35:27:9110] N: NET CLI H1 H2 WS ConMon IPv6-absent [2022/08/09 16:35:27:9112] N: ++ [wsi|0|pipe] (1) [2022/08/09 16:35:27:9115] N: ++ [vh|0|netlink] (1) [2022/08/09 16:35:27:9142] N: ++ [vh|1|default||-1] (2) [2022/08/09 16:35:27:9151] N: lws_tls_client_create_vhost_context: doing cert filepath /home/lnoth/aws_iot_certs/0e67a615f2113eec4cc9ff62c7e806615846b0205300e1686b7afe91540e8fbb-certificate.pem.crt [2022/08/09 16:35:27:9156] N: ++ [wsicli|0|GET/h1/cs9ndnx63g8qb.credentials.iot.eu-central-1.am] (1) 2022-08-09 14:35:27 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 105 2022-08-09 14:35:27 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 19 [2022/08/09 16:35:27:9944] I: lws_state_notify_protocol_init: waiting for netlink coldplug [2022/08/09 16:35:27:9945] I: _report: system: prot_init: rejected 'INITIALIZED' -> 'IFACE_COLDPLUG' [2022/08/09 16:35:27:9945] I: lws_state_transition_steps: CONTEXT_CREATED -> INITIALIZED [2022/08/09 16:35:27:9946] I: rops_handle_POLLIN_netlink: RTM 24 [2022/08/09 16:35:27:9947] I: rops_handle_POLLIN_netlink: NEWROUTE [2022/08/09 16:35:27:9947] I: rops_handle_POLLIN_netlink: RTA_SRC: 172.20.10.5 [2022/08/09 16:35:27:9947] I: rops_handle_POLLIN_netlink: ifidx 3 [2022/08/09 16:35:27:9947] I: rops_handle_POLLIN_netlink: NEWROUTE rtm_type 1 [2022/08/09 16:35:27:9947] I: rops_handle_POLLIN_netlink: route list size 1 [2022/08/09 16:35:27:9948] I: rops_handle_POLLIN_netlink: RTM 24 [2022/08/09 16:35:27:9948] I: rops_handle_POLLIN_netlink: NEWROUTE [2022/08/09 16:35:27:9949] I: rops_handle_POLLIN_netlink: RTA_DST: 172.20.10.0 [2022/08/09 16:35:27:9949] I: rops_handle_POLLIN_netlink: RTA_SRC: 172.20.10.5 [2022/08/09 16:35:27:9949] I: rops_handle_POLLIN_netlink: ifidx 3 [2022/08/09 16:35:27:9950] I: rops_handle_POLLIN_netlink: NEWROUTE rtm_type 1 [2022/08/09 16:35:27:9950] I: rops_handle_POLLIN_netlink: route list size 2 [2022/08/09 16:35:27:9951] I: rops_handle_POLLIN_netlink: RTM 24 [2022/08/09 16:35:27:9951] I: rops_handle_POLLIN_netlink: NEWROUTE [2022/08/09 16:35:27:9952] I: rops_handle_POLLIN_netlink: RTA_DST: 127.0.0.0 [2022/08/09 16:35:27:9953] I: rops_handle_POLLIN_netlink: RTA_SRC: 127.0.0.1 [2022/08/09 16:35:27:9953] I: rops_handle_POLLIN_netlink: ifidx 1 [2022/08/09 16:35:27:9954] I: rops_handle_POLLIN_netlink: NEWROUTE rtm_type 2 [2022/08/09 16:35:27:9954] I: rops_handle_POLLIN_netlink: route list size 3 [2022/08/09 16:35:27:9955] I: rops_handle_POLLIN_netlink: RTM 24 [2022/08/09 16:35:27:9955] I: rops_handle_POLLIN_netlink: NEWROUTE [2022/08/09 16:35:27:9956] I: rops_handle_POLLIN_netlink: RTA_DST: 127.0.0.1 [2022/08/09 16:35:27:9956] I: rops_handle_POLLIN_netlink: RTA_SRC: 127.0.0.1 [2022/08/09 16:35:27:9957] I: rops_handle_POLLIN_netlink: ifidx 1 [2022/08/09 16:35:27:9957] I: rops_handle_POLLIN_netlink: NEWROUTE rtm_type 2 [2022/08/09 16:35:27:9958] I: rops_handle_POLLIN_netlink: route list size 4 [2022/08/09 16:35:27:9958] I: rops_handle_POLLIN_netlink: RTM 24 [2022/08/09 16:35:27:9959] I: rops_handle_POLLIN_netlink: NEWROUTE [2022/08/09 16:35:27:9959] I: rops_handle_POLLIN_netlink: RTA_DST: 127.255.255.255 [2022/08/09 16:35:27:9960] I: rops_handle_POLLIN_netlink: RTA_SRC: 127.0.0.1 [2022/08/09 16:35:27:9960] I: rops_handle_POLLIN_netlink: ifidx 1 [2022/08/09 16:35:27:9961] I: rops_handle_POLLIN_netlink: NEWROUTE rtm_type 3 [2022/08/09 16:35:27:9961] I: rops_handle_POLLIN_netlink: RTM 24 [2022/08/09 16:35:27:9962] I: rops_handle_POLLIN_netlink: NEWROUTE [2022/08/09 16:35:27:9962] I: rops_handle_POLLIN_netlink: RTA_DST: 172.20.10.5 [2022/08/09 16:35:27:9963] I: rops_handle_POLLIN_netlink: RTA_SRC: 172.20.10.5 [2022/08/09 16:35:27:9963] I: rops_handle_POLLIN_netlink: ifidx 3 [2022/08/09 16:35:27:9964] I: rops_handle_POLLIN_netlink: NEWROUTE rtm_type 2 [2022/08/09 16:35:27:9964] I: rops_handle_POLLIN_netlink: route list size 5 [2022/08/09 16:35:27:9965] I: rops_handle_POLLIN_netlink: RTM 24 [2022/08/09 16:35:27:9965] I: rops_handle_POLLIN_netlink: NEWROUTE [2022/08/09 16:35:27:9966] I: rops_handle_POLLIN_netlink: RTA_DST: 172.20.10.15 [2022/08/09 16:35:27:9966] I: rops_handle_POLLIN_netlink: RTA_SRC: 172.20.10.5 [2022/08/09 16:35:27:9967] I: rops_handle_POLLIN_netlink: ifidx 3 [2022/08/09 16:35:27:9967] I: rops_handle_POLLIN_netlink: NEWROUTE rtm_type 3 [2022/08/09 16:35:27:9968] I: _lws_routing_table_dump [2022/08/09 16:35:27:9968] I: gw: 172.20.10.1, ifidx: 3, pri: 303, proto: 16 [2022/08/09 16:35:27:9969] I: src: 172.20.10.5/0, ifidx: 3, pri: 303, proto: 16 [2022/08/09 16:35:27:9969] I: src: 127.0.0.1/0, ifidx: 1, pri: -1, proto: 2 [2022/08/09 16:35:27:9970] I: src: 127.0.0.1/0, ifidx: 1, pri: -1, proto: 2 [2022/08/09 16:35:27:9970] I: src: 172.20.10.5/0, ifidx: 3, pri: -1, proto: 2 [2022/08/09 16:35:27:9971] I: _lws_smd_msg_destroy: destroy msg 0x557ebad450 [2022/08/09 16:35:27:9972] I: _lws_smd_msg_destroy: destroy msg 0x557ebad400 [2022/08/09 16:35:27:9972] I: _lws_smd_msg_destroy: destroy msg 0x557ebadc10 [2022/08/09 16:35:27:9973] I: _lws_smd_msg_destroy: destroy msg 0x557ebadcd0 [2022/08/09 16:35:27:9973] I: _lws_smd_msg_destroy: destroy msg 0x557ebadd90 [2022/08/09 16:35:27:9974] I: _lws_smd_msg_destroy: destroy msg 0x557ebadde0 [2022/08/09 16:35:27:9975] I: rops_handle_POLLIN_netlink: RTM 24 [2022/08/09 16:35:27:9975] I: rops_handle_POLLIN_netlink: NEWROUTE [2022/08/09 16:35:27:9976] I: rops_handle_POLLIN_netlink: RTA_DST: (ipv6 unsupp) [2022/08/09 16:35:27:9976] I: rops_handle_POLLIN_netlink: ifidx 1 [2022/08/09 16:35:27:9977] I: rops_handle_POLLIN_netlink: NEWROUTE rtm_type 1 [2022/08/09 16:35:27:9977] I: rops_handle_POLLIN_netlink: route list size 6 [2022/08/09 16:35:27:9978] I: rops_handle_POLLIN_netlink: RTM 24 [2022/08/09 16:35:27:9978] I: rops_handle_POLLIN_netlink: NEWROUTE [2022/08/09 16:35:27:9979] I: rops_handle_POLLIN_netlink: RTA_DST: (ipv6 unsupp) [2022/08/09 16:35:27:9979] I: rops_handle_POLLIN_netlink: ifidx 3 [2022/08/09 16:35:27:9980] I: rops_handle_POLLIN_netlink: NEWROUTE rtm_type 1 [2022/08/09 16:35:27:9980] I: rops_handle_POLLIN_netlink: route list size 7 [2022/08/09 16:35:27:9981] I: rops_handle_POLLIN_netlink: RTM 24 [2022/08/09 16:35:27:9981] I: rops_handle_POLLIN_netlink: NEWROUTE [2022/08/09 16:35:27:9982] I: rops_handle_POLLIN_netlink: RTA_DST: (ipv6 unsupp) [2022/08/09 16:35:27:9982] I: rops_handle_POLLIN_netlink: ifidx 1 [2022/08/09 16:35:27:9983] I: rops_handle_POLLIN_netlink: NEWROUTE rtm_type 2 [2022/08/09 16:35:27:9983] I: rops_handle_POLLIN_netlink: RTM 24 [2022/08/09 16:35:27:9984] I: rops_handle_POLLIN_netlink: NEWROUTE [2022/08/09 16:35:27:9984] I: rops_handle_POLLIN_netlink: RTA_DST: (ipv6 unsupp) [2022/08/09 16:35:27:9985] I: rops_handle_POLLIN_netlink: ifidx 3 [2022/08/09 16:35:27:9985] I: rops_handle_POLLIN_netlink: NEWROUTE rtm_type 2 [2022/08/09 16:35:27:9986] I: rops_handle_POLLIN_netlink: route list size 8 [2022/08/09 16:35:27:9986] I: rops_handle_POLLIN_netlink: RTM 24 [2022/08/09 16:35:27:9987] I: rops_handle_POLLIN_netlink: NEWROUTE [2022/08/09 16:35:27:9987] I: rops_handle_POLLIN_netlink: RTA_DST: (ipv6 unsupp) [2022/08/09 16:35:27:9988] I: rops_handle_POLLIN_netlink: ifidx 3 [2022/08/09 16:35:27:9988] I: rops_handle_POLLIN_netlink: NEWROUTE rtm_type 5 [2022/08/09 16:35:27:9989] I: _lws_routing_table_dump [2022/08/09 16:35:27:9989] I: gw: 172.20.10.1, ifidx: 3, pri: 303, proto: 16 [2022/08/09 16:35:27:9990] I: src: 172.20.10.5/0, ifidx: 3, pri: 303, proto: 16 [2022/08/09 16:35:27:9990] I: src: 127.0.0.1/0, ifidx: 1, pri: -1, proto: 2 [2022/08/09 16:35:27:9991] I: src: 127.0.0.1/0, ifidx: 1, pri: -1, proto: 2 [2022/08/09 16:35:27:9991] I: src: 172.20.10.5/0, ifidx: 3, pri: -1, proto: 2 [2022/08/09 16:35:27:9992] I: dst: (ipv6 unsupp)/128, ifidx: 1, pri: 0, proto: 2 [2022/08/09 16:35:27:9992] I: dst: (ipv6 unsupp)/64, ifidx: 3, pri: 256, proto: 2 [2022/08/09 16:35:27:9992] I: dst: (ipv6 unsupp)/128, ifidx: 3, pri: 0, proto: 2 [2022/08/09 16:35:27:9993] I: _lws_smd_msg_destroy: destroy msg 0x557ebadd90 [2022/08/09 16:35:27:9993] I: _lws_smd_msg_destroy: destroy msg 0x557ebadcd0 [2022/08/09 16:35:27:9993] I: _lws_smd_msg_destroy: destroy msg 0x557ebadc10 [2022/08/09 16:35:27:9994] I: rops_handle_POLLIN_netlink: RTM 3 [2022/08/09 16:35:27:9994] I: rops_handle_POLLIN_netlink: *** Unknown RTM_3 [2022/08/09 16:35:28:0398] I: lws_client_connect_3_connect: [wsicli|0|GET/h1/cs9ndnx63g8qb.credentials.iot.eu-central-1.am]: source ads 172.20.10.5 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 29 [2022/08/09 16:35:28:0399] I: lws_client_connect_4_established: [wsicli|0|GET/h1/cs9ndnx63g8qb.credentials.iot.eu-central-1.am]: h1 https client created own conn (raw 0) vh defaultm st 0x202 [2022/08/09 16:35:28:0401] I: lws_tls_reuse_session: no existing session for default_cs9ndnx63g8qb.credentials.iot.eu-central-1.amazonaws.com_443 [2022/08/09 16:35:28:0402] I: h1 client conn using alpn list '(null)' [2022/08/09 16:35:28:0994] I: lws_state_transition_steps: INITIALIZED -> OPERATIONAL 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 58 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 58 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 58 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 58 [2022/08/09 16:35:28:1648] I: lws_tls_session_new_cb: 0x557ebbf980: [wsicli|0|GET/h1/cs9ndnx63g8qb.credentials.iot.eu-central-1.am]: new default_cs9ndnx63g8qb.credentials.iot.eu-central-1.amazonaws.com_443, ttl 7200s (default:1) [2022/08/09 16:35:28:1649] I: lws_role_call_alpn_negotiated: '' [2022/08/09 16:35:28:1649] I: client connect OK [2022/08/09 16:35:28:1649] I: lws_openssl_describe_cipher: [wsicli|0|GET/h1/cs9ndnx63g8qb.credentials.iot.eu-central-1.am]: ECDHE-RSA-AES256-GCM-SHA384, ECDHE-RSA-AES256-GCM-SHA384, 256 bits, TLSv1.2 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 24 2022-08-09 14:35:28 DEBUG lwsIotCallbackRoutine(): Client append handshake header

2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): Appending header - user-agent: AWS-SDK-KVS 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): Appending header - x-amzn-iot-thingname: morphean_rpi_camera_1 [2022/08/09 16:35:28:1651] I: lws_http_client_socket_service: HANDSHAKE2: [wsicli|0|GET/h1/cs9ndnx63g8qb.credentials.iot.eu-central-1.am]: sending headers (wsistate 0x10000204), w sock 7 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 57 2022-08-09 14:35:28 DEBUG lwsIotCallbackRoutine(): Sending the body , size 0 [2022/08/09 16:35:28:2419] I: lws_buflist_append_segment: len 27 first 1 (nil) [2022/08/09 16:35:28:2419] I: lws_client_interpret_server_handshake: incoming content length 27 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 2 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 44 2022-08-09 14:35:28 DEBUG lwsIotCallbackRoutine(): Connected with server response: 403 [2022/08/09 16:35:28:2420] I: lws_client_interpret_server_handshake: [wsicli|0|GET/h1/cs9ndnx63g8qb.credentials.iot.eu-central-1.am]: client conn up 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 46 2022-08-09 14:35:28 DEBUG lwsIotCallbackRoutine(): Received client http 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 48 2022-08-09 14:35:28 DEBUG lwsIotCallbackRoutine(): Received client http read: 27 bytes [2022/08/09 16:35:28:2422] I: lws_http_transaction_completed_client: [wsicli|0|GET/h1/cs9ndnx63g8qb.credentials.iot.eu-central-1.am] (https) 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 47 2022-08-09 14:35:28 DEBUG lwsIotCallbackRoutine(): Http client completed [2022/08/09 16:35:28:2422] I: _lws_generic_transaction_completed_active_conn: nothing pipelined waiting [2022/08/09 16:35:28:2422] I: lws_buflist_aware_finished_consuming: removed 0x557ebaae70 from dll_buflist [2022/08/09 16:35:28:2423] I: lws_context_destroy: destroy_state 0 [2022/08/09 16:35:28:2423] I: lws_context_destroy: starting context destroy flow [2022/08/09 16:35:28:2423] I: lws_context_destroy: vh default start close [2022/08/09 16:35:28:2423] I: lws_vhost_destroy1 [2022/08/09 16:35:28:2423] I: __lws_tls_session_destroy: default_cs9ndnx63g8qb.credentials.iot.eu-central-1.amazonaws.com_443 (0) [2022/08/09 16:35:28:2424] I: __lws_close_free_wsi: [wsi|0|pipe]: caller: ctx destroy [2022/08/09 16:35:28:2424] I: __lws_close_free_wsi: real just_kill_connection: [wsi|0|pipe] (sockfd 4) [2022/08/09 16:35:28:2424] I: __lws_close_free_wsi: [wsi|0|pipe]: cce=0 [2022/08/09 16:35:28:2424] N: -- [wsi|0|pipe] (0) 331.266ms [2022/08/09 16:35:28:2425] I: __lws_close_free_wsi: [wsicli|0|GET/h1/cs9ndnx63g8qb.credentials.iot.eu-central-1.am]: caller: ctx destroy [2022/08/09 16:35:28:2425] I: __lws_close_free_wsi: real just_kill_connection: [wsicli|0|GET/h1/cs9ndnx63g8qb.credentials.iot.eu-central-1.am] (sockfd 7) [2022/08/09 16:35:28:2425] I: __lws_close_free_wsi: [wsicli|0|GET/h1/cs9ndnx63g8qb.credentials.iot.eu-central-1.am]: cce=1 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 45 2022-08-09 14:35:28 DEBUG lwsIotCallbackRoutine(): Client http closed 2022-08-09 14:35:28 VERBOSE lwsIotCallbackRoutine(): HTTPS callback with reason 30 [2022/08/09 16:35:28:2428] I: rops_destroy_role_h1: ah det due to close [2022/08/09 16:35:28:2429] I: __lws_header_table_detach: [wsicli|0|GET/h1/cs9ndnx63g8qb.credentials.iot.eu-central-1.am]: ah 0x557eba6ef0 (tsi=0, count = 1) [2022/08/09 16:35:28:2429] I: __lws_header_table_detach: nobody usable waiting [2022/08/09 16:35:28:2430] I: _lws_destroy_ah: freed ah 0x557eba6ef0 : pool length 0 [2022/08/09 16:35:28:2430] I: __lws_header_table_detach: [wsicli|0|GET/h1/cs9ndnx63g8qb.credentials.iot.eu-central-1.am]: ah 0x557eba6ef0 (tsi=0, count = 0) [2022/08/09 16:35:28:2431] N: -- [vh|1|default||-1] (1) 328.909ms [2022/08/09 16:35:28:2431] N: -- [wsicli|0|GET/h1/cs9ndnx63g8qb.credentials.iot.eu-central-1.am] (0) 327.482ms [2022/08/09 16:35:28:2431] I: __lws_close_free_wsi: [vh|0|netlink]: caller: ctx destroy [2022/08/09 16:35:28:2431] I: __lws_close_free_wsi: real just_kill_connection: [vh|0|netlink] (sockfd 6) [2022/08/09 16:35:28:2432] I: __lws_close_free_wsi: [vh|0|netlink]: cce=0 [2022/08/09 16:35:28:2432] N: -- [vh|0|netlink] (0) 331.725ms [2022/08/09 16:35:28:2433] I: lws_context_destroy: manually destroying pts [2022/08/09 16:35:28:2433] I: lws_context_destroy: PT_WAIT_ALL_DESTROYED: 0 alive [2022/08/09 16:35:28:2434] I: lws_context_destroy: pt destroy 0 [2022/08/09 16:35:28:2434] I: lws_context_destroy: pt 0 fully destroyed [KVS GStreamer Master] createSampleConfiguration(): operation returned status code: 0x15000027 [KVS GStreamer Master] Terminated with status code 0x15000027[KVS GStreamer Master] Cleaning up.... [KVS Gstreamer Master] Cleanup done

Describe the bug I'm able to run the sample if i set the session token manually, but as soon as i change to IOT, it won't work anymore. Moreover the steps to follow in the readme to activate the IOT credentials are not very clear to me and the script to create them (in the script folder) is giving errors.

I read that I should have the session token activated, but I don't understand why it would be the case as i'm suppose to replace the session token by the IOT providing.

SDK version number SDK 1.7.3

Open source building If it is a build issue, include 3rd party library version and steps to how you are building it

To Reproduce Steps to reproduce the behavior: Build the samples and activate the IOT credentials before the make. Then run the sample and we have this error.

Expected behavior A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: Raspberry Pi 4
  • Browser Chrome

lnoth avatar Aug 09 '22 14:08 lnoth