Go Socketio gives 400 error Azure App Service

Pradyumna Krishna 21 Reputation points
2021-07-05T05:19:53.923+00:00

Hello everyone, I recently migrated my Python Flask-Socket.io server to Golang and I am getting an issue when I deployed my web application to Azure App Service.

I built my golang application and converted into a docker image, as I have done with my python server and deployed to Azure App Service but it is giving 400 Bad Request and 503 response while my python server works fine with the client that I am using on Azure.

111712-screen-shot-2021-07-03-at-20013-pm.png
111640-screen-shot-2021-07-03-at-20055-pm.png

Here are two contradictions,

  1. The join_room event is working fine as you can see I have logged the callback Message Join Room Callback but send_message is not working,
  2. This docker image is working fine on my localhost

I tried different ways to fix this by trying different CORS policies in code, checkout my Azure setting but nothing worked.
Please help me find out the solution for this.

Edit: I forgot to mention my code which you can find on my Github

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,807 questions
{count} votes

Accepted answer
  1. SnehaAgrawal-MSFT 21,661 Reputation points
    2021-07-06T08:38:55.277+00:00

    Thanks for asking question! It looks like you are running on Linux Free sku

    As "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."

    You may refer to this doc link: https://learn.microsoft.com/en-us/azure/app-service/faq-app-service-linux#web-sockets

    Let us know if you have further query on this or issue remains.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.