Repository navigation
v2.2.4 Deploy failing on Amazon Elastic Beanstalk #1276
Copy link
Copy link
Closed
Description
I was trying out the latest release and I'm why not sure why but I'm not able to successfully deploy to elastic beanstalk anymore.
Last successfu eb deployment was on parse-server release v2.2.2
Local installation however is successful.
Here is the eb activity log:
-------------------------------------
/var/log/eb-activity.log
-------------------------------------
CXX(target) Release/obj.target/crc32c_sse42/src/crc32c_sse42.o
AR(target) Release/obj.target/crc32c_sse42.a
COPY Release/crc32c_sse42.a
CXX(target) Release/obj.target/sse4_crc32/src/crc32c.o
SOLINK_MODULE(target) Release/obj.target/sse4_crc32.node
COPY Release/sse4_crc32.node
make: Leaving directory `/tmp/deployment/application/node_modules/parse-server/node_modules/parse-server-gcs-adapter/node_modules/gcloud/node_modules/hash-stream-validation/node_modules/fast-crc32c/node_modules/sse4_crc32/build'
> grpc@0.13.0 install /tmp/deployment/application/node_modules/parse-server/node_modules/parse-server-gcs-adapter/node_modules/gcloud/node_modules/grpc
> node-pre-gyp install --fallback-to-build
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 <module>
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 (ElasticBeanstalk::ExternalInvocationError)
caused by: + /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install
> kerberos@0.0.19 install /tmp/deployment/application/node_modules/kerberos
> (node-gyp rebuild) || (exit 0)
make: Entering directory `/tmp/deployment/application/node_modules/kerberos/build'
CXX(target) Release/obj.target/kerberos/lib/kerberos.o
In file included from ../lib/kerberos.cc:1:0:
../lib/kerberos.h:5:27: fatal error: gssapi/gssapi.h: No such file or directory
#include <gssapi/gssapi.h>
^
compilation terminated.
make: *** [Release/obj.target/kerberos/lib/kerberos.o] Error 1
make: Leaving directory `/tmp/deployment/application/node_modules/kerberos/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.17-22.30.amzn1.x86_64
gyp ERR! command "/opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/deployment/application/node_modules/kerberos
gyp ERR! node -v v4.3.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing fsevents@1.0.9
> sse4_crc32@4.1.1 install /tmp/deployment/application/node_modules/parse-server/node_modules/parse-server-gcs-adapter/node_modules/gcloud/node_modules/hash-stream-validation/node_modules/fast-crc32c/node_modules/sse4_crc32
> node-gyp rebuild
make: Entering directory `/tmp/deployment/application/node_modules/parse-server/node_modules/parse-server-gcs-adapter/node_modules/gcloud/node_modules/hash-stream-validation/node_modules/fast-crc32c/node_modules/sse4_crc32/build'
CXX(target) Release/obj.target/crc32c_sse42/src/crc32c_sse42.o
AR(target) Release/obj.target/crc32c_sse42.a
COPY Release/crc32c_sse42.a
CXX(target) Release/obj.target/sse4_crc32/src/crc32c.o
SOLINK_MODULE(target) Release/obj.target/sse4_crc32.node
COPY Release/sse4_crc32.node
make: Leaving directory `/tmp/deployment/application/node_modules/parse-server/node_modules/parse-server-gcs-adapter/node_modules/gcloud/node_modules/hash-stream-validation/node_modules/fast-crc32c/node_modules/sse4_crc32/build'
> grpc@0.13.0 install /tmp/deployment/application/node_modules/parse-server/node_modules/parse-server-gcs-adapter/node_modules/gcloud/node_modules/grpc
> node-pre-gyp install --fallback-to-build
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 <module>
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)
[2016-03-30T08:25:32.615Z] INFO [2918] - [Application update/AppDeployStage0/AppDeployPreHook/50npm.sh] : Activity failed.
[2016-03-30T08:25:32.617Z] INFO [2918] - [Application update/AppDeployStage0/AppDeployPreHook] : Activity failed.
[2016-03-30T08:25:32.617Z] INFO [2918] - [Application update/AppDeployStage0] : Activity failed.
[2016-03-30T08:25:32.618Z] INFO [2918] - [Application update] : Completed activity. Result:
Application update - Command CMD-AppDeploy failed
-------------------------------------
/var/log/eb-commandprocessor.log
-------------------------------------
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 (ElasticBeanstalk::ExternalInvocationError)
caused by: + /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install
> kerberos@0.0.19 install /tmp/deployment/application/node_modules/kerberos
> (node-gyp rebuild) || (exit 0)
make: Entering directory `/tmp/deployment/application/node_modules/kerberos/build'
CXX(target) Release/obj.target/kerberos/lib/kerberos.o
In file included from ../lib/kerberos.cc:1:0:
../lib/kerberos.h:5:27: fatal error: gssapi/gssapi.h: No such file or directory
#include <gssapi/gssapi.h>
^
compilation terminated.
make: *** [Release/obj.target/kerberos/lib/kerberos.o] Error 1
make: Leaving directory `/tmp/deployment/application/node_modules/kerberos/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.17-22.30.amzn1.x86_64
gyp ERR! command "/opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/deployment/application/node_modules/kerberos
gyp ERR! node -v v4.3.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing fsevents@1.0.9
> sse4_crc32@4.1.1 install /tmp/deployment/application/node_modules/parse-server/node_modules/parse-server-gcs-adapter/node_modules/gcloud/node_modules/hash-stream-validation/node_modules/fast-crc32c/node_modules/sse4_crc32
> node-gyp rebuild
make: Entering directory `/tmp/deployment/application/node_modules/parse-server/node_modules/parse-server-gcs-adapter/node_modules/gcloud/node_modules/hash-stream-validation/node_modules/fast-crc32c/node_modules/sse4_crc32/build'
CXX(target) Release/obj.target/crc32c_sse42/src/crc32c_sse42.o
AR(target) Release/obj.target/crc32c_sse42.a
COPY Release/crc32c_sse42.a
CXX(target) Release/obj.target/sse4_crc32/src/crc32c.o
SOLINK_MODULE(target) Release/obj.target/sse4_crc32.node
COPY Release/sse4_crc32.node
make: Leaving directory `/tmp/deployment/application/node_modules/parse-server/node_modules/parse-server-gcs-adapter/node_modules/gcloud/node_modules/hash-stream-validation/node_modules/fast-crc32c/node_modules/sse4_crc32/build'
> grpc@0.13.0 install /tmp/deployment/application/node_modules/parse-server/node_modules/parse-server-gcs-adapter/node_modules/gcloud/node_modules/grpc
> node-pre-gyp install --fallback-to-build
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 <module>
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)
[2016-03-30T08:25:32.618Z] ERROR [2918] : Command CMD-AppDeploy failed!
Possibly related issue #1082
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
tanmays commentedon Apr 1, 2016
Searched a bit and this issue is probably same as this #https://github.com/christkv/kerberos/issues/33
Looks like this issue is limited to AWS Elastic beanstalk. I'm still not sure why I'm facing it now, been trying hard to figure out what changed between v2.2.2 and v2.2.4 that caused this.
flovilmart commentedon Apr 2, 2016
Are you running EB over CentOS 6? Maybe try changing the distro to debian, ubuntu or something else if you can.
flovilmart commentedon Apr 2, 2016
http://stackoverflow.com/questions/34084814/npm-error-when-deploying-nodejs-to-elastic-beanstalk
tanmays commentedon Apr 2, 2016
@flovilmart Elastic beanstalk provides only Amazon Linux as an option.
As for the workaround mentioned in the link you posted, it seemed to work at first but subsequent deploys are still failing. It fails sometimes due to some issue with
parse-server-gcs-adapterand sometimes due to some random compiling error. I'll try to narrow down the issue and if I can't I'll post some more detailed logs again.flovilmart commentedon Apr 2, 2016
Ok... So the solution would be to remove the GCS adapter dependency from parse-server, and let the users that use it depend on it by themselves.
That would be the quick/dirty fix.
tanmays commentedon Apr 2, 2016
Yes and I feel all 3rd party integrations should be an external dependancy. OneSignal in case of push is already separated, Even Mailgun, S3, GCS and maybe if in future an Azure based file adapter or mandrill based mail adapter comes along, it makes sense to keep those external.
flovilmart commentedon Apr 2, 2016
They have been all externalizer already. We just kept them in as this is a breaking change, not backwards compatible.
tanmays commentedon Apr 2, 2016
Ah I see. I don't think anyone is using parse-server yet for production so I guess the sooner you introduce these breaking changes the better since we are getting so close to a stable product. Most of the people are keeping up to date with releases.
Thanks again for all the hard work.
flovilmart commentedon Apr 2, 2016
We may need to release a Major that's what's problematic... We can't really assume that. Not sure of the proportions using it as a npm module
Opened #1339
tanmays commentedon Apr 2, 2016
Tried to deploy again and it failed. Here are the logs
I'm afraid we have no choice but to make
parse-server-gcs-adapteroptional. I'm sure a lot of people would be using AWS EB for its ease of use and price-to-feature benefit.flovilmart commentedon Apr 2, 2016
If you add gcc-c++.x86_64 to the yum packages elastic beanstalk config, does it help?
tanmays commentedon Apr 2, 2016
How do I add that? I already have gcc. Here are the packages I'm installing according to the link you mentioned at the top:
flovilmart commentedon Apr 2, 2016
node needs a c++ compiler too... I'm testing now. that would be gcc-c++.noarch or gcc-c++
29 remaining items
markuswinkler commentedon Apr 2, 2016
well, if there is any good time to make a breaking change for the greater good it is now I guess.
flovilmart commentedon Apr 2, 2016
I've already externalized all the adapters (besides GridStoreAdapter, but it will go to) into external repositories, we decided to still depend on them to avoid the breaking changes. In the end, what matters most is the benefit for the community.
Thanks for helping on that! That was a really meaningful contribution!
tanmays commentedon Apr 2, 2016
@flovilmart I'll close this one, I hope the PR with breaking changes but improved memory efficiency gets merged, it'd be good in the long run. Alongside running a production server, a lot of people including me will also be using it for limited user beta releases, for which a micro instance would be perfect. I'm sure the community would present a lot of similar cases.
dmennis commentedon Apr 6, 2016
@flovilmart, @tanmays, @markuswinkler
I know this issue is now closed but wanted to update you all on this issue. I'm on the AWS Mobile team and worked with the Elastic Beanstalk engineers to identify the issue and we are working on more permanent solution. You all have figured out a workaround but I wanted to document this and let others know they have options.
First of all, we (and you all) have identified TWO issues when upgrading Parse Server running on AWS Elastic Beanstalk.
Problem #1: The persistent error: fatal error: gssapi/gssapi.h: No such file or directory
#include <gssapi/gssapi.h> when deploying or updating Parse Server from any 2.x.x to 2.2 version.
Issue: Parse Server is attempting to build a kerberos module with native extensions. When attempting to retrieve a header file on the instance, it fails, and the error halts the deployment.
Solution: Add the following to the .ebextensions/app.config file:
Save and re-deploy.
Tip: The easiest way to manage your Parse Server application on Elastic Beantalk is to install and configure the EB CLI here. I'm not a command-line user typically but this tool works great for both PC and Mac. Here's the quick overview for modifying an existing Parse Server application using the EB CLI:
Done. That's it. The updated application code will be zipped up and uploaded to S3 and deployed to your environment. This is the same process you can use to add environment variables, add modules, etc...
Problem #2: As @markuswinkler found out, the default t1.micro instance type for Elastic Beanstalk is running out of memory on subsequent deploys or reboots and so we thought the solution to #1 wasn't working.
Solution: If you are running a t1.micro and with the current Parse Server dependencies, you'll want to upgrade the instance type to something with more memory. This may not be an issue if the breaking PR gets pulled in, from what I hear. However, in the meantime, upgrade the instance type to avoid getting out-of-memory when the application starts up.
To change your instance type, click on Configuration in the EB Console then click the edit icon for the "Instances" card. This will let you set the instance type that determines the processing power of the Parse Server in your environment.
Conclusion: Applying the changes to the app.config for issue #1 and upgrading the instance type for issue #2 should resolve any "current" issues when attempting to modify, upgrade, or reboot your Parse Server application on AWS Elastic Beanstalk.
Next Steps: We'll be submitting a PR to modify the .ebextenstions/app.config for parse-server-example repo so that any future deployments don't need to worry about applying the changes for issue #1. For issue #2, AWS will most likely specify (explicitly) a larger instance type in their solution offered on the AWS Mobile Blog here. Currently, the solution does not explicitly specify the type and it defaults to the free-tier t1.micro in the us-east-1 region.
flovilmart commentedon Apr 6, 2016
We've also removed parse-server-gcs-adapter that was attempting to compile a native module. This is likely that since 2.2.6, t1.micro deploy again.
markuswinkler commentedon Apr 7, 2016
deployment of t2.micro (1 GB RAM) still fails on 2.2.6. I also added the .ebextensions/app.config file @dennisaws suggested.
btw, @dennisaws, what's the best way to force go back to a working configuration? Once you select t2.micro instead of t2.small the configuration is locked in a reboot/install/fail cycle and aborting takes about 15 minutes.
tanmays commentedon Apr 7, 2016
@markuswinkler looks like 'parse-server-gcs-adapter' was removed after 2.2.6. We probably have to wait for 2.2.7.
markuswinkler commentedon Apr 7, 2016
yes, but that one should actually reduce the memory foot print (gcs is used for google cloud storage), but alas, still fails.
markuswinkler commentedon Apr 18, 2016
Great news, 2.2.7 runs stable on a t2.micro instance on AWS.
Sometimes even on a t2.nano. Data is inconclusive. Seems like each deployment uses a different amount of RAM. I ran t2.nano for a couple days without a problem but my latest deployment failed, had to go back to t2.micro.
henrikperrochon commentedon Oct 31, 2016
Hello,
I've been struggling with this issue and I don't know what to do now.
In my case, I want to update Parse Server from 2.2.17 (first install) to 2.2.23 on Elastic Beanstalk (node v6.9.1, npm v4.0.1).
I tryed to add @dennisaws or @tanmays packages to .ebextensions, tryed with t2.micro and t2.small but in every case I got an error. Here is the full log in case you have a hint. Thanks!
`-------------------------------------
/var/log/nodejs/npm-debug.log
4268 verbose linkMans cycle@1.0.3
4269 verbose rebuildBundles cycle@1.0.3
4270 info lifecycle cycle@1.0.3
install: cycle@1.0.3install: no script for install, continuing4271 silly lifecycle cycle@1.0.3
4272 info lifecycle cycle@1.0.3
postinstall: cycle@1.0.3postinstall: no script for postinstall, continuing4273 silly lifecycle cycle@1.0.3
4274 info build /tmp/deployment/application/node_modules/eyes
4275 info lifecycle eyes@0.1.8
preinstall: eyes@0.1.8preinstall: no script for preinstall, continuing4276 silly lifecycle eyes@0.1.8
4277 info linkStuff eyes@0.1.8
4278 silly linkStuff eyes@0.1.8 has /tmp/deployment/application/node_modules as its parent node_modules
4279 verbose linkBins eyes@0.1.8
4280 verbose linkMans eyes@0.1.8
4281 verbose rebuildBundles eyes@0.1.8
4282 info lifecycle eyes@0.1.8
install: eyes@0.1.8install: no script for install, continuing4283 silly lifecycle eyes@0.1.8
4284 info lifecycle eyes@0.1.8
postinstall: eyes@0.1.8postinstall: no script for postinstall, continuing4285 silly lifecycle eyes@0.1.8
4286 info build /tmp/deployment/application/node_modules/pkginfo
4287 info lifecycle pkginfo@0.3.1
preinstall: pkginfo@0.3.1preinstall: no script for preinstall, continuing4288 silly lifecycle pkginfo@0.3.1
4289 info linkStuff pkginfo@0.3.1
4290 silly linkStuff pkginfo@0.3.1 has /tmp/deployment/application/node_modules as its parent node_modules
4291 verbose linkBins pkginfo@0.3.1
4292 verbose linkMans pkginfo@0.3.1
4293 verbose rebuildBundles pkginfo@0.3.1
4294 info lifecycle pkginfo@0.3.1
install: pkginfo@0.3.1install: no script for install, continuing4295 silly lifecycle pkginfo@0.3.1
4296 info lifecycle pkginfo@0.3.1
postinstall: pkginfo@0.3.1postinstall: no script for postinstall, continuing4297 silly lifecycle pkginfo@0.3.1
4298 info build /tmp/deployment/application/node_modules/stack-trace
4299 info lifecycle stack-trace@0.0.9
preinstall: stack-trace@0.0.9preinstall: no script for preinstall, continuing4300 silly lifecycle stack-trace@0.0.9
4301 info linkStuff stack-trace@0.0.9
4302 silly linkStuff stack-trace@0.0.9 has /tmp/deployment/application/node_modules as its parent node_modules
4303 verbose linkBins stack-trace@0.0.9
4304 verbose linkMans stack-trace@0.0.9
4305 verbose rebuildBundles stack-trace@0.0.9
4306 info lifecycle stack-trace@0.0.9
install: stack-trace@0.0.9install: no script for install, continuing4307 silly lifecycle stack-trace@0.0.9
4308 info lifecycle stack-trace@0.0.9
postinstall: stack-trace@0.0.9postinstall: no script for postinstall, continuing4309 silly lifecycle stack-trace@0.0.9
4310 info build /tmp/deployment/application/node_modules/winston-daily-rotate-file
4311 info lifecycle winston-daily-rotate-file@1.3.1
preinstall: winston-daily-rotate-file@1.3.1preinstall: no script for preinstall, continuing4312 silly lifecycle winston-daily-rotate-file@1.3.1
4313 info linkStuff winston-daily-rotate-file@1.3.1
4314 silly linkStuff winston-daily-rotate-file@1.3.1 has /tmp/deployment/application/node_modules as its parent node_modules
4315 verbose linkBins winston-daily-rotate-file@1.3.1
4316 verbose linkMans winston-daily-rotate-file@1.3.1
4317 verbose rebuildBundles winston-daily-rotate-file@1.3.1
4318 info lifecycle winston-daily-rotate-file@1.3.1
install: winston-daily-rotate-file@1.3.1install: no script for install, continuing4319 silly lifecycle winston-daily-rotate-file@1.3.1
4320 info lifecycle winston-daily-rotate-file@1.3.1
postinstall: winston-daily-rotate-file@1.3.1postinstall: no script for postinstall, continuing4321 silly lifecycle winston-daily-rotate-file@1.3.1
4322 info build /tmp/deployment/application/node_modules/bcrypt
4323 info lifecycle bcrypt@0.8.7
preinstall: bcrypt@0.8.7preinstall: no script for preinstall, continuing4324 silly lifecycle bcrypt@0.8.7
4325 info linkStuff bcrypt@0.8.7
4326 silly linkStuff bcrypt@0.8.7 has /tmp/deployment/application/node_modules as its parent node_modules
4327 verbose linkBins bcrypt@0.8.7
4328 verbose linkMans bcrypt@0.8.7
4329 verbose rebuildBundles bcrypt@0.8.7
4330 info lifecycle bcrypt@0.8.7
install: bcrypt@0.8.7install: unsafe-perm in lifecycle false4331 verbose lifecycle bcrypt@0.8.7
4332 verbose lifecycle bcrypt@0.8.7
install: PATH: /opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/lib/node_modules/npm/bin/node-gyp-bin:/tmp/deployment/application/node_modules/bcrypt/node_modules/.bin:/tmp/deployment/application/node_modules/.bin:/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin:/opt/elasticbeanstalk/lib/ruby/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bininstall: CWD: /tmp/deployment/application/node_modules/bcrypt4333 verbose lifecycle bcrypt@0.8.7
4334 silly lifecycle bcrypt@0.8.7
install: Args: [ '-c', 'node-gyp rebuild' ]install: Returned: code: 1 signal: null4335 silly lifecycle bcrypt@0.8.7
4336 info lifecycle bcrypt@0.8.7~install: Failed to exec install script
4337 verbose stack Error: bcrypt@0.8.7 install:
node-gyp rebuild4337 verbose stack Exit status 1
4337 verbose stack at EventEmitter. (/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
4337 verbose stack at emitTwo (events.js:106:13)
4337 verbose stack at EventEmitter.emit (events.js:191:7)
4337 verbose stack at ChildProcess. (/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/lib/node_modules/npm/lib/utils/spawn.js:40:14)
4337 verbose stack at emitTwo (events.js:106:13)
4337 verbose stack at ChildProcess.emit (events.js:191:7)
4337 verbose stack at maybeClose (internal/child_process.js:877:16)
4337 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
4338 verbose pkgid bcrypt@0.8.7
4339 verbose cwd /tmp/deployment/application
4340 error Linux 4.4.23-31.54.amzn1.x86_64
4341 error argv "/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/npm" "--production" "rebuild"
4342 error node v6.9.1
4343 error npm v4.0.1
4344 error code ELIFECYCLE
4345 error bcrypt@0.8.7 install:
node-gyp rebuild4345 error Exit status 1
4346 error Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'.
4346 error Make sure you have the latest version of node.js and npm installed.
4346 error If you do, this is most likely a problem with the bcrypt package,
4346 error not with npm itself.
4346 error Tell the author that this fails on your system:
4346 error node-gyp rebuild
4346 error You can get information on how to open an issue for this project with:
4346 error npm bugs bcrypt
4346 error Or if that isn't available, you can get their info via:
4346 error npm owner ls bcrypt
4346 error There is likely additional logging output above.
4347 verbose exit [ 1, true ]
/var/log/eb-activity.log
npm ERR! bcrypt@0.8.7 install:
node-gyp rebuildnpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /tmp/deployment/application/npm-debug.log
Running npm install: /opt/elasticbeanstalk/node-install/node-v6.9.1-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 695, in
main()
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 677, in main
node_version_manager.run_npm_install(options.app_path)
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 136, 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 180, in npm_install
raise e
subprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/npm', '--production', 'rebuild']' returned non-zero exit status 1 (ElasticBeanstalk::ExternalInvocationError)
caused by: + /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install
gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
gyp ERR! stack at Error (native)
gyp ERR! System Linux 4.4.23-31.54.amzn1.x86_64
gyp ERR! command "/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/deployment/application/node_modules/bcrypt
gyp ERR! node -v v6.9.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 4.4.23-31.54.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/npm" "--production" "rebuild"
npm ERR! node v6.9.1
npm ERR! npm v4.0.1
npm ERR! code ELIFECYCLE
npm ERR! bcrypt@0.8.7 install:
node-gyp rebuildnpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /tmp/deployment/application/npm-debug.log
Running npm install: /opt/elasticbeanstalk/node-install/node-v6.9.1-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 695, in
main()
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 677, in main
node_version_manager.run_npm_install(options.app_path)
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 136, 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 180, in npm_install
raise e
subprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/npm', '--production', 'rebuild']' returned non-zero exit status 1 (Executor::NonZeroExitStatus)
[2016-10-31T17:17:14.528Z] INFO [3420] - [Application update app-161031_181506@3/AppDeployStage0/AppDeployPreHook/50npm.sh] : Activity failed.
[2016-10-31T17:17:14.528Z] INFO [3420] - [Application update app-161031_181506@3/AppDeployStage0/AppDeployPreHook] : Activity failed.
[2016-10-31T17:17:14.529Z] INFO [3420] - [Application update app-161031_181506@3/AppDeployStage0] : Activity failed.
[2016-10-31T17:17:14.529Z] INFO [3420] - [Application update app-161031_181506@3] : Completed activity. Result:
Application update - Command CMD-AppDeploy failed
[2016-10-31T17:18:17.209Z] INFO [3676] - [CMD-TailLogs] : Starting activity...
[2016-10-31T17:18:17.209Z] INFO [3676] - [CMD-TailLogs/AddonsBefore] : Starting activity...
[2016-10-31T17:18:17.209Z] INFO [3676] - [CMD-TailLogs/AddonsBefore] : Completed activity.
[2016-10-31T17:18:17.210Z] INFO [3676] - [CMD-TailLogs/TailLogs] : Starting activity...
[2016-10-31T17:18:17.210Z] INFO [3676] - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity...
/var/log/eb-commandprocessor.log
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 695, in
main()
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 677, in main
node_version_manager.run_npm_install(options.app_path)
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 136, 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 180, in npm_install
raise e
subprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/npm', '--production', 'rebuild']' returned non-zero exit status 1 (ElasticBeanstalk::ExternalInvocationError)
caused by: + /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install
gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
gyp ERR! stack at Error (native)
gyp ERR! System Linux 4.4.23-31.54.amzn1.x86_64
gyp ERR! command "/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/deployment/application/node_modules/bcrypt
gyp ERR! node -v v6.9.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Linux 4.4.23-31.54.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/npm" "--production" "rebuild"
npm ERR! node v6.9.1
npm ERR! npm v4.0.1
npm ERR! code ELIFECYCLE
npm ERR! bcrypt@0.8.7 install:
node-gyp rebuildnpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /tmp/deployment/application/npm-debug.log
Running npm install: /opt/elasticbeanstalk/node-install/node-v6.9.1-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 695, in
main()
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 677, in main
node_version_manager.run_npm_install(options.app_path)
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 136, 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 180, in npm_install
raise e
subprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/npm', '--production', 'rebuild']' returned non-zero exit status 1 (Executor::NonZeroExitStatus)
`
przemyslaw-szurmak commentedon Nov 7, 2016
Dear all, I have the same problem as @Helmikku - tried with Parse 2.2.25-beta.1. working under "64bit Amazon Linux 2016.09 v3.1.0 running Node.js" on t2.micro. Any ideas how to resolve it ?
demsey2 commentedon Nov 7, 2016
I had to switch to *.small instance with more memory, that worked for me.
henrikperrochon commentedon Nov 7, 2016
Hello @przemyslaw-szurmak,
I "accidentally" managed to deploy it, even on t2.micro.
It failed when I installed Parse 2.2.23 locally first. Once I "eb deployed" without updating my local folder and it worked.
Maybe the error comes from the local "npm_modules" folder?
In the end, I have 2 files in my .ebextensions:
1 - commands.config (that update my environment)
2 - packages.config
And my package.json:
przemyslaw-szurmak commentedon Nov 21, 2016
@Helmikku hey, so finally i was able to do deployment with latest commit of parse-server (commit c8823f2) ! I did what you've suggested - removed npm_modules from my local repository and deployed without it. Now it works fine. Thanks for help !