You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am wondering if anyone has figured this out. A TCP initial connection appears to happen, but the websocket connection fails. I have windows port forwarding from port 9000 to WSL2 port 8000. Any suggestions to fix this?
SSH did work using a similar process with the ssh server in WSL2 and the ssh client in Windows 11, but this is not. Here is the output from the client-benchmark running in a Windows 11 terminal:
C:\Users\xxxxx\Documents\libdatachannel\build\examples\client-benchmark.exe -d 300 -w 192.168.1.144 -x 9000
STUN server is stun:stun.l.google.com:19302
The local ID is X26F
WebSocket URL is ws://192.168.1.144:9000/X26F
Waiting for signaling to be connected...
2025-12-10 13:54:23.368 INFO [23696] [rtc::impl::TcpTransport::processConnect@463] TCP connected
2025-12-10 13:54:44.392 WARN [23696] [rtc::impl::TcpTransport::process@385] TCP connection terminated
2025-12-10 13:54:44.393 INFO [23696] [rtc::impl::TcpTransport::process@433] TCP disconnected
WebSocket closed
2025-12-10 13:54:44.393 ERROR [23696] [rtc::impl::WsTransport::incoming@194] WebSocket handshake failed
Details:
Command used to launch signaling server in WSL2:
xxxxx@DESKTOP-UJKIK1U:~/libdatachannel/examples/signaling-server-rust/target/release$ ./libdatachannel_signaling_server_example 192.168.1.144:8000
Listening on 192.168.1.144:8000
I'm operating WSL2 in mirrored networking mode which gives WSL2 the same IP address as the Windows 11.
I tested connecting client-benchmark in WSL2 to the signaling server in WSL2, and it works. Here is the output:
xxxx@DESKTOP-UJKIK1U:~/libdatachannel/build/examples/client-benchmark$ ./client-benchmark -d 300 -w 192.168.1.144 -x 8000
STUN server is stun:stun.l.google.com:19302
The local ID is R2eo
WebSocket URL is ws://192.168.1.144:8000/R2eo
Waiting for signaling to be connected...
2025-12-10 14:03:05.895 INFO [830] [rtc::impl::TcpTransport::processConnect@463] TCP connected
2025-12-10 14:03:05.900 INFO [830] [rtc::impl::WsTransport::incoming@128] WebSocket client-side open
WebSocket connected, signaling ready
Enter a remote ID to send an offer:
Used this command in Windows 11 powershell to forward from port 9000 in Windows 11 to port 8000 in WSL2: netsh interface portproxy set v4tov4 listenport=9000 listenaddress=0.0.0.0 connectport=8000 connectaddress=192.168.1.144 protocol=TCP
If this rule is not used, a TCP connection is never established. Output of Windows 11 client-benchmark with the above rule not in place:
C:\Users\xxxxx\Documents\libdatachannel\build\examples\client-benchmark>client-benchmark.exe -d 300 -w 192.168.1.144 -x 9000
STUN server is stun:stun.l.google.com:19302
The local ID is CtFz
WebSocket URL is ws://192.168.1.144:9000/CtFz
Waiting for signaling to be connected...
2025-12-10 14:15:18.949 WARN [25784] [rtc::impl::TcpTransport::attempt@215] Connection to 192.168.1.144:9000 failed
WebSocket error
WebSocket closed
Error: TCP connection failed
Tried the above command with port 8000 as well which gave the same output as above.
Tried with the Windows Defender firewall disabled which made no difference.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am wondering if anyone has figured this out. A TCP initial connection appears to happen, but the websocket connection fails. I have windows port forwarding from port 9000 to WSL2 port 8000. Any suggestions to fix this?
SSH did work using a similar process with the ssh server in WSL2 and the ssh client in Windows 11, but this is not. Here is the output from the client-benchmark running in a Windows 11 terminal:
Details:
netsh interface portproxy set v4tov4 listenport=9000 listenaddress=0.0.0.0 connectport=8000 connectaddress=192.168.1.144 protocol=TCPTried the above command with port 8000 as well which gave the same output as above.
Beta Was this translation helpful? Give feedback.
All reactions