Closed knguyen0105 closed 6 years ago
We recently fixed something in the example. When did you run the commands?
I were working on the chapter today. The problem is with version 2016 of the AMI.
you need to run:
aws elasticbeanstalk create-application --application-name etherpad
aws elasticbeanstalk create-application-version --application-name etherpad --version-label 1.5.2 --source-bundle S3Bucket=awsinaction,S3Key=chapter5/etherpad.zip
aws elasticbeanstalk list-available-solution-stacks --output text --query "SolutionStacks[?contains(@, 'running Node.js')] | [0]"
# replace $SolutionStackName with the output from above
aws elasticbeanstalk create-environment --environment-name etherpad --application-name etherpad --option-settings Namespace=aws:elasticbeanstalk:environment,OptionName=EnvironmentType,Value=SingleInstance --solution-stack-name "$SolutionStackName" --version-label 1.5.2
I successfully ran the app. but when I go the CNAME (http://etherpad.9s8gyiik3w.us-east-1.elasticbeanstalk.com/), its taking me to a Node.js landing page:
"Congratulations Your first AWS Elastic Beanstalk Node.js application is now running on your own dedicated environment in the AWS Cloud"
What could possibly be wrong? My environment output is below:
{ "Environments": [ { "ApplicationName": "etherpad", "EnvironmentName": "etherpad", "VersionLabel": "1.6.2", "Status": "Ready", "EnvironmentArn": "arn:aws:elasticbeanstalk:us-east-1:520104956268:environment/etherpad/etherpad", "EnvironmentLinks": [], "PlatformArn": "arn:aws:elasticbeanstalk:us-east-1::platform/Node.js running on 64bit Amazon Linux/4.4.0", "EndpointURL": "34.225.75.140", "SolutionStackName": "64bit Amazon Linux 2017.09 v4.4.0 running Node.js", "EnvironmentId": "e-qs3znpu2cp", "CNAME": "etherpad.9s8gyiik3w.us-east-1.elasticbeanstalk.com", "AbortableOperationInProgress": false, "Tier": { "Version": "1.0", "Type": "Standard", "Name": "WebServer" }, "Health": "Green", "DateUpdated": "2017-12-16T22:31:20.197Z", "DateCreated": "2017-12-16T22:27:09.908Z" } ]
The output I'm receiving from:
aws elasticbeanstalk list-available-solution-stacks --output text --query "SolutionStacks[?contains(@, 'running Node.js')] | [0]"
is "64bit Amazon Linux 2017.09 v4.4.0 running Node.js"
Is this the $SolutionStackName ?????
dahhh! I fixed it! no idea how. but i redid, and its working :)
After deploying etherpad on elasticbeanstalk and going to the address of the application, i get 'bad gateway' error.
I check the log and in the first few lines:
A quick solution is downgrading the environment to an older version of the AMI on the web mangement interface. I used the v2015 one.