Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

[Bug] Socket connection keeps dropping when deployed in Azure #227

Closed
frankcorneliusmartin opened this issue Feb 1, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@frankcorneliusmartin
Copy link
Contributor

Describe the bug
The websocket connection in the UI is not working. In the console I can retrieve the following:

Request URL: https://blueberry.vantage6.ai/socket.io/?EIO=4&transport=polling&t=****
Request Method: POST
Status Code: 400 BAD REQUEST
Remote Address: ****
Referrer Policy: strict-origin-when-cross-origin

Response headers:

HTTP/1.1 400 BAD REQUEST
Content-Type: text/plain
Date: Thu, 01 Feb 2024 09:54:46 GMT
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://portal.blueberry.vantage6.ai
Set-Cookie: ARRAffinity=7101dfab990a2cbc29fbd6aac7283eac2eee64f0475fd413223cec5239511076;Path=/;HttpOnly;Secure;Domain=blueberry.vantage6.ai
Set-Cookie: ARRAffinitySameSite=7101dfab990a2cbc29fbd6aac7283eac2eee64f0475fd413223cec5239511076;Path=/;HttpOnly;SameSite=None;Secure;Domain=blueberry.vantage6.ai
Transfer-Encoding: chunked

Request headers:

POST /socket.io/?EIO=4&transport=polling&t=*****&sid=***** HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en,nl;q=0.9,en-GB;q=0.8,en-US;q=0.7
Authorization: Bearer ***************
Connection: keep-alive
Content-Length: 9
Content-type: text/plain;charset=UTF-8
Host: blueberry.vantage6.ai
Origin: https://portal.blueberry.vantage6.ai
Referer: https://portal.blueberry.vantage6.ai/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-site
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0
sec-ch-ua: "Not A(Brand";v="99", "Microsoft Edge";v="121", "Chromium";v="121"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"

To Reproduce
Start the UI in an Azure environment

Details

  • UI version: 4.3.0b3
  • server version: 4.3.0b3

Additional context
It seems this post describes the same problem: https://stackoverflow.com/questions/63038955/flask-socket-io-400-error-code-on-azure-app-services

@frankcorneliusmartin frankcorneliusmartin added the bug Something isn't working label Feb 1, 2024
@github-actions github-actions bot added the New label Feb 1, 2024
@bartvanb bartvanb self-assigned this Feb 1, 2024
@bartvanb bartvanb removed the New label Feb 1, 2024
@bartvanb bartvanb added this to Sprints Feb 1, 2024
@github-project-automation github-project-automation bot moved this to Todo in Sprints Feb 1, 2024
@bartvanb bartvanb moved this from Todo to In Progress in Sprints Feb 1, 2024
@bartvanb bartvanb moved this from In Progress to Todo in Sprints Feb 1, 2024
@bartvanb
Copy link
Member

bartvanb commented Feb 6, 2024

This issue only occurs if we use horizontal scaling. With a single App Service instance, there are no issues (even when RabbitMQ is used). Only when using multiple instances I can observe these issues (despite using RabbitMQ)

In app service we see:

2024-02-06T10:19:43.931809458Z 2024-02-06 10:19:43 - engineio.server - ERROR    - 
Invalid session pNbKGKPv-v2SrVD8AAAC (further occurrences of this error will be logged with level INFO)

@bartvanb
Copy link
Member

bartvanb commented Feb 7, 2024

Fixed in 4.3.0b4 by #229

@bartvanb bartvanb closed this as completed Feb 7, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Sprints Feb 7, 2024
@bartvanb bartvanb moved this from Done to To Test in Sprints Mar 7, 2024
@bartvanb bartvanb moved this from To Test to Done in Sprints Mar 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants