-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure App Service Linux Container - Web Socket Handshake Error 503 #49245
Comments
@jlorek Thank you for your query and feedback, our team will further look into it and get back to you at the earliest. |
We are experiencing the same issue. |
Any updates on this one? Getting the same issue |
Apologies for the delay! I completely understand it is a frustrating experience with this issue. I'm checking on this with our product engineering team and I will post back with an update soon. Just as a side note, I have seen similar issues (WebSocket | error 503) fixed, by scaling-up to a higher App Service Plan. |
@jlorek If you can share your app name where you are seeing the 503, I can help get to the bottom of this. Technically, Web sockets is supported for App Service Linux and the WebSocket-Extensions issue also should no longer be happening. Is there anything more complex to try to repro this problem after deploying the default Blazor project app? I just tried to deploy a sample, and it loads for me fine. (https://blazerlinux.tuxedoase.p.azurewebsites.net/weatherforecast) But I admit I am not a app expert, so I might be missing something. |
Thanks @JennyLawrance for your help and comments. Default Blazor app works for us, if there are any additional/complex steps that you're configuring and want to share the repo and exact repro steps, please send an email to AzCommunity[at]Microsoft[dot]com referencing this thread, the WebApp name, and the Azure subscription ID, we will follow-up with you further. Thanks for your patience and co-operation! |
@JennyLawrance - The @AjayKumar-MSFT - Sure, just head to https://peakseason.azurewebsites.net |
I also created another sample without Containers, using App Service with Web App on Linux on a Net Core 3.1 Stack: I tried the F1 and B1 Service Plan. Both resulting in the same issue - Web Socket Handshake Error 503. |
@AjayKumar-MSFT - I sent you an e-mail with the app name and subscription id. |
@jlorek, thanks for sharing the requested details. We're investigating and will get back to you soon. |
@jlorek, can you clarify which URL is seeing the 503? I am able to access the app. |
I was running into this same issue on a multi-container app service. When I encountered this error I was using an app service plan with the F1 tier (free). After reading through some of the recommendations I tried to switching to a b1 tier. After redeploying the multi-container app on the b1 tier the web socket is successfully connecting without the handshake error. |
@JennyLawrance - Yes, you can access the app. But the underlying WebSocket connection cannot be established, because of a 503 error. To see this error, just open your browsers DevTools. Using Blazor there is a fallback mode implemented, when no WebSocket connection can be established. When not using Blazor and relying on WebSockets, your whole app may be broken due to this error. @classifieds-dev - Tried the B1 without any success. But using the P1V2 service plan, the WebSocket connection works just fine for my project. |
@jlorek , @classifieds-dev , Yes I have identified a code issue on our end which completely blocks web sockets on free SKU. I have opened a work item on our side to fix this. |
As this issue is identified and a fix would be deployed. Also, the documentation will be refreshed to reflect the changes. We will now proceed to close this thread. If there are further questions regarding this matter, please tag us in your reply. We will gladly continue the discussion. Thanks everyone for bringing this to our attention. We really appreciate your valuable feedback. |
|
Hello All of those solutions did not work for me. Let me explain what I have: I'm developing a solution with Twilio + Azure Cognitive Services (telephone based conversation, realtime, and using websockets) From Twilio, when a call comes in, I send an initial POST request (Webhook) to my WebApp for Containers like this: Inside <my_azure_web_app> server I have an end-point like this: class TwiML(tornado.web.RequestHandler): I can launch my app on localhost and into a container on localhost (i.e. I can open websockets from/to Twilio with no problem and get the websocket channel opened) When I deploy the image into WebApp for Containers, and this container is running, I can receive the first part of the audio message (i.e. greetings). But, after that, I can not open the wss websocket connection (wss://my_azure_web_app.azurewebsites.net.azurewebsites.net/socket) and I always receive an error from Twilio like this: (I used the "EXPOSE 8080" into my Dockerfile and "WEBSITES_PORT = 8080" into my Configuration Settings WebApp) The container is running: I can access to its url: I can connect to my websocket channel with Advanced Rest Client (Google) I think everything is fine BUT when I try to open the "wss://my_azure_web_app.azurewebsites.net/socket" from Twilio, it is not possible I tried everything with no success (both, tornado server and Azure ). So:
Finally, I do not have my app running deployed into Web App for Containers Anyone can tell new ways to try? Thanks a lot in advance! |
We started getting this issue last Friday randomly. All our App Service Plans are Linux. Our clients were unable to establish a websocket connection to one of our services on a B3 App Service Plan. This service has been deployed for several months, and we never had any websocket connectivity issues (or any connectivity issues for that matter) with it. I tried restarting the app service several times which did not work. Finally, after seeing this thread, I moved the app service from its original B3 App Service Plan to a different B1 App Service Plan we were using. This fixed the issue for us. We then tried moving the app service back to the original B3 App Service Plan but the problem occurred again. This is very confusing to us and we have sent a Support Ticket to Azure. I don't think we have made any changes to the B3 App Service Plan or the affected App Service for a while. |
Same error
App service plan: LinuxContainerAppServicePlan (P1v2: 1) |
Same issue on Linux B1 |
Same issue using Linux B1, but it works when switched to Windows. |
Switching Linux B1 → Linux B2 and then switching back helped |
Apologies everyone for the late response and frustration with this issue. We had been discussion on this internally. Thanks for your patience and co-operation! |
Switch from free F1 plan to B2 worked. However, when switching back to F1 the error comes back. I'm not sure if websockets are not supported for the F1 plan. My error: Error during WebSocket handshake: Unexpected response code: 503 |
@Sijoma, Thanks for the update. Yes, as mentioned in this document -“Web Sockets are not currently supported for Linux apps on Free App Service Plans. We are working on removing this limitation and plan to support up to 5 web socket connections on Free App Service plans.” - Our product team is working on it, but we do not have an ETA to share at this time. |
They also do not work for paid plans (B1). |
Users with a similar issue, fixed it by switching the plan -B1 -> B2 -> B1, kindly see if this works for you. Having mentioned that, I'm discussing on this internally and will post back with more update. |
Does this works on the Windows Free instance? Or are websockets out of scope for free instances? |
We allow 5 websocket connections in FREE SKU in Windows. |
I just want to add my experience in here. I had similar issues with web sockets not working on linux web apps. |
Had to upgrade to Linux B2 for it to work. |
Same here, no luck with F1 or B1, when upgraded to B2 it has started to work immediately. |
To me, Linux B2 worked as well. B1 and F1 does not. |
On my multi-container web app websocket works but the error is still thrown. Using nginx, nodejs |
Is there any update to this issue? I see the issue was closed, but is it fixed? Its been affecting B1 plans for a long time now. I raised this as a premium support issue back in 2018/9. Alas the conclusion then was "that's just the way it is, we don't support websockets on Linux B1". |
I ran into the same problem on my B1 app, and switching to B2 and back to B1 has fixed the problem.
|
This still seems to be an issue, got our socket working by switching from "F1" tier to "B2". |
Confirmed. Magically fixed by upgrading to B2. Will test downgrading tomorrow. |
Have enabled websockets under Configuration but also experiencing the same 503 issue with an app service running on Linux with an F1 plan. |
I have also ended up going for the B2 plan which works fine. Such a shame that it doesn't work for F1 |
It worked on B1 for me. Websocket on (settings ) default values on socket.io |
it worked only after upgrading to B2, (containerized nodejs app) |
Just had the same issue with my node.js websocket server software. B1 did not work. Scaled up to B2 and it worked. Scaled down to B1 2mins later and it's still working. Seems like an internal azure issue. |
Environment
Problem
When using Web Sockets (eg. Blazor) the socket connection fails on the client side with following error:
The Problem is somehow well known:
#19578
#31771
dotnet/aspnetcore#10370
Sadly, all issues are closed without any solution.
According to the issues listed above, source of the problem may be the
perMessageDefalate
setting on the WebSocket (which seemingly cannot be configured using Blazor Server Side). This limitation with WebSockets using App Service Linux Contains is also documented here:https://docs.microsoft.com/en-us/azure/app-service/containers/app-service-linux-faq#language-support
Other people report, that the problem is related to CORS and Authentication settings:
https://stackoverflow.com/a/58240309
It would be very interesting to know if this is a bug that will be fixed, or works as designed.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: