DEBUG:dtls:server x DTLS handshake failed (error 1) when i run example apprtc.py in controlling mode
See original GitHub issueaiortc always had a DTLS handshake failed in Ice controlling mode when I try to connect it to firefox browser using apprtc server. However aiortc works well in Ice controled mode when connected by firefox in same enviroment. i am not sure whether it is related to the Cetificate. I pasted the log here.
test@ubuntu:~/zhiweny/testrtc/examples/apprtc$ python apprtc.py 22717 -v
photo path=photo.jpg
DEBUG:asyncio:Using selector: EpollSelector
DEBUG:websockets.protocol:client - state = CONNECTING
DEBUG:websockets.protocol:client - event = connection_made(<asyncio.sslproto._SSLProtocolTransport object at 0x7f7972022780>)
DEBUG:websockets.protocol:client - state = OPEN
DEBUG:websockets.protocol:client > Frame(fin=True, opcode=1, data=b'{"clientid": "32974523", "cmd": "register", "roomid": "22717"}', rsv1=False, rsv2=False, rsv3=False)
{'pc_config': '{"rtcpMuxPolicy": "require", "bundlePolicy": "max-bundle", "iceServers": [{"url": "stun:www.guoxin.cn"}, {"url": "turn:www.guoxin.cn", "credential": "testrtc", "username": "testrtc"}]}', 'messages': [], 'bypass_join_confirmation': 'false', 'pc_constraints': '{"optional": []}', 'room_link': 'http://www.guoxin.cn:8080/r/22717', 'is_initiator': 'true', 'ice_server_url': 'https://www.guoxin.cn/v1alpha/iceconfig?key=none', 'room_id': '22717', 'include_loopback_js': '', 'offer_options': '{}', 'error_messages': [], 'client_id': '32974523', 'warning_messages': [], 'media_constraints': '{"audio": true, "video": true}', 'wss_url': 'wss://www.guoxin.cn:8089/ws', 'version_info': '{"branch": "master", "gitHash": "20cdd7652d58c9cf47ef92ba0190a5505760dc05", "time": "Fri Mar 9 17:06:42 2018 +0100"}', 'include_rtstats_js': '', 'is_loopback': 'false', 'wss_post_url': 'https://www.guoxin.cn:8089', 'ice_server_transports': ''}
yangzw point a browser at http://www.guoxin.cn:8080/r/22717
yangzw enter add_transport_description and print local ice
DEBUG:ice:Connection(0) protocol(0) connection_made(<_SelectorDatagramTransport fd=10 read=idle write=<idle, bufsize=0>>)
DEBUG:ice:Connection(0) protocol(1) connection_made(<_SelectorDatagramTransport fd=11 read=idle write=<idle, bufsize=0>>)
DEBUG:ice:Connection(0) protocol(0) > ('stun.l.google.com', 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\xefS\x18\xcfn\x07\xb7Q\xe6\x8d\xc2\xe1')
DEBUG:ice:Connection(0) protocol(1) > ('stun.l.google.com', 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'.\xfeF\x98\x044\xd3q\xf9\xee\xf5\xc5')
DEBUG:ice:Connection(0) protocol(0) > ('stun.l.google.com', 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\xefS\x18\xcfn\x07\xb7Q\xe6\x8d\xc2\xe1')
DEBUG:ice:Connection(0) protocol(1) > ('stun.l.google.com', 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'.\xfeF\x98\x044\xd3q\xf9\xee\xf5\xc5')
DEBUG:ice:Connection(0) protocol(0) > ('stun.l.google.com', 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\xefS\x18\xcfn\x07\xb7Q\xe6\x8d\xc2\xe1')
DEBUG:ice:Connection(0) protocol(0) > ('stun.l.google.com', 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\xefS\x18\xcfn\x07\xb7Q\xe6\x8d\xc2\xe1')
DEBUG:ice:Connection(0) protocol(1) > ('stun.l.google.com', 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'.\xfeF\x98\x044\xd3q\xf9\xee\xf5\xc5')
yangzw enter add_transport_description and print local ice
RTCIceCandidate(component=1, foundation='e94dd7d60e10b5fce88f752b3b4e883f', ip='192.168.11.43', port=59066, priority=2130706431, protocol='udp', type='host', relatedAddress=None, relatedPort=None, sdpMid=None, sdpMLineIndex=None, tcpType=None)
RTCIceCandidate(component=1, foundation='ab87b4d878b6c5519d4b8e126f10365e', ip='192.168.1.126', port=43035, priority=2130706431, protocol='udp', type='host', relatedAddress=None, relatedPort=None, sdpMid=None, sdpMLineIndex=None, tcpType=None)
> {"sdp": "v=0\r\no=- 3754781930 3754781930 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0\r\nm=video 59066 UDP/TLS/RTP/SAVPF 96 97 98\r\nc=IN IP4 192.168.11.43\r\na=sendrecv\r\na=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=mid:0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=rtcp-mux\r\na=ssrc:4263695186 cname:{f7f11f8e-6233-43cc-9216-d26a433c4cc0}\r\na=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtcp-fb:96 goog-remb\r\na=rtpmap:97 H264/90000\r\na=rtcp-fb:97 nack\r\na=rtcp-fb:97 nack pli\r\na=rtcp-fb:97 goog-remb\r\na=fmtp:97 packetization-mode=1;level-asymmetry-allowed=1;profile-level-id=42001f\r\na=rtpmap:98 H264/90000\r\na=rtcp-fb:98 nack\r\na=rtcp-fb:98 nack pli\r\na=fmtp:98 packetization-mode=1;level-asymmetry-allowed=1;profile-level-id=42e01f\r\na=candidate:e94dd7d60e10b5fce88f752b3b4e883f 1 udp 2130706431 192.168.11.43 59066 typ host\r\na=candidate:ab87b4d878b6c5519d4b8e126f10365e 1 udp 2130706431 192.168.1.126 43035 typ host\r\na=end-of-candidates\r\na=ice-ufrag:qXPQ\r\na=ice-pwd:XkRBcLe6lxeJrjKMOI2Xaf\r\na=fingerprint:sha-256 AC:79:6A:51:24:D1:87:DE:1B:1C:C7:31:33:1D:ED:08:89:CB:94:02:3B:62:54:1D:17:8E:DC:9B:FD:7F:07:42\r\na=setup:actpass\r\n", "type": "offer"}
DEBUG:websockets.protocol:client > Frame(fin=True, opcode=1, data=b'{"cmd": "send", "msg": "{\\"sdp\\": \\"v=0\\\\r\\\\no=- 3754781930 3754781930 IN IP4 0.0.0.0\\\\r\\\\ns=-\\\\r\\\\nt=0 0\\\\r\\\\na=group:BUNDLE 0\\\\r\\\\nm=video 59066 UDP/TLS/RTP/SAVPF 96 97 98\\\\r\\\\nc=IN IP4 192.168.11.43\\\\r\\\\na=sendrecv\\\\r\\\\na=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid\\\\r\\\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\\\r\\\\na=mid:0\\\\r\\\\na=rtcp:9 IN IP4 0.0.0.0\\\\r\\\\na=rtcp-mux\\\\r\\\\na=ssrc:4263695186 cname:{f7f11f8e-6233-43cc-9216-d26a433c4cc0}\\\\r\\\\na=rtpmap:96 VP8/90000\\\\r\\\\na=rtcp-fb:96 nack\\\\r\\\\na=rtcp-fb:96 nack pli\\\\r\\\\na=rtcp-fb:96 goog-remb\\\\r\\\\na=rtpmap:97 H264/90000\\\\r\\\\na=rtcp-fb:97 nack\\\\r\\\\na=rtcp-fb:97 nack pli\\\\r\\\\na=rtcp-fb:97 goog-remb\\\\r\\\\na=fmtp:97 packetization-mode=1;level-asymmetry-allowed=1;profile-level-id=42001f\\\\r\\\\na=rtpmap:98 H264/90000\\\\r\\\\na=rtcp-fb:98 nack\\\\r\\\\na=rtcp-fb:98 nack pli\\\\r\\\\na=fmtp:98 packetization-mode=1;level-asymmetry-allowed=1;profile-level-id=42e01f\\\\r\\\\na=candidate:e94dd7d60e10b5fce88f752b3b4e883f 1 udp 2130706431 192.168.11.43 59066 typ host\\\\r\\\\na=candidate:ab87b4d878b6c5519d4b8e126f10365e 1 udp 2130706431 192.168.1.126 43035 typ host\\\\r\\\\na=end-of-candidates\\\\r\\\\na=ice-ufrag:qXPQ\\\\r\\\\na=ice-pwd:XkRBcLe6lxeJrjKMOI2Xaf\\\\r\\\\na=fingerprint:sha-256 AC:79:6A:51:24:D1:87:DE:1B:1C:C7:31:33:1D:ED:08:89:CB:94:02:3B:62:54:1D:17:8E:DC:9B:FD:7F:07:42\\\\r\\\\na=setup:actpass\\\\r\\\\n\\", \\"type\\": \\"offer\\"}"}', rsv1=False, rsv2=False, rsv3=False)
Please point a browser at http://www.guoxin.cn:8080/r/22717
DEBUG:websockets.protocol:client > Frame(fin=True, opcode=9, data=b'L\xff\xbc\xf0', rsv1=False, rsv2=False, rsv3=False)
DEBUG:websockets.protocol:client < Frame(fin=True, opcode=10, data=b'L\xff\xbc\xf0', rsv1=False, rsv2=False, rsv3=False)
DEBUG:websockets.protocol:client - received solicited pong: 4cffbcf0
DEBUG:websockets.protocol:client > Frame(fin=True, opcode=9, data=b'\x99\x03\x7f\xbf', rsv1=False, rsv2=False, rsv3=False)
DEBUG:websockets.protocol:client < Frame(fin=True, opcode=10, data=b'\x99\x03\x7f\xbf', rsv1=False, rsv2=False, rsv3=False)
DEBUG:websockets.protocol:client - received solicited pong: 99037fbf
DEBUG:websockets.protocol:client > Frame(fin=True, opcode=9, data=b'\x131^\xc5', rsv1=False, rsv2=False, rsv3=False)
DEBUG:websockets.protocol:client < Frame(fin=True, opcode=10, data=b'\x131^\xc5', rsv1=False, rsv2=False, rsv3=False)
DEBUG:websockets.protocol:client - received solicited pong: 13315ec5
DEBUG:ice:Connection(0) protocol(0) < ('192.168.11.22', 56444) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'?;>:\xda\x87t^\x8c*\xcf\x0e')
DEBUG:ice:Connection(0) protocol(0) > ('192.168.11.22', 56444) Message(message_method=Method.BINDING, message_class=Class.RESPONSE, transaction_id=b'?;>:\xda\x87t^\x8c*\xcf\x0e')
DEBUG:websockets.protocol:client < Frame(fin=True, opcode=1, data=b'{"msg":"{\\"sdp\\":\\"v=0\\\\r\\\\no=mozilla...THIS_IS_SDPARTA-64.0 6615859641142545007 0 IN IP4 0.0.0.0\\\\r\\\\ns=-\\\\r\\\\nt=0 0\\\\r\\\\na=fingerprint:sha-256 3C:29:E4:9B:08:3F:8A:96:C5:B4:25:4F:71:38:C0:8D:02:44:4F:0C:A2:27:C9:E8:33:27:C5:84:4B:86:C3:58\\\\r\\\\na=group:BUNDLE 0\\\\r\\\\na=ice-options:trickle\\\\r\\\\na=msid-semantic:WMS *\\\\r\\\\nm=video 9 UDP/TLS/RTP/SAVPF 96\\\\r\\\\nc=IN IP4 0.0.0.0\\\\r\\\\na=sendrecv\\\\r\\\\na=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid\\\\r\\\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\\\r\\\\na=fmtp:96 max-fs=12288;max-fr=60\\\\r\\\\na=ice-pwd:72083f38a3ef505a27b780b227d1b865\\\\r\\\\na=ice-ufrag:1c8b15f2\\\\r\\\\na=mid:0\\\\r\\\\na=msid:{e225c06f-fbd4-4d9d-94ee-3e7cf5f901fe} {80397807-f53b-40bf-be04-d928d91ad979}\\\\r\\\\na=rtcp-fb:96 nack\\\\r\\\\na=rtcp-fb:96 nack pli\\\\r\\\\na=rtcp-fb:96 goog-remb\\\\r\\\\na=rtcp-mux\\\\r\\\\na=rtpmap:96 VP8/90000\\\\r\\\\na=setup:active\\\\r\\\\na=ssrc:3207157885 cname:{5d6fd8ac-3fc1-438f-a39f-432c98f22078}\\\\r\\\\n\\",\\"type\\":\\"answer\\"}","error":""}\n', rsv1=False, rsv2=False, rsv3=False)
< {"sdp":"v=0\r\no=mozilla...THIS_IS_SDPARTA-64.0 6615859641142545007 0 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=fingerprint:sha-256 3C:29:E4:9B:08:3F:8A:96:C5:B4:25:4F:71:38:C0:8D:02:44:4F:0C:A2:27:C9:E8:33:27:C5:84:4B:86:C3:58\r\na=group:BUNDLE 0\r\na=ice-options:trickle\r\na=msid-semantic:WMS *\r\nm=video 9 UDP/TLS/RTP/SAVPF 96\r\nc=IN IP4 0.0.0.0\r\na=sendrecv\r\na=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=fmtp:96 max-fs=12288;max-fr=60\r\na=ice-pwd:72083f38a3ef505a27b780b227d1b865\r\na=ice-ufrag:1c8b15f2\r\na=mid:0\r\na=msid:{e225c06f-fbd4-4d9d-94ee-3e7cf5f901fe} {80397807-f53b-40bf-be04-d928d91ad979}\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-mux\r\na=rtpmap:96 VP8/90000\r\na=setup:active\r\na=ssrc:3207157885 cname:{5d6fd8ac-3fc1-438f-a39f-432c98f22078}\r\n","type":"answer"}
Track video received
DEBUG:ice:controlling - new -> checking
INFO:ice:Connection(0) Discovered peer reflexive candidate Candidate(CPTZn1clho 1 udp 1853817087 192.168.11.22 56444 typ prflx)
DEBUG:ice:Connection(0) protocol(1) < ('192.168.1.136', 56444) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b"\xf6H\x0e\xf9\xf9w~\xd1\x15'\xf9\xe2")
DEBUG:ice:Connection(0) protocol(1) > ('192.168.1.136', 56444) Message(message_method=Method.BINDING, message_class=Class.RESPONSE, transaction_id=b"\xf6H\x0e\xf9\xf9w~\xd1\x15'\xf9\xe2")
INFO:ice:Connection(0) Discovered peer reflexive candidate Candidate(ZJiBkmSVIG 1 udp 1853817087 192.168.1.136 56444 typ prflx)
INFO:ice:Connection(0) Check CandidatePair(('192.168.11.43', 59066) -> ('192.168.11.22', 56444)) State.WAITING -> State.IN_PROGRESS
DEBUG:ice:Connection(0) protocol(0) > ('192.168.11.22', 56444) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\xb3.\x97\xa1\xa7\xff\xc1\xa3\xbc\xa24c')
INFO:ice:Connection(0) Check CandidatePair(('192.168.11.43', 59066) -> ('192.168.11.22', 56444)) State.IN_PROGRESS -> State.IN_PROGRESS
DEBUG:ice:Connection(0) protocol(0) > ('192.168.11.22', 56444) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\x1e\x95Z9a\xbff\x02b5\x80\x04')
DEBUG:websockets.protocol:client < Frame(fin=True, opcode=1, data=b'{"msg":"{\\"type\\":\\"candidate\\",\\"label\\":0,\\"id\\":\\"0\\",\\"candidate\\":\\"candidate:0 1 UDP 2122252543 192.168.1.136 56444 typ host\\"}","error":""}\n', rsv1=False, rsv2=False, rsv3=False)
INFO:ice:Connection(0) Check CandidatePair(('192.168.1.126', 43035) -> ('192.168.1.136', 56444)) State.WAITING -> State.IN_PROGRESS
DEBUG:ice:Connection(0) protocol(1) > ('192.168.1.136', 56444) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\xae\xd7\xff\x95\xb8q\xc2\xe4\xdd#\xd7\xcb')
DEBUG:ice:Connection(0) protocol(1) < ('192.168.1.136', 56444) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b"\xf6H\x0e\xf9\xf9w~\xd1\x15'\xf9\xe2")
DEBUG:ice:Connection(0) protocol(1) > ('192.168.1.136', 56444) Message(message_method=Method.BINDING, message_class=Class.RESPONSE, transaction_id=b"\xf6H\x0e\xf9\xf9w~\xd1\x15'\xf9\xe2")
< {"type":"candidate","label":0,"id":"0","candidate":"candidate:0 1 UDP 2122252543 192.168.1.136 56444 typ host"}
INFO:ice:Connection(0) Check CandidatePair(('192.168.11.43', 59066) -> ('192.168.1.136', 56444)) State.FROZEN -> State.IN_PROGRESS
DEBUG:ice:Connection(0) protocol(0) > ('192.168.1.136', 56444) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\x12\xef\xcd\xa97;\x1e\xe1\xb9*\xc8G')
INFO:ice:Connection(0) Check CandidatePair(('192.168.1.126', 43035) -> ('192.168.1.136', 56444)) State.FROZEN -> State.IN_PROGRESS
DEBUG:ice:Connection(0) protocol(1) > ('192.168.1.136', 56444) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\x99C\x04\x8c\xaeq\x1f\xd3\x0e\xe3\x9f\xc2')
DEBUG:ice:Connection(0) protocol(0) < ('192.168.11.22', 56444) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\xf7\x9d(\x88}\xfc\xd1\x7f\xb7^{\xab')
DEBUG:ice:Connection(0) protocol(0) > ('192.168.11.22', 56444) Message(message_method=Method.BINDING, message_class=Class.RESPONSE, transaction_id=b'\xf7\x9d(\x88}\xfc\xd1\x7f\xb7^{\xab')
DEBUG:ice:Connection(0) protocol(0) < ('192.168.11.22', 56444) Message(message_method=Method.BINDING, message_class=Class.RESPONSE, transaction_id=b'\xb3.\x97\xa1\xa7\xff\xc1\xa3\xbc\xa24c')
INFO:ice:Connection(0) Check CandidatePair(('192.168.11.43', 59066) -> ('192.168.11.22', 56444)) State.IN_PROGRESS -> State.SUCCEEDED
INFO:ice:Connection(0) ICE completed
DEBUG:ice:Connection(0) protocol(0) < ('192.168.11.22', 56444) Message(message_method=Method.BINDING, message_class=Class.RESPONSE, transaction_id=b'\x1e\x95Z9a\xbff\x02b5\x80\x04')
INFO:ice:Connection(0) Check CandidatePair(('192.168.11.43', 59066) -> ('192.168.11.22', 56444)) State.SUCCEEDED -> State.SUCCEEDED
DEBUG:ice:Connection(0) protocol(0) < ('192.168.11.22', 56444) DATA 189
DEBUG:ice:Connection(0) protocol(0) < ('192.168.11.22', 56444) Message(message_method=Method.BINDING, message_class=Class.RESPONSE, transaction_id=b'\x12\xef\xcd\xa97;\x1e\xe1\xb9*\xc8G')
DEBUG:ice:Connection(0) protocol(1) < ('192.168.1.136', 56444) Message(message_method=Method.BINDING, message_class=Class.RESPONSE, transaction_id=b'\xae\xd7\xff\x95\xb8q\xc2\xe4\xdd#\xd7\xcb')
INFO:ice:Connection(0) Check CandidatePair(('192.168.11.43', 59066) -> ('192.168.1.136', 56444)) failed : source address mismatch
INFO:ice:Connection(0) Check CandidatePair(('192.168.11.43', 59066) -> ('192.168.1.136', 56444)) State.IN_PROGRESS -> State.FAILED
INFO:ice:Connection(0) Check CandidatePair(('192.168.1.126', 43035) -> ('192.168.1.136', 56444)) State.IN_PROGRESS -> State.SUCCEEDED
DEBUG:ice:Connection(0) protocol(1) < ('192.168.1.136', 56444) Message(message_method=Method.BINDING, message_class=Class.RESPONSE, transaction_id=b'\x99C\x04\x8c\xaeq\x1f\xd3\x0e\xe3\x9f\xc2')
INFO:ice:Connection(0) Check CandidatePair(('192.168.1.126', 43035) -> ('192.168.1.136', 56444)) State.IN_PROGRESS -> State.SUCCEEDED
DEBUG:ice:controlling - checking -> completed
DEBUG:dtls:server - State.NEW -> State.CONNECTING
DEBUG:ice:Connection(0) protocol(1) > ('192.168.1.136', 56444) DATA 15
DEBUG:dtls:server x DTLS handshake failed (error 1)
DEBUG:dtls:server - State.CONNECTING -> State.FAILED
DEBUG:ice:Connection(0) protocol(1) < ('192.168.1.136', 56444) DATA 189
DEBUG:websockets.protocol:client > Frame(fin=True, opcode=9, data=b'\x14\xe5\xbf\xdd', rsv1=False, rsv2=False, rsv3=False)
DEBUG:websockets.protocol:client - event = connection_lost(None)
DEBUG:websockets.protocol:client - state = CLOSED
DEBUG:websockets.protocol:client x code = 1006, reason = [no reason]
DEBUG:websockets.protocol:client - aborted pending ping: 14e5bfdd
DEBUG:websockets.protocol:client ! failing WebSocket connection in the CLOSED state: 1006 [no reason]
DEBUG:websockets.protocol:client x closing TCP connection
> {"type": "bye"}
Traceback (most recent call last):
File "/home/test/anaconda3/lib/python3.6/site-packages/websockets/protocol.py", line 674, in transfer_data
message = yield from self.read_message()
File "/home/test/anaconda3/lib/python3.6/site-packages/websockets/protocol.py", line 742, in read_message
frame = yield from self.read_data_frame(max_size=self.max_size)
File "/home/test/anaconda3/lib/python3.6/site-packages/websockets/protocol.py", line 815, in read_data_frame
frame = yield from self.read_frame(max_size)
File "/home/test/anaconda3/lib/python3.6/site-packages/websockets/protocol.py", line 884, in read_frame
extensions=self.extensions,
File "/home/test/anaconda3/lib/python3.6/site-packages/websockets/framing.py", line 99, in read
data = yield from reader(2)
File "/home/test/anaconda3/lib/python3.6/asyncio/streams.py", line 672, in readexactly
raise IncompleteReadError(incomplete, n)
asyncio.streams.IncompleteReadError: 0 bytes read on a total of 2 expected bytes
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "apprtc.py", line 186, in <module>
loop.run_until_complete(signaling.close())
File "/home/test/anaconda3/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "apprtc.py", line 47, in close
await self.send(None)
File "apprtc.py", line 64, in send
'msg': message,
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Failed DTLS handshake and rejoining - Cisco Community
I cannot figure out why. Up time is consistent and client connectivity is fine, but I lose them briefly from the controller and...
Read more >2013119 – DTLS handshake fails with fips=1 - Red Hat Bugzilla
1 -fips.patch near line 11475 Description of problem: Trying to use WebRTC in an application that I work on doesn't seem to work...
Read more >Not a Guide to SDP Munging - webrtcHacks
DTLS parameters – used to perform a DTLS handshake and exchange the SRTP keys to be used for audio and video, and/or establishing...
Read more >Issue 6763: DTLS Channel errors with SSL handshake failure ...
When I run the node test program with the cross-compiled webrtc on raspberry ... I see ssl handshake failure and DTLS timeout, and...
Read more >Slow DTLS handshake in case of packet loss - Stack Overflow
In OpenSSL the default DTLS rentransmit timer starts at 1 second and periodically doubles that if it has not received a response.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
OK, I have managed to reproduce the issue by firing up an Ubuntu 16.04 VM. The issue seems to be the inability for older OpenSSL versions to negotiate ECDHE ciphers. This is handled here in webrtc.org:
https://webrtc.googlesource.com/src/+/bbfed52cf2912d5088abeb017049241e4d37d21f/webrtc/base/opensslstreamadapter.cc#836
Hi jLaine: I upgrade my openssl from 1.0.2 to 1.1.a and this issue is fixed. “DEBUG:ice:controlling - checking -> completed DEBUG:dtls:server - State.NEW -> State.CONNECTING DEBUG:ice:Connection(0) protocol(1) > (‘192.168.1.136’, 47374) DATA 744 DEBUG:ice:Connection(0) protocol(1) < (‘192.168.1.136’, 47374) DATA 595 DEBUG:ice:Connection(0) protocol(1) > (‘192.168.1.136’, 47374) DATA 75 DEBUG:dtls:server - DTLS handshake complete DEBUG:dtls:server - State.CONNECTING -> State.CONNECTED DEBUG:rtp:sender(video) - RTP started DEBUG:rtp:sender(video) - RTCP started” My ubuntu is ubuntu 18.04, but my openssl in python is still 1.0.2. I use conda to upgrade the openssl and this issue is solved. You can take a look at the log . Thanks for your help.
I pasted the log here.
(base) test@ubuntu:~/zhiweny/testrtc/examples/apprtc$ python apprtc.py 111155 -v photo path=photo.jpg DEBUG:asyncio:Using selector: EpollSelector DEBUG:websockets.protocol:client - state = CONNECTING DEBUG:websockets.protocol:client - event = connection_made(<asyncio.sslproto._SSLProtocolTransport object at 0x7fbe2cc22780>) DEBUG:websockets.protocol:client - state = OPEN DEBUG:websockets.protocol:client > Frame(fin=True, opcode=1, data=b’{“clientid”: “61054456”, “cmd”: “register”, “roomid”: “111155”}‘, rsv1=False, rsv2=False, rsv3=False) {‘pc_config’: ‘{“rtcpMuxPolicy”: “require”, “bundlePolicy”: “max-bundle”, “iceServers”: [{“url”: “stun:www.guoxin.cn”}, {“url”: “turn:www.guoxin.cn”, “credential”: “testrtc”, “username”: “testrtc”}]}’, ‘messages’: [], ‘bypass_join_confirmation’: ‘false’, ‘pc_constraints’: ‘{“optional”: []}’, ‘room_link’: ‘http://www.guoxin.cn:8080/r/111155’, ‘is_initiator’: ‘true’, ‘ice_server_url’: ‘https://www.guoxin.cn/v1alpha/iceconfig?key=none’, ‘room_id’: ‘111155’, ‘include_loopback_js’: ‘’, ‘offer_options’: ‘{}’, ‘error_messages’: [], ‘client_id’: ‘61054456’, ‘warning_messages’: [], ‘media_constraints’: ‘{“audio”: true, “video”: true}’, ‘wss_url’: ‘wss://www.guoxin.cn:8089/ws’, ‘version_info’: ‘{“branch”: “master”, “gitHash”: “20cdd7652d58c9cf47ef92ba0190a5505760dc05”, “time”: “Fri Mar 9 17:06:42 2018 +0100”}’, ‘include_rtstats_js’: ‘’, ‘is_loopback’: ‘false’, ‘wss_post_url’: ‘https://www.guoxin.cn:8089’, ‘ice_server_transports’: ‘’} yangzw point a browser at http://www.guoxin.cn:8080/r/111155 yangzw enter add_transport_description and print local ice DEBUG:ice:Connection(0) protocol(0) connection_made(<_SelectorDatagramTransport fd=10 read=idle write=<idle, bufsize=0>>) DEBUG:ice:Connection(0) protocol(1) connection_made(<_SelectorDatagramTransport fd=11 read=idle write=<idle, bufsize=0>>) DEBUG:ice:Connection(0) protocol(1) > (‘stun.l.google.com’, 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b’\x0b\xf9
\xab\xcc\x06=\xff\x86\xc1\x07/') DEBUG:ice:Connection(0) protocol(0) > ('stun.l.google.com', 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b't\xf3S6V\x98\xd1M7I\xed/') DEBUG:ice:Connection(0) protocol(1) > ('stun.l.google.com', 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\x0b\xf9
\xab\xcc\x06=\xff\x86\xc1\x07/‘) DEBUG:ice:Connection(0) protocol(0) > (‘stun.l.google.com’, 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b’t\xf3S6V\x98\xd1M7I\xed/’) DEBUG:ice:Connection(0) protocol(1) > (‘stun.l.google.com’, 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b’\x0b\xf9\xab\xcc\x06=\xff\x86\xc1\x07/') DEBUG:ice:Connection(0) protocol(0) > ('stun.l.google.com', 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b't\xf3S6V\x98\xd1M7I\xed/') DEBUG:ice:Connection(0) protocol(1) > ('stun.l.google.com', 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\x0b\xf9
\xab\xcc\x06=\xff\x86\xc1\x07/‘) DEBUG:ice:Connection(0) protocol(0) > (‘stun.l.google.com’, 19302) Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b’t\xf3S6V\x98\xd1M7I\xed/’) yangzw enter add_transport_description and print local ice RTCIceCandidate(component=1, foundation=‘e94dd7d60e10b5fce88f752b3b4e883f’, ip=‘192.168.11.43’, port=45106, priority=2130706431, protocol=‘udp’, type=‘host’, relatedAddress=None, relatedPort=None, sdpMid=None, sdpMLineIndex=None, tcpType=None) RTCIceCandidate(component=1, foundation=‘ab87b4d878b6c5519d4b8e126f10365e’, ip=‘192.168.1.126’, port=59273, priority=2130706431, protocol=‘udp’, type=‘host’, relatedAddress=None, relatedPort=None, sdpMid=None, sdpMLineIndex=None, tcpType=None)