dev-tunnels icon indicating copy to clipboard operation
dev-tunnels copied to clipboard

Websocket over devtunnel not completing connecion (Issues appears to be with cluster ID = use)

Open Wibbbs opened this issue 3 months ago • 9 comments

I am trying to use a websocket over a devtunnel but the connection does not complete. On my local server I can see the incoming request and that my server has opened the websocket but on the client side it looks like the server never responds and the connection times out. This was working fine for me about a month ago. I deleted and recreated a new tunnel and now having these issues. The websocket works fine locally.

https connection works fine and quick this is only a websocket issue.

On my server I can see:

INFO: xxx.xxx.xxx.xxx:0 - "WebSocket /ws" [accepted] INFO: connection open

On the client after exactly 20 seconds I get a "could not connect to websocket" error.

Also when trying devtunnel ping it looks like it connects but takes 40 seconds...

devtunnel ping wss://xxxxxxxxx.use.devtunnels.ms:8000/ws WSS connected -- 40544 ms WSS ping -- 10 ms

I am using the following --version Tunnel CLI version: 1.0.1516+7e996fe917

Tunnel service URI : https://global.rel.tunnels.api.visualstudio.com/ Tunnel service version : 1.0.1514.51724 (0cca4511f6; 2025-09-22 20:39:05Z) Tunnel service cluster : use

Wibbbs avatar Oct 20 '25 20:10 Wibbbs

Just as a followup I checked my ping to the clusters and they seem fine

Cluster ID Azure Location URI Ping (ms) *use EastUs https://use.rel.tunnels.api.visualstudio.com 21 use2 EastUs2 https://use2.rel.tunnels.api.visualstudio.com 22 usw2 WestUs2 https://usw2.rel.tunnels.api.visualstudio.com 57 usw3 WestUs3 https://usw3.rel.tunnels.api.visualstudio.com 80 eun1 NorthEurope https://eun1.rel.tunnels.api.visualstudio.com 87 uks1 UkSouth https://uks1.rel.tunnels.api.visualstudio.com 91 euw WestEurope https://euw.rel.tunnels.api.visualstudio.com 95 brs BrazilSouth https://brs.rel.tunnels.api.visualstudio.com 130 aue AustraliaEast https://aue.rel.tunnels.api.visualstudio.com 202 auc1 AustraliaCentral https://auc1.rel.tunnels.api.visualstudio.com 206 asse SouthEastAsia https://asse.rel.tunnels.api.visualstudio.com 213 inc1 CentralIndia https://inc1.rel.tunnels.api.visualstudio.com 264

I also checked my limits and they are fine as well

Name Current Limit Resets After Description BandwidthPerUser 22.3 MB (0%) 5.0 GB 2025-11-20 10:36 AM User Bandwidth Consumption

Wibbbs avatar Oct 20 '25 20:10 Wibbbs

So this is something going on with use cluster, might want to have a look. I created a new tunnel on use2 and it works perfectly. Wish it didnt take me half a day to figure out the issue :)

Websocket on use2 connects in 400ms.

devtunnel ping wss://xxxxxxxxx.use2.devtunnels.ms:8000/ws WSS connected -- 440 ms WSS ping -- 688 ms WSS ping -- 0.4 ms WSS ping -- 0.3 ms WSS ping -- 0.6 ms WSS ping -- 0.3 ms WSS ping -- 0.2 ms

Wibbbs avatar Oct 20 '25 20:10 Wibbbs

@Wibbbs I am having issues with use cluster as well. I have been looking for the command to make a tunnel on a different cluster. Would appreciate your insight.

lmbrandon avatar Oct 27 '25 21:10 lmbrandon

For the life of me I cant find the command anywhere. Not sure why I didnt put the command here in the first place, I guess I assumed it was a common parameter.

It was a parameter on the create command, I am pretty sure I saw it in an issue here on this github. I will keep looking and let you know if I find it.

Wibbbs avatar Oct 28 '25 14:10 Wibbbs

Took me like half an hour but I found it. lol

https://github.com/microsoft/dev-tunnels/issues/444#issuecomment-2099389768

"The example below will point to North Europe: devtunnel create --service-uri https://eun1.rel.tunnels.api.visualstudio.com devtunnel post create TUNNELID --port-number PORT devtunnel host TUNNEL ID"

Not sure why this isnt documented.

Wibbbs avatar Oct 28 '25 14:10 Wibbbs

@Wibbbs wow! That's really nice of you to find that for me! Thank you very much!

lmbrandon avatar Oct 28 '25 14:10 lmbrandon

I knew I was going to need it myself again anyway so wanted to find it and mark it down. 😊

Wibbbs avatar Oct 28 '25 15:10 Wibbbs

I've had the same issue today with https://[tunnel-id].euw.devtunnels.ms/

Workaround as described by Wibbbs worked for mee, too. Switched to cluster NorthEurope.

I remember having this issue many months ago as well but didn't have a clue what was going on. Thank you so much @Wibbbs for your investigation.

MarcusKohnert avatar Nov 10 '25 12:11 MarcusKohnert

There was no problem until 3 days ago and suddenly I encountered the same issue in the euw cluster. The other clusters I tried are; uks1, eun1, use, use2, usw2 and usw3. None of them worked for me. I will continue using localhost for now. I hope they fix the issue soon.

kursatabayli avatar Nov 13 '25 23:11 kursatabayli