Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't update parse-server-example on AWS Elastic Beanstalk #150

Closed
meilers opened this issue Apr 2, 2016 · 17 comments
Closed

Can't update parse-server-example on AWS Elastic Beanstalk #150

meilers opened this issue Apr 2, 2016 · 17 comments

Comments

@meilers
Copy link

meilers commented Apr 2, 2016

I deployed the Parse-server-example to AWS EB using the deploy button a few weeks ago. Now I want to update it so it uses the latest Parse-Server version.

So I downloaded the zip and uploaded it to my EB application. The application hung and never started (Failed to Deploy)

I then noticed that the app.config in .extensions had a new field: SERVER_URL. I updated the value, and reuploaded, but it never succeeded either. All my environment variables are set in the dashboard. They are also set in the app.config file.

Finally, I installed EB CLI and tried to upload it once again, to no avail. All I get from the console is:

iMac-10DDB1A2E9E9:birder_eb michael2$ eb push
Updating the AWS Elastic Beanstalk environment parse-server-dev...
Environment update initiated successfully.

2016-04-02 14:48:40 INFO    Deploying new version to instance(s).
Timeout for waiting Environment "parse-server-dev" finishing update.

Any idea what's happening? Am I missing something? I thought that just uploading the latest parse-server-example zip to my current EB application would do the trick.

Any help would be much appreciated. Thanks!

Here's my configuration:
screen shot 2016-04-02 at 3 06 06 pm

@nickgerig
Copy link

This seems to be affecting everyone who deploys from eb. See final page of comments here

@meilers
Copy link
Author

meilers commented Apr 3, 2016

Yeah, so after digging in eb-activity.log I found this:

Running npm install: /opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/bin/npm
Setting npm config jobs to 1
npm config jobs set to 1
Running npm with --production flag
Failed to run npm install. Snapshot logs for more details.
Traceback (most recent call last):
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 681, in
main()
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 663, in main
node_version_manager.run_npm_install(options.app_path)
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 131, in run_npm_install
self.npm_install(bin_path, self.config_manager.get_container_config('app_staging_dir'))
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 166, in npm_install
raise e
subprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/bin/npm', '--production', 'install']' returned non-zero exit status 1 (Executor::NonZeroExitStatus)

No indication on how to fix this...

@pbmarcano
Copy link

Per @dennisAWS (parse-community/parse-server#1276)

1.) Add the following to the .ebextensions/app.config file if you are upgrading from 2.x.x to 2.2.x:

packages:
  yum:
    krb5-devel: []

2.) If that doesn't work, then try upgrading your instance type to something larger than your t1.micro

The Parse Server Deploy button deployed my instance on a t2.nano which had issues upgrading my parse server. These two steps fixed my problem.

@jc73300
Copy link

jc73300 commented Apr 11, 2016

Any updates on how to resolve this issue?

@meilers
Copy link
Author

meilers commented Apr 11, 2016

Yes. Move to Heroku. AWS Elastic Beanstalk support is terrible.

@nickgerig
Copy link

@meilers haha.

Just for the record, the above suggested solutions (1&2) don't work for me. Not sure if that's the case for others.

@jc73300
Copy link

jc73300 commented Apr 14, 2016

Thanks for the update, any idea when 2.2.7 will be released?-----Original Message-----

From: Tanmay
Sent: Apr 14, 2016 3:36 AM
To: ParsePlatform/parse-server-example
Cc: jc73300
Subject: Re: [ParsePlatform/parse-server-example] Can't update parse-server-example on AWS Elastic Beanstalk (#150)

Its a known issue and will be fixed with parse-server release v2.2.7

The cause is insufficient RAM while building packages. You can find more info about it here: parse-community/parse-server#1276

A temporary fix is to change instance to t2.small which comes with 2Gb RAM.

—You are receiving this because you are subscribed to this thread.Reply to this email directly or view it on GitHub

@dmennis
Copy link

dmennis commented Apr 15, 2016

@nickgerig - Did you get your deployment resolved? Still having issues after applying @pbmarcano two suggestions? The one other recent issue that others (also on other providers like digital ocean) are discussing is with grpc. I'm not able to reproduce this issue here and so I don't know exactly where to focus. If you can provide us some more details regarding the most recent errors from beanstalk logs, I can take a look.

Also, depending on if you made any server changes after deployment, it may be easier to just re-deploy using the current "Deploy to AWS" link from the AWS Mobile Blog here. That parse-server-example version will deploy as version 2.1.6 and then you can upgrade by simply changing the version to ~2.2.2 and re-deploy to get the latest.
If you do this, you'll have to provide the Environment Variables again which shouldn't take too long and you would be re-connecting to the existing MongoDB database.

If you are already in production, disregard this and I can provide another option such as a Blue/Green Deployment as discussed here.

@jc73300
Copy link

jc73300 commented Apr 16, 2016

Yes I did but it was a combination of upgrading my AWS to a t2.small and as you suggested redeploying the example only instead of 2.2.2 I went with 2.2.7. After that the dashboard sees my server and it is now able to send push notifications to my ios device. Thanks for your help.-----Original Message-----

From: Dennis Hills
Sent: Apr 15, 2016 4:19 PM
To: ParsePlatform/parse-server-example
Cc: jc73300
Subject: Re: [ParsePlatform/parse-server-example] Can't update parse-server-example on AWS Elastic Beanstalk (#150)

@nickgerig - Did you get your deployment resolved? Still having issues after applying @pbmarcano two suggestions? The one other recent issue that others (also on other providers like digital ocean) are discussing is with grpc. I'm not able to reproduce this issue here and so I don't know exactly where to focus. If you can provide us some more details regarding the most recent errors from beanstalk logs, I can take a look. Also, depending on if you made any server changes after deployment, it may be easier to just re-deploy using the current "Deploy to AWS" link from the AWS Mobile Blog here. That parse-server-example version will deploy as version 2.1.6 and then you can upgrade by simply changing the version to ~2.2.2 and re-deploy to
get the latest.
If you do this, you'll have to provide the Environment Variables again which shouldn't take too long and you would be re-connecting to the existing MongoDB database. If you are already in production, disregard this and I can provide another option such as a Blue/Green Deployment as discussed here.

—You are receiving this because you are subscribed to this thread.Reply to this email directly or view it on GitHub

@nickgerig
Copy link

@dennisAWS thanks for the detailed instructions. That worked for me. The only issue I encountered was that the original instructions don't ask you to create a VPC which is required for T2. So the initial run through from the 'Deploy to AWS' link results in a failed deployment (degraded state). I had to create a VPC and start over because I couldn't see an option to add a VPC after creating the environment.

I am working with 2 apps, one of these will be in production within a week so we might look at Blue/Green as a safe migration strategy - thanks for the link.

Note: If you do edit the blog article it would be good to add some higher res screenshots as they are virtually unreadable :)

@gateway
Copy link

gateway commented Apr 21, 2016

How have you guys been liking EB with Parse, Ill prob choose that over Heroku since they add a premium $$ to the service. What I dont like is the the update ability, seems like you need to upload a zip file every time you make a change, where with Heroku you just push via git?

Also since you can get multi core/cpus with AWS, how do you run more than one parse server in a cluster on the same box.. so lets say you have 4 cpus, run 3 parse servers keeping 1 cpu for operations and memory..

@david-koch-pro
Copy link

Please try to rebuild environment then deploy application.

@cleever
Copy link

cleever commented May 25, 2016

For whom are unable to run or update Parse Server in EB enviroment, should use a normal EC2 instance.

For example: Choose an Ubuntu instance, like t2.micro. Install nodejs, git clone parse-server-example, do some normal parse server configurations and start parse server.

In AWS, you can use a Load Balancer and Certificate Manager to enable HTTPs and protect your server.

Elastic Beanstalk isn't the only option in Amazon Enviroment and the "Deploy to Elastic Beanstalk button" it's not necessarily the best option for beginners.

@sprabs
Copy link

sprabs commented Jun 14, 2016

Has anyone gotten parse-server totally working (parity with parse.com) on AWS Elastic Beanstalk?

I am having this issue: parse-community/parse-server#2061

@david-koch-pro
Copy link

Did you use this to install on EB?

@gateway
Copy link

gateway commented Jul 8, 2016

@david-koch-pro I think the main issue still is how to update parse as new updates/fixes/features come out..

@henrikperrochon
Copy link

henrikperrochon commented Nov 1, 2016

Hello,
I had the same issue.
In my case, I wanted to update Parse Server from v2.2.17 to v2.2.23, updating package.json and using CLI eb deploy. It failed all the time, even with .ebextensions/app.config modified.

This morning I tried again and it worked, even with a t2.micro

The only difference is that I forgot to update my local folder (npm update) before "eb deploy". Maybe the error comes from the node_modules files of the local directory?

@TomWFox TomWFox closed this as completed Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests