345003 (7) [Avatar] Offline
#1
Hi,
I went through the example:
5.3.2 Using Elastic Beanstalk to deploy Etherpad, a Node.js application

I completed successfully, saw the status as green, also in my aws web console I can see the environment and the application created, but when I click the url link I see something like this:

502 Bad Gateway
____________________________
nginx/1.8.0


Also tried creating and environment and application using the web console, and when I upload a sample war file (From a simple Java Web Application running in Tomcat in my local) I get the same answer.

Any suggestion on this?

Thanks
Michael Wittig (84) [Avatar] Offline
#2
Hi,

there is an error in the book. Have you used the way described in the Errata? If not, that's most likely the cause smilie Here is how it should be:

5.3.2, page 134

Replace ...

$ aws elasticbeanstalk list-available-solution-stacks --output text \
--query "SolutionStacks[?contains(@, 'running Node.js')] | [0]"\
64bit Amazon Linux 2015.03 v1.4.6 running Node.js


with ...

$ aws elasticbeanstalk list-available-solution-stacks --output text \
--query "SolutionStacks[?contains(@, 'running Node.js')] | [0]"


and

$ 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


is not correct. It should be:

$ aws elasticbeanstalk create-environment --environment-name etherpad --application-name etherpad --option-settings Namespace=aws:elasticbeanstalk:environment,OptionName=EnvironmentType,Value=SingleInstance Namespace=aws:elasticbeanstalk:container:nodejs,OptionName=NodeVersion,Value=0.12.10 --solution-stack-name "$SolutionStackName" --version-label 1.5.2

447380 (2) [Avatar] Offline
#3
Very informative post. I just stumbled upon your post and wanted to say that I have really got some new information's when reading your posts. Any way I’ll be subscribing to your feed and I hope you post again soon.As a staff of lubricants suppliers in uae company, I appreciate the admin for your great job.Thank you
458234 (5) [Avatar] Offline
#4
...so if the "OptionName=NodeVersion,Value=0.12.15"

aws throws ConfigurationValidationException Value is not one of the allowed values: [4.6.1, 4.8.0, 5.12.0, 6.9.1, 6.10.0, 7.6.0]

Changing to "OptionName=NodeVersion,Value=4.6.1" , but getting 502.
Michael Wittig (84) [Avatar] Offline
#5
Hi,
it looks like AWS Elastic Beanstalk does no longer support Node.js 0.12. But the application we use requires this version of Node. So the example will no longer work. We will see how we can fix this in the future.
Thanks
Michael
458234 (5) [Avatar] Offline
#6
Thanks for reply.
Michael Wittig (84) [Avatar] Offline
#7
The release notes say https://aws.amazon.com/releasenotes/AWS-Elastic-Beanstalk/9805958347804462

This release removes support for Node.js versions 6.2.2, 4.4.6, 0.12.17, 0.12.15, 0.10.48, and 0.10.46.
458234 (5) [Avatar] Offline
#8
OK, git it.
So 5.3 can't run?

Thanks
Dov
Michael Wittig (84) [Avatar] Offline
#9
Unfortunately, yes. The example in section 5.3 is not working anymore. We investigate ways to fix the issue. I keep you posted.
458234 (5) [Avatar] Offline
#10
Can I help in anyway?
Let me know, got the time.
Dov
Michael Wittig (84) [Avatar] Offline
#11
could you delete the application and then repeat the steps. When you create the environment, use the following command, this time without the pinned Node.js version:

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
458234 (5) [Avatar] Offline
#12
Results:

Welcome to Etherpad!
This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!
Get involved with Etherpad at http://etherpad.org
Warning: DirtyDB is used. This is fine for testing but not recommended for production. -- To suppress these warning messages change suppressErrorsInPadText to true in your settings.json

Very nice.
Happy to help whenever...
Dov
Michael Wittig (84) [Avatar] Offline
#13
Hi Dov,

thanks for reporting the issue and testing it so promptly. That is very valuable feedback for us!

Have a good day,
Michael