I'm kinda running out of ideas and getting desperate at the same time ahah. I also don't know if this is the correct place but here it goes:
Trying to deploy a flask web-app using flask-socketio over a Docker AWS Beanstalk deployment. gevent is being used to serve the web app:
Note 1: The deployment used an AWS Application load balancer and entry point with a certificate and routes the traffic to a EC2 instance where a nginx server is running on port 80 to get the request and proxy them to the docker on port 5000 - This is the normal flow of the AWS Beanstalk stack
Note: no configuration at all was made to the nginx on the EC2 instnace
From the client if I do not force the protocol to to only use WebSocket I can't make the server go from polling to WebSocket. I get a 400 on the request. If I force to use Webscocket from the client I can make the ws protocol work.
Second weird thing:
If I actually remove gevent-websocket requirement and start the server with a gevent worker the server can make the request over polling, with no problem at all.
Third weird thing:
If I run the server with gevent-websocket support and force the client to run with ws only (to make sure I can actually use webscokets) I can run the web app normally, except for one tiny little thing that is driving me crazy: The first request to the server (after the login) is getting a 400 regardless of what I do. And this request is a normal HTTP GET method. All the requests after that first one, runs normally.
I'm also getting this weird things on the server output
I'm kinda running out of ideas and getting desperate at the same time ahah. I also don't know if this is the correct place but here it goes:
Trying to deploy a flask web-app using flask-socketio over a Docker AWS Beanstalk deployment. gevent is being used to serve the web app:
Note 1: The deployment used an AWS Application load balancer and entry point with a certificate and routes the traffic to a EC2 instance where a nginx server is running on port 80 to get the request and proxy them to the docker on port 5000 - This is the normal flow of the AWS Beanstalk stack
Note: no configuration at all was made to the nginx on the EC2 instnace
First weird thing:
From the client if I do not force the protocol to to only use WebSocket I can't make the server go from polling to WebSocket. I get a 400 on the request. If I force to use Webscocket from the client I can make the ws protocol work.
Second weird thing:
If I actually remove gevent-websocket requirement and start the server with a gevent worker the server can make the request over polling, with no problem at all.
Third weird thing:
If I run the server with gevent-websocket support and force the client to run with ws only (to make sure I can actually use webscokets) I can run the web app normally, except for one tiny little thing that is driving me crazy: The first request to the server (after the login) is getting a 400 regardless of what I do. And this request is a normal HTTP GET method. All the requests after that first one, runs normally.
I'm also getting this weird things on the server output
I have no idea what this is and where it comes from
Happy to present all info needed