aws beanstalk single instance 502 proxy error - amazon-web-services

I'm trying to configure an aws beanstalk single instance. I've successfully created the instance, but when I navigate to the Environment URL, I get the following error.
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.
Reason: Error reading from remote server
What could be causing this and what do I need to do to fix it.
I'm deploying a java web app using tomcat.

Related

GCP Cloud Run 503 Error: Service unavailable for asp.net website

I'm trying to deploy the asp.net website in cloud run but am stuck with this error - "The request failed because either the HTTP response was malformed or connection to the instance had an error. (Service Unavailable 503)"
This is https & http docker files. one of many such services.
for http-5176 -- http URL of cloud run is not registered in the azureAD app - I'm getting can't redirect error when I access the cloud run URL which is expected that is fine.
but for https-7176 -- https URL of cloud run which is registered in azureAD is immediately throwing Service Unavailable 503, not sure whether it is redirected to auth or not.
Thing is, when I try these two container images locally in docker desktop it is working fine - https://localhost:PORT redirects to authentication page and website is loaded as expected with some other api call errors. But when I deploy the same in cloud run -- Service Unavailable 503
Cloud run config
2 CPU limit
512MB Memory limit
1 Concurrency
500sec request timeout
Tried some troubleshooting
Concurrency is at low
No VPC access connector is used for now.
No errors on memory exceeding in logs
Expecting - to authenticate and load webpage knowing that there are few api error in that to work on later.
Do you have any idea what could be causing this? And how to reslove this?
Thanks for your answers in advance.
As cloud run redirects HTTP requests to HTTPS. after a long trial and error, with my application team. In the code, they added a redirection from HTTP to HTTPS and I'm running my cloud-run service in the HTTP port. Now it is working fine.

AWS Elastic Beanstalk Load balancer - IIS 10 Web socket error

whose familiar here with AWS EC2 Elastic Beanstalk load balancer? I am deploying my .Net application that has SignalR using IIS 10 in EC2 and I always getting this error "WebSocket connection to 'wss://...' failed: Error during WebSocket handshake: Incorrect 'Sec-WebSocket-Accept' header value.
I am using Application Load Balancer and base on this link https://aws.amazon.com/blogs/aws/new-aws-application-load-balancer/ Websocket is now supported in Application Load Balancer but I cannot get it to work with my app. Everytime I try to connect with SignalR it always throws that same error and my Transport Type got roll back to Long Polling method. Note that this error does not come out when running my code locally via Visual Studio or deployed in IIS.

Can't connect to my web server on an AWS EC2 instance

I am new to aws and have very little networking knowledge.
I have set up an EC2 instance and installed sucessfully
MongoDB
my nodejs app server and
my angular web app on the same instance
I tried to access my web server from a browser using
https://ec2-54-255-239-55.ap-southeast-1.compute.amazonaws.com:3443/
and
ec2-54-255-239-55.ap-southeast-1.compute.amazonaws.com:3443/
but have not been successful so far. The error message :
This site can’t be reached
ec2-54-255-239-55.ap-southeast-1.compute.amazonaws.com refused to connect.
I need help

Getting 502 proxy error after deploying app to AWS

I deployed an Application to AWS elastic beanstalk. When I try to open the application, I am getting 502 proxy error Saying following message.
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.
Reason: Error reading from remote server
Apache/2.2.31 (Amazon) Server at mehe.us-west-2.elasticbeanstalk.com
Port 80
Strange part is when I run the application from localhost(Still connected to amazon database) the application is working fine, but after deloying it is not working. Here's the link to application
Any ideas how to get rid off it.
The timeout value for HTTPD is lower than the timeout value set for ELB. Change the timeout value in /etc/httpd/conf/httpd.conf
The keep the value between reboots you'll need to either create a custom AMI or use .ebextensions feature.

aws ec2 caching (always returns 304)

I have created a fresh EC2 instance, installed Apache2 and pointed my domain (hamidlab.com) to ip of this instance. When I browse my domain it shows default apache/ubuntu page, then I stopped apache2 service and try to access (hamidlab.com) it still shows apache/ubuntu default page, now when I try to access 1.hamidlab.com it says
Could Not Connect
Description: Could not connect to the requested server host.
and returns Header Status Code: 502 Connection refused
I tried with nginx server, still same caching issue.
Do AWS have any caching set ?
I am not using any other service than ec2.