amazon-kinesis-video-streams-webrtc-sdk-c: Connection timed out
I successfully compiled on arm64, but am unable to run any of the three samples without a connection timeout.
:~/amazon-kinesis-video-streams-webrtc-sdk-c/build$ AWS_ACCESS_KEY_ID="access" AWS_SECRET_ACCESS_KEY="secret" REGION_NAME="us-west-2" ./kvsWebrtcClientMasterGstSample demo2
[KVS GStreamer Master] Using trickleICE by default
[KVS GStreamer Master] Created signaling channel demo2
[KVS Gstreamer Master] Finished initializing GStreamer
[KVS Gstreamer Master] Streaming video only
[KVS GStreamer Master] KVS WebRTC initialization completed successfully
[KVS GStreamer Master] Signaling client created successfully
[KVS GStreamer Master] Signaling client connection to socket established
[KVS Gstreamer Master] Beginning streaming...check the stream over channel demo2
2020-01-15 00:49:10 DEBUG iceAgentValidateKvsRtcConfig():
iceLocalCandidateGatheringTimeout: 10000 ms
iceConnectionCheckTimeout: 10000 ms
iceCandidateNominationTimeout: 10000 ms
iceConnectionCheckPollingInterval: 50 ms
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client receive {"messagePayload":"[...snip...]","messageType":"ICE_CANDIDATE","senderClientId":"ik44sfhawixoqeq1zfu"}
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:49:10 DEBUG stepIceAgentStateMachine(): Ice agent state changed from ICE_AGENT_STATE_NONE to ICE_AGENT_STATE_NEW.
2020-01-15 00:49:10 INFO signalingClientSendMessageSync(): Signaling Client Sending Message Sync
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client is writable
{"messagePayload":"[...snip...]","messageType":"ICE_CANDIDATE","senderClientId":"ik44sfhawixoqeq1zfu"}
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:49:10 DEBUG stepStateMachine(): State Machine - Current state: 0x0000000000000001, Next state: 0x0000000000000002
2020-01-15 00:49:10 INFO signalingClientSendMessageSync(): Signaling Client Sending Message Sync
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:49:10 INFO signalingClientSendMessageSync(): Signaling Client Sending Message Sync
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:49:10 INFO signalingClientSendMessageSync(): Signaling Client Sending Message Sync
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client receive
2020-01-15 00:49:10 WARN receiveLwsMessage(): Signaling received an empty message
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client receive
2020-01-15 00:49:10 WARN receiveLwsMessage(): Signaling received an empty message
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client receive
2020-01-15 00:49:10 WARN receiveLwsMessage(): Signaling received an empty message
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client receive
2020-01-15 00:49:10 WARN receiveLwsMessage(): Signaling received an empty message
2020-01-15 00:49:10 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:49:20 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:49:30 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:49:40 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:49:50 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:50:00 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:50:10 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:50:20 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:50:30 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:50:40 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:50:50 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:51:00 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:51:10 DEBUG lwsWssCallbackRoutine(): Client is writable
2020-01-15 00:51:17 WARN createSocket(): connect() failed with errno Connection timed out
2020-01-15 00:51:17 ERROR createSocketConnection(): operation returned status code: 0x5800001d
2020-01-15 00:51:17 ERROR turnConnectionStepState(): operation returned status code: 0x5800001d
2020-01-15 00:51:17 DEBUG turnConnectionStepState(): TurnConnection state changed from TURN_STATE_NEW to TURN_STATE_FAILED
2020-01-15 00:51:17 ERROR turnConnectionStart(): operation returned status code: 0x5800001d
2020-01-15 00:51:17 ERROR executeGatheringIceAgentState(): operation returned status code: 0x5800001d
My device has internet access, definitely reacts to the presence of an available client (such as the browser-viewer on the AWS console), but is never able to send data. The client also never detects a connection.
At first I wondered if it was a firewall issue, but the kvs examples do work on my desktop machine, which is behind the same firewall.
I have also tested that gstreamer is working correctly on my arm64 device, as I can create a regular RTP video stream from it to my desktop (on the same LAN).
Any tips? I am not quite sure how to interpret the console log.
Thanks!
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (9 by maintainers)
@mdonahoe that looks better to me! If both your candidates are in the same LAN I am not sure why ICE is failing.
If you disable trickle (by passing
FALSEtocreateSampleConfiguration) you can do aprintfonmessage.payloadhere could be useful to confirm gathering worked properly!You can also
printfpSignalingMessage->payloadhere and look at incoming candidates.IMO all that state machine logging is pretty useless. We should move that up another level, and give you log message when ICE messages are sent. I will try to get that in tonight.
Sorry for the rough edges, really appreciate the debugging and will get that fixed up!
@mdonahoe oof that is annoying.
Let me give you some good places to debug, and I think we need more verbose logs around ICE sending packets that would be a lot of help also.
createSocket(): connect() failed with errno Connection timed outlooks promising also. I will get you the exact line that happens on.I am getting on the bus now, but will get more stuff to go off in ~2 hours!
I am also making the cross-compile a lot easier. I hope to land this tonight. You can just set your
CC/CXX/ARand the destination host and it will build everything as you expect.So in the future you should need zero code changes, and will have it running in travis so we are sure it doesn’t regress.