Skip to content

v2.2.4 Deploy failing on Amazon Elastic Beanstalk #1276

Closed

Description

@tanmays

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

Activity

  1. tanmays commented on Apr 1, 2016

    @tanmays
    Author

    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.

  2. flovilmart commented on Apr 2, 2016

    @flovilmart
    Contributor

    Are you running EB over CentOS 6? Maybe try changing the distro to debian, ubuntu or something else if you can.

  3. tanmays commented on Apr 2, 2016

    @tanmays
    Author

    @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-adapter and 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.

  4. flovilmart commented on Apr 2, 2016

    @flovilmart
    Contributor

    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.

  5. tanmays commented on Apr 2, 2016

    @tanmays
    Author

    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.

  6. flovilmart commented on Apr 2, 2016

    @flovilmart
    Contributor

    They have been all externalizer already. We just kept them in as this is a breaking change, not backwards compatible.

  7. tanmays commented on Apr 2, 2016

    @tanmays
    Author

    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.

  8. flovilmart commented on Apr 2, 2016

    @flovilmart
    Contributor

    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

  9. tanmays commented on Apr 2, 2016

    @tanmays
    Author

    Tried to deploy again and it failed. Here are the logs

    -------------------------------------
    /var/log/eb-activity.log
    -------------------------------------
        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.1 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
        CXX(target) Release/obj.target/kerberos/lib/worker.o
        CC(target) Release/obj.target/kerberos/lib/kerberosgss.o
      ../lib/kerberosgss.c:36:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
       #pragma clang diagnostic push
       ^
      ../lib/kerberosgss.c:37:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
       #pragma clang diagnostic ignored "-Wdeprecated-declarations"
       ^
      ../lib/kerberosgss.c: In function ‘authenticate_gss_client_wrap’:
      ../lib/kerberosgss.c:377:19: warning: variable ‘server_conf_flags’ set but not used [-Wunused-but-set-variable]
         char buf[4096], server_conf_flags;
                         ^
      ../lib/kerberosgss.c: At top level:
      ../lib/kerberosgss.c:945:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
       #pragma clang diagnostic pop
       ^
        CC(target) Release/obj.target/kerberos/lib/base64.o
        CXX(target) Release/obj.target/kerberos/lib/kerberos_context.o
        SOLINK_MODULE(target) Release/obj.target/kerberos.node
        COPY Release/kerberos.node
      make: Leaving directory `/tmp/deployment/application/node_modules/kerberos/build'
      npm WARN optional dep failed, continuing fsevents@1.0.11
    
      > 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.1 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-04-02T18:11:02.352Z] INFO  [4956]  - [Application update/AppDeployStage0/AppDeployPreHook/50npm.sh] : Activity failed.
    [2016-04-02T18:11:02.352Z] INFO  [4956]  - [Application update/AppDeployStage0/AppDeployPreHook] : Activity failed.
    [2016-04-02T18:11:02.352Z] INFO  [4956]  - [Application update/AppDeployStage0] : Activity failed.
    [2016-04-02T18:11:02.356Z] INFO  [4956]  - [Application update] : Completed activity. Result:
      Application update - Command CMD-AppDeploy failed
    
    
    -------------------------------------
    /var/log/eb-commandprocessor.log
    -------------------------------------
          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
        CXX(target) Release/obj.target/kerberos/lib/worker.o
        CC(target) Release/obj.target/kerberos/lib/kerberosgss.o
      ../lib/kerberosgss.c:36:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
       #pragma clang diagnostic push
       ^
      ../lib/kerberosgss.c:37:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
       #pragma clang diagnostic ignored "-Wdeprecated-declarations"
       ^
      ../lib/kerberosgss.c: In function ‘authenticate_gss_client_wrap’:
      ../lib/kerberosgss.c:377:19: warning: variable ‘server_conf_flags’ set but not used [-Wunused-but-set-variable]
         char buf[4096], server_conf_flags;
                         ^
      ../lib/kerberosgss.c: At top level:
      ../lib/kerberosgss.c:945:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
       #pragma clang diagnostic pop
       ^
        CC(target) Release/obj.target/kerberos/lib/base64.o
        CXX(target) Release/obj.target/kerberos/lib/kerberos_context.o
        SOLINK_MODULE(target) Release/obj.target/kerberos.node
        COPY Release/kerberos.node
      make: Leaving directory `/tmp/deployment/application/node_modules/kerberos/build'
      npm WARN optional dep failed, continuing fsevents@1.0.11
    
      > 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.1 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-04-02T18:11:02.355Z] ERROR [4956]  : Command CMD-AppDeploy failed!
    [2016-04-02T18:11:02.470Z] INFO  [4956]  : Command processor returning results: 
    {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"(TRUNCATED)...\"/opt/elasticbeanstalk/containerfiles/ebnode.py\", line 166, in npm_install\n    raise e\nsubprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/bin/npm', '--production', 'install']' returned non-zero exit status 1. \nHook /opt/elasticbeanstalk/hooks/appdeploy/pre/50npm.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI","returncode":1,"events":[{"msg":"Failed to run npm install. Snapshot logs for more details.","severity":"ERROR","timestamp":1459620662469}]}],"truncated":"true"}
    

    I'm afraid we have no choice but to make parse-server-gcs-adapter optional. I'm sure a lot of people would be using AWS EB for its ease of use and price-to-feature benefit.

  10. flovilmart commented on Apr 2, 2016

    @flovilmart
    Contributor

    If you add gcc-c++.x86_64 to the yum packages elastic beanstalk config, does it help?

  11. tanmays commented on Apr 2, 2016

    @tanmays
    Author

    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:

    packages:
      yum:
        gcc: []
        make: []
        openssl-devel: []
        libxml2: []
        libxml2-devel: []
        krb5-devel: []
    
    
  12. flovilmart commented on Apr 2, 2016

    @flovilmart
    Contributor

    node needs a c++ compiler too... I'm testing now. that would be gcc-c++.noarch or gcc-c++

  13. 29 remaining items

  14. markuswinkler commented on Apr 2, 2016

    @markuswinkler

    well, if there is any good time to make a breaking change for the greater good it is now I guess.

  15. flovilmart commented on Apr 2, 2016

    @flovilmart
    Contributor

    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!

  16. tanmays commented on Apr 2, 2016

    @tanmays
    Author

    @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.

  17. dmennis commented on Apr 6, 2016

    @dmennis

    @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:

    packages:
      yum:
        krb5-devel: []
    

    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:

    1. $ mkdir parseserver
    2. $ cd parseserver
    3. $ eb init //choose region and your application
    4. $ eb labs download //this will download your running application into the root of this folder
    5. Modify the .ebextensions/app.config file and apply the suggested changes, save.
    6. $ eb deploy
      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.

  18. flovilmart commented on Apr 6, 2016

    @flovilmart
    Contributor

    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.

  19. markuswinkler commented on Apr 7, 2016

    @markuswinkler

    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.

  20. tanmays commented on Apr 7, 2016

    @tanmays
    Author

    @markuswinkler looks like 'parse-server-gcs-adapter' was removed after 2.2.6. We probably have to wait for 2.2.7.

  21. markuswinkler commented on Apr 7, 2016

    @markuswinkler

    yes, but that one should actually reduce the memory foot print (gcs is used for google cloud storage), but alas, still fails.

  22. markuswinkler commented on Apr 18, 2016

    @markuswinkler

    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.

  23. henrikperrochon commented on Oct 31, 2016

    @henrikperrochon

    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.3install: cycle@1.0.3
    4271 silly lifecycle cycle@1.0.3
    install: no script for install, continuing
    4272 info lifecycle cycle@1.0.3postinstall: 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.8preinstall: 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.8install: eyes@0.1.8
    4283 silly lifecycle eyes@0.1.8
    install: no script for install, continuing
    4284 info lifecycle eyes@0.1.8postinstall: 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.1preinstall: 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.1install: pkginfo@0.3.1
    4295 silly lifecycle pkginfo@0.3.1
    install: no script for install, continuing
    4296 info lifecycle pkginfo@0.3.1postinstall: 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.9preinstall: 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.9install: 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.9postinstall: 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.1preinstall: 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.1install: 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.1postinstall: 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.7preinstall: 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.7install: bcrypt@0.8.7
    4331 verbose lifecycle bcrypt@0.8.7
    install: unsafe-perm in lifecycle false
    4332 verbose lifecycle bcrypt@0.8.7install: 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.7install: 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. (/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 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
    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

    pg-promise@5.3.3 postinstall /tmp/deployment/application/node_modules/pg-promise
    node install.js

    bcrypt@0.8.7 install /tmp/deployment/application/node_modules/bcrypt
    node-gyp rebuild

    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
    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

    pg-promise@5.3.3 postinstall /tmp/deployment/application/node_modules/pg-promise
    node install.js

    bcrypt@0.8.7 install /tmp/deployment/application/node_modules/bcrypt
    node-gyp rebuild

    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
    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)

    `

  24. przemyslaw-szurmak commented on Nov 7, 2016

    @przemyslaw-szurmak

    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 ?

  25. demsey2 commented on Nov 7, 2016

    @demsey2

    I had to switch to *.small instance with more memory, that worked for me.

  26. henrikperrochon commented on Nov 7, 2016

    @henrikperrochon

    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)

    commands:
      update:
        command: PATH=$PATH:/opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/ && npm update -g npm
        cwd: /opt/elasticbeanstalk/node-install/node-v6.9.1-linux-x64/bin/
    

    2 - packages.config

    packages:
      yum:
        krb5-devel: []
    

    And my package.json:

    {
        "name": "xxxxxxx",
        "version": "X.X.X",
        "description": "XXXXXXX",
        "main": "index.js",
        "author": "XXXXXXX",
        "license": "ISC",
        "dependencies": {
            "ejs": "2.5.2",
            "express": "4.14.0",
            "node-mailjet": "3.0.5",
            "parse-server": "2.2.23"
        },
        "engines": {
            "node": ">=4.5"
        },
        "repository": {
            "type": "git",
            "url": "https://XXXXXXX@XXXXXXX.XXXXXXX/XXXXXXX/XXXXXXX/XXXXXXX.git"
        },
        "scripts": {
            "start": "node index.js"
        }
    }
    
  27. przemyslaw-szurmak commented on Nov 21, 2016

    @przemyslaw-szurmak

    @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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions