parse-server: v2.2.4 Deploy failing on Amazon Elastic Beanstalk
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
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 11
- Comments: 56 (23 by maintainers)
2.2.4 works for me (multiple deployments so far).
This is my setup:
It was failing for me first because the machine didn’t have enough memory (t2.micro), switching to t2.small solved that.
@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:
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.
For that I would need to have a blog first 😉 It took me almost a full miserable day until I figured out that all it was purely a memory issue, didn’t want anyone else lose hair over this. Just glad I could share. 😃
so that’s great! I’m glad that’s fixed for you!
@tanmays @markuswinkler now, what would be the most awesome thing ever would be to write a little blog article 😃
Looks like it needs more than 1GB during install.
Found this in the install log, maybe this helps:
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.3 4271 silly lifecycle cycle@1.0.3~install: no script for install, continuing 4272 info lifecycle cycle@1.0.3~postinstall: cycle@1.0.3 4273 silly lifecycle cycle@1.0.3~postinstall: no script for postinstall, continuing 4274 info build /tmp/deployment/application/node_modules/eyes 4275 info lifecycle eyes@0.1.8~preinstall: eyes@0.1.8 4276 silly lifecycle eyes@0.1.8~preinstall: no script for preinstall, continuing 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.8 4283 silly lifecycle eyes@0.1.8~install: no script for install, continuing 4284 info lifecycle eyes@0.1.8~postinstall: eyes@0.1.8 4285 silly lifecycle eyes@0.1.8~postinstall: no script for postinstall, continuing 4286 info build /tmp/deployment/application/node_modules/pkginfo 4287 info lifecycle pkginfo@0.3.1~preinstall: pkginfo@0.3.1 4288 silly lifecycle pkginfo@0.3.1~preinstall: no script for preinstall, continuing 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.1 4295 silly lifecycle pkginfo@0.3.1~install: no script for install, continuing 4296 info lifecycle pkginfo@0.3.1~postinstall: pkginfo@0.3.1 4297 silly lifecycle pkginfo@0.3.1~postinstall: no script for postinstall, continuing 4298 info build /tmp/deployment/application/node_modules/stack-trace 4299 info lifecycle stack-trace@0.0.9~preinstall: stack-trace@0.0.9 4300 silly lifecycle stack-trace@0.0.9~preinstall: no script for preinstall, continuing 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.9 4307 silly lifecycle stack-trace@0.0.9~install: no script for install, continuing 4308 info lifecycle stack-trace@0.0.9~postinstall: stack-trace@0.0.9 4309 silly lifecycle stack-trace@0.0.9~postinstall: no script for postinstall, continuing 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.1 4312 silly lifecycle winston-daily-rotate-file@1.3.1~preinstall: no script for preinstall, continuing 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.1 4319 silly lifecycle winston-daily-rotate-file@1.3.1~install: no script for install, continuing 4320 info lifecycle winston-daily-rotate-file@1.3.1~postinstall: winston-daily-rotate-file@1.3.1 4321 silly lifecycle winston-daily-rotate-file@1.3.1~postinstall: no script for postinstall, continuing 4322 info build /tmp/deployment/application/node_modules/bcrypt 4323 info lifecycle bcrypt@0.8.7~preinstall: bcrypt@0.8.7 4324 silly lifecycle bcrypt@0.8.7~preinstall: no script for preinstall, continuing 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.7 4331 verbose lifecycle bcrypt@0.8.7~install: unsafe-perm in lifecycle false 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:/bin 4333 verbose lifecycle bcrypt@0.8.7~install: CWD: /tmp/deployment/application/node_modules/bcrypt 4334 silly lifecycle bcrypt@0.8.7~install: Args: [ ‘-c’, ‘node-gyp rebuild’ ] 4335 silly lifecycle bcrypt@0.8.7~install: Returned: code: 1 signal: null 4336 info lifecycle bcrypt@0.8.7~install: Failed to exec install script 4337 verbose stack Error: bcrypt@0.8.7 install:
node-gyp rebuild
4337 verbose stack Exit status 1 4337 verbose stack at EventEmitter.<anonymous> (/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.<anonymous> (/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 rebuild
4345 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 rebuild
npm 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 <module> 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 rebuild
npm 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 <module> 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 <module> 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 rebuild
npm 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 <module> 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)
`
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!
Update: Spoke too soon, thankfully the memory peaked at about 1.07Gb and never went above that. Average was about 900mb for the 7 deployments I tried.
@flovilmart here are the packages I’ve specified in .ebextensions config file. Try adding them and then deploy.
If you add gcc-c++.x86_64 to the yum packages elastic beanstalk config, does it help?