paullouisageneau / libdatachannel

C/C++ WebRTC network library featuring Data Channels, Media Transport, and WebSockets
https://libdatachannel.org/
Mozilla Public License 2.0
1.75k stars 357 forks source link

Client xxx not found #1220

Closed magic-tab-01 closed 3 months ago

magic-tab-01 commented 3 months ago

using “python3 signaling-server.py” and “./client stun:stun.l.google.com:19302”, i can see "Client n790 not found" logs in server, could you kindly help?

magic@ubuntu:~/work/opensource/libdatachannel/examples/signaling-server-python$ python3 signaling-server.py 
Listening on 127.0.0.1:8000
server listening on 127.0.0.1:8000
connection open
Client TvOA connected
Client TvOA << {"description":"v=0\r\no=rtc 1813516422 0 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0\r\na=msid-semantic:WMS *\r\na=ice-options:ice2,trickle\r\na=fingerprint:sha-256 03:CB:A3:8E:E7:04:0E:B9:FE:31:98:F8:35:20:95:12:25:10:B2:25:9C:A6:7E:44:08:76:F9:C2:F6:00:1A:3D\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\na=mid:0\r\na=sendrecv\r\na=sctp-port:5000\r\na=max-message-size:262144\r\na=setup:actpass\r\na=ice-ufrag:D0ND\r\na=ice-pwd:8TpjMlrnlCT9GKHOmjLRJm\r\n","id":"n790","type":"offer"}
Client n790 not found
Client TvOA << {"candidate":"a=candidate:1 1 UDP 2122317823 192.168.154.129 35501 typ host","id":"n790","mid":"0","type":"candidate"}
Client n790 not found
Client TvOA << {"candidate":"a=candidate:2 1 UDP 1686109951 60.21.110.107 60097 typ srflx raddr 0.0.0.0 rport 0","id":"n790","mid":"0","type":"candidate"}
Client n790 not found
no close frame received or sent
Client TvOA disconnected
connection closed
^CTraceback (most recent call last):
./client stun:stun.l.google.com:19302
STUN server is stun:stun.l.google.com:19302
The local ID is C963
WebSocket URL is ws://localhost:8000/C963
Waiting for signaling to be connected...
2024-07-02 15:44:34.362 INFO  [22922] [rtc::impl::TcpTransport::attempt@256] TCP connected
2024-07-02 15:44:34.366 INFO  [22922] [rtc::impl::WsTransport::incoming@129] WebSocket client-side open
WebSocket connected, signaling ready
Enter a remote ID to send an offer:
n790
Offering to n790
Creating DataChannel with label "test"
2024-07-02 15:44:41.275 INFO  [22917] [rtc::impl::IceTransport::IceTransport@113] Using STUN server "stun.l.google.com:19302"
2024-07-02 15:44:41.276 INFO  [22917] [rtc::impl::PeerConnection::changeSignalingState@1293] Changed signaling state to have-local-offer
2024-07-02 15:44:41.276 INFO  [22917] [rtc::impl::PeerConnection::changeGatheringState@1280] Changed gathering state to in-progress
2024-07-02 15:44:41.276 INFO  [22917] [rtc::impl::IceTransport::LogCallback@385] juice: Changing state to gathering
Gathering State: in-progress
2024-07-02 15:44:41.277 INFO  [22917] [rtc::impl::IceTransport::LogCallback@385] juice: Changing state to connecting
2024-07-02 15:44:41.277 INFO  [22917] [rtc::impl::PeerConnection::changeIceState@1262] Changed ICE state to checking
2024-07-02 15:44:41.277 INFO  [22917] [rtc::impl::PeerConnection::changeState@1244] Changed state to connecting
Enter a remote ID to send an offer:
State: connecting
2024-07-02 15:44:41.333 INFO  [22926] [rtc::impl::IceTransport::LogCallback@385] juice: Using STUN server stun.l.google.com:19302
2024-07-02 15:44:41.390 WARN  [22925] [rtc::impl::IceTransport::LogCallback@385] juice: Send failed, errno=101
2024-07-02 15:44:41.390 WARN  [22925] [rtc::impl::IceTransport::LogCallback@385] juice: STUN message send failed
2024-07-02 15:44:41.390 INFO  [22925] [rtc::impl::IceTransport::LogCallback@385] juice: STUN server binding failed
2024-07-02 15:44:41.406 INFO  [22925] [rtc::impl::IceTransport::LogCallback@385] juice: STUN server binding successful
2024-07-02 15:44:41.406 INFO  [22925] [rtc::impl::IceTransport::LogCallback@385] juice: Got STUN mapped address 60.21.110.107:49316 from server
2024-07-02 15:44:41.406 INFO  [22925] [rtc::impl::IceTransport::LogCallback@385] juice: Candidate gathering done
2024-07-02 15:44:41.406 INFO  [22925] [rtc::impl::PeerConnection::changeGatheringState@1280] Changed gathering state to complete
Gathering State: complete
123
Offering to 123
Creating DataChannel with label "test"
2024-07-02 15:44:49.522 INFO  [22917] [rtc::impl::IceTransport::IceTransport@113] Using STUN server "stun.l.google.com:19302"
2024-07-02 15:44:49.524 INFO  [22917] [rtc::impl::PeerConnection::changeSignalingState@1293] Changed signaling state to have-local-offer
2024-07-02 15:44:49.525 INFO  [22917] [rtc::impl::PeerConnection::changeGatheringState@1280] Changed gathering state to in-progress
2024-07-02 15:44:49.525 INFO  [22917] [rtc::impl::IceTransport::LogCallback@385] juice: Changing state to gathering
Gathering State: in-progress
2024-07-02 15:44:49.525 INFO  [22917] [rtc::impl::IceTransport::LogCallback@385] juice: Changing state to connecting
2024-07-02 15:44:49.525 INFO  [22917] [rtc::impl::PeerConnection::changeIceState@1262] Changed ICE state to checking
2024-07-02 15:44:49.525 INFO  [22917] [rtc::impl::PeerConnection::changeState@1244] Changed state to connecting
Enter a remote ID to send an offer:
State: connecting
2024-07-02 15:44:49.587 INFO  [22927] [rtc::impl::IceTransport::LogCallback@385] juice: Using STUN server stun.l.google.com:19302
2024-07-02 15:44:49.650 WARN  [22925] [rtc::impl::IceTransport::LogCallback@385] juice: Send failed, errno=101
2024-07-02 15:44:49.650 WARN  [22925] [rtc::impl::IceTransport::LogCallback@385] juice: STUN message send failed
2024-07-02 15:44:49.650 INFO  [22925] [rtc::impl::IceTransport::LogCallback@385] juice: STUN server binding failed
2024-07-02 15:44:49.657 INFO  [22925] [rtc::impl::IceTransport::LogCallback@385] juice: STUN server binding successful
2024-07-02 15:44:49.657 INFO  [22925] [rtc::impl::IceTransport::LogCallback@385] juice: Got STUN mapped address 60.21.110.107:49319 from server
2024-07-02 15:44:49.657 INFO  [22925] [rtc::impl::IceTransport::LogCallback@385] juice: Candidate gathering done
2024-07-02 15:44:49.657 INFO  [22925] [rtc::impl::PeerConnection::changeGatheringState@1280] Changed gathering state to complete
Gathering State: complete
paullouisageneau commented 3 months ago

If you enter a peer ID that doesn't exist or isn't connected to signaling anymore, it won't be found.

Additionally, the parameter to ./client stun:stun.l.google.com:19302 is useless, use ./client -h to see usage.

magic-tab-01 commented 3 months ago

really appreciate for your help. thank you