Docker container runs local, but not on AWS Elastic BeanStalk - amazon-web-services

I created Docker container with flash and gunicorn. I tested it locally successfully and pushed it without any problems to Docker hub. I also have AWS EB CLI installed so I tested it with eb local run. Everything worked fine.
I used the following link to deploy it on AWS Elastic BeanStalk. When I visit URL of the application, I am getting HTTP ERROR 504. I looked at log file and there are any error messages.
How can I further troubleshoot this issue?

Related

SpringBoot 2.5.3 does not work on AWS Elastic Beanstalk

I'm attempting to upgrade SpringBoot from v2.4.0 to 2.5.3.
My Boot project installs and runs fine locally with both versions.
Version 2.4.0 works fine on Beanstalk. When updating to 2.5.3 however, nginx returns a 301 for all requests to the Boot application. I am testing on the same instance (so same config) on Corretto 11 running on 64bit Amazon Linux 2/3.2.7.
The SpringBoot logs are identical between the 2 when starting up on both local and SpringBoot minus a few verbiage changes. No other changes exist in the code.
I'm a bit stuck. I've reviewed the Java logs, nginx, Beanstalk init logs, and everything looks fine.
Edit I am looking for suggestions on troubleshooting next steps for AWS Beanstalk SpringBoot apps as the 2 version produce identical EB and app logs, and I am not sure where else I should be looking.

Elastic Beanstalk not deploying and cannot find error in error logs

I am having an issue getting my application to deploy on the elastic beanstalk. It works on my local machine flawlessly however when I try to deploy to beanstalk it fails and rolls back to the sample application. Then when I check the error.log file it is empty. Also when I check the node.js file the only output is
> Elastic-Beanstalk-Sample-App#0.0.1 start /var/app/current
> node app.js
Server running at http://127.0.0.1:8081/
I don't understand how to find the error it sends when deploying to the server. Where should I be looking?
The reason it was deleting my logs is I had rolling with additional batch enabled. Thereby deleting my logs on rollback. As far as the error was concerned it was an error in my code that caused it to require a module that didn't exist
It appears that you are running the app with the HOST set to localhost (127.0.0.1). The localhost is accessible only to internal processes on your Beanstalk instance. Change the host to 0.0.0.0 so that the app can be accessed from other IP addresses.

408 timeout error with postgraphile on AWS elastic beanstalk

I'm running postgraphile and apollo to get data for my react app. I am using npm concurrently to run the react server and to run postgraph using the CLI including --cors flag. Everything works fine when i run the app locally. When I upload everything to AWS elastic beanstalk, I can't access app.com:5000/graphiql and the app gives me a 408 timeout error code saying it is a problem with HTTPLink, then tells me there is a cross origin error. If i run the app on AWS and have it point to my localhost:5000/graphiql it works perfectly, but not when it is deployed to AWS. The part that confuses me is that it does not have a cross origin error when it is going from AWS to my localhost, but it does have a cross origin error when it's going from AWS to AWS.
By default PostGraphile binds to localhost; it sounds like you need it to bind to all interfaces. Try the --host 0.0.0.0 option documented here:
https://www.graphile.org/postgraphile/usage-cli/

awseb cli inconsistent with AWS web console

I am new to AWS. I am trying to setup AWS Elastic Beanstalk. I am using cli.
I followed a youtube tutorial(https://www.youtube.com/watch?v=xhc1boyBkJw&t=317s). The problem is that at the end of tutorial I see "INFO: New application version was deployed to running EC2 instances.
INFO: Environment update completed successfully." success message in terminal. But when I open AWS console in web browser, I see 0 instances running and no beanstalk environment setup.

How can automatic deploy yii2 app when Elastic Beanstalk instance is terminated and created a new instance

Currently I have setup my yii2 website on AWS Elastic beanstalk. I followed following steps :
Created Elastic Beanstalk app and environment : Platform PHP 7.0, RDS database
Created SSH connection from EC2 instance of elastic beanstalk using putty with .pem file
In Apache folder I have cloned my yii2 git repo using (sudo git clone repo_url) command
Installed composer using this link https://gist.github.com/asugai/6694502
Run command : (sudo composer install) in my repo folder
Edited common/config/main-local.php and made db connection
And run migration using (sudo php yii migrate)
Setup a domain for this elastic beanstalk app
Now I don't know how should I proceed further and I am facing following problems :
Elastic Balance loader is creating new instance and terminating current one when it fails or health goes in severe.
Due this, my all data in that instance is lost. To make it work I am doing all steps again and again manually.
How can I make my domain https (SSL certified)
How can make easy process to pull new changes from git
I already have a working site in nodeJS. which is using elastic beanstalk, elastic balance loader, RDS(postgres), S3 bucket, cloudfront for Route 53, SSL certificate (https), code pipeline, code commit. And AWSCLI at local to deploy nodeJS app.
my question is about I want to use same flow for yii2 advance app.
Can anyone please help me here?
Thanks in advance :)