Meteor Galaxy - Deploy fails, but the logs are all green?

As described above, I am trying to deploy my app to Meteor Galaxy. However, the deployment always fails. The app seems to be built, but no containers are able to start. It takes about 10 minutes until I get the messages:

Galaxy failed to deploy “the app”

and than

Galaxy stopped “the app” due to failed health checks

I have no clue where the problem is, because I can not figure out the problem in the logs. The logs are all “green”.

v0001
2017-09-20 21:44:47+02:00Building version 1.
v0001
2017-09-20 21:44:47+02:00Pulling base image.
v0001
2017-09-20 21:44:48+02:00Step 1 : FROM meteor/galaxy-app@sha256:4aba75ccda7a5ca0b5d21261b391c40b12c2ba0624e456503079d21a45a2aabc
v0001
2017-09-20 21:44:48+02:00 ---> 96a6209a32c4
v0001
2017-09-20 21:44:48+02:00Step 2 : RUN /bin/bash -x /app/setup.sh https://eu-west-1-galaxy-bundles.s3-eu-west-1.amazonaws.com/bundles/7nMTHwb66k5FQy7vS/20170920-194401/bundle.MzdHcGCqSKgcL7dsE.tgz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ73MF4INKDN2D76A%2F20170920%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170920T194447Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=087b69c5bae47105151575ae3c2b8eee4d1ac79eb702a432fa655c7a963c6061
v0001
2017-09-20 21:44:48+02:00 ---> [Warning] Your kernel does not support swap limit capabilities, memory limited without swap.
v0001
2017-09-20 21:44:48+02:00 ---> Running in b9554634a42d
v0001
2017-09-20 21:44:49+02:00+ set -ex
v0001
2017-09-20 21:44:49+02:00+ cd /app
v0001
2017-09-20 21:44:49+02:00+ tar xz -m
v0001
2017-09-20 21:44:49+02:00+ curl -sS 'https://eu-west-1-galaxy-bundles.s3-eu-west-1.amazonaws.com/bundles/7nMTHwb66k5FQy7vS/20170920-194401/bundle.MzdHcGCqSKgcL7dsE.tgz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ73MF4INKDN2D76A%2F20170920%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170920T194447Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=087b69c5bae47105151575ae3c2b8eee4d1ac79eb702a432fa655c7a963c6061'
v0001
2017-09-20 21:44:50+02:00+ cd /app/bundle
v0001
2017-09-20 21:44:50+02:00+ export NODE_VERSION
v0001
2017-09-20 21:44:50+02:00++ /app/select_node_version.sh
v0001
2017-09-20 21:44:50+02:00+ NODE_VERSION=4.8.4
v0001
2017-09-20 21:44:50+02:00+ /app/install_node.sh
v0001
2017-09-20 21:44:50+02:00Installing node version 4.8.4 to /node-v4.8.4-linux-x64
v0001
2017-09-20 21:44:50+02:00+ curl -sSLO https://nodejs.org/dist/v4.8.4/node-v4.8.4-linux-x64.tar.gz
v0001
2017-09-20 21:44:52+02:00+ tar -xzf node-v4.8.4-linux-x64.tar.gz -C /
v0001
2017-09-20 21:44:52+02:00+ rm node-v4.8.4-linux-x64.tar.gz
v0001
2017-09-20 21:44:52+02:00+ export PATH=/node-v4.8.4-linux-x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
v0001
2017-09-20 21:44:52+02:00+ PATH=/node-v4.8.4-linux-x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
v0001
2017-09-20 21:44:52+02:00++ /app/select_npm_version.sh
v0001
2017-09-20 21:44:52+02:00+ npm_version=4.6.1
v0001
2017-09-20 21:44:52+02:00+ npm -g install npm@4.6.1
v0001
2017-09-20 21:44:59+02:00/node-v4.8.4-linux-x64/bin/npm -> /node-v4.8.4-linux-x64/lib/node_modules/npm/bin/npm-cli.js
v0001
2017-09-20 21:45:00+02:00npm@4.6.1 /node-v4.8.4-linux-x64/lib/node_modules/npm
v0001
2017-09-20 21:45:00+02:00+ pushd programs/server
v0001
2017-09-20 21:45:00+02:00/app/bundle/programs/server /app/bundle
v0001
2017-09-20 21:45:00+02:00+ npm install --unsafe-perm
v0001
2017-09-20 21:45:04+02:00
v0001
2017-09-20 21:45:04+02:00> fibers@1.0.15 install /app/bundle/programs/server/node_modules/fibers
v0001
2017-09-20 21:45:04+02:00> node build.js || nodejs build.js
v0001
2017-09-20 21:45:04+02:00
v0001
2017-09-20 21:45:04+02:00`linux-x64-46` exists; testing
v0001
2017-09-20 21:45:04+02:00Binary is fine; exiting
v0001
2017-09-20 21:45:04+02:00
v0001
2017-09-20 21:45:04+02:00> meteor-dev-bundle@0.0.0 install /app/bundle/programs/server
v0001
2017-09-20 21:45:04+02:00> node npm-rebuild.js
v0001
2017-09-20 21:45:04+02:00
v0001
2017-09-20 21:45:05+02:00
v0001
2017-09-20 21:45:05+02:00> bcrypt@1.0.2 install /app/bundle/programs/server/npm/node_modules/bcrypt
v0001
2017-09-20 21:45:05+02:00> node-pre-gyp install --fallback-to-build
v0001
2017-09-20 21:45:05+02:00
v0001
2017-09-20 21:45:07+02:00[bcrypt] Success: "/app/bundle/programs/server/npm/node_modules/bcrypt/lib/binding/bcrypt_lib.node" is installed via remote
v0001
2017-09-20 21:45:07+02:00npm ERR! path /app/bundle/programs/server/npm/node_modules/sshpk/bin\sshpk-conv
v0001
2017-09-20 21:45:07+02:00npm ERR! code ENOENT
v0001
2017-09-20 21:45:07+02:00npm ERR! errno -2
v0001
2017-09-20 21:45:07+02:00npm ERR! syscall chmod
v0001
2017-09-20 21:45:07+02:00npm ERR! enoent ENOENT: no such file or directory, chmod '/app/bundle/programs/server/npm/node_modules/sshpk/bin\sshpk-conv'
v0001
2017-09-20 21:45:07+02:00npm ERR! enoent This is most likely not a problem with npm itself
v0001
2017-09-20 21:45:07+02:00npm ERR! enoent and is related to npm not being able to find a file.
v0001
2017-09-20 21:45:07+02:00npm ERR! enoent
v0001
2017-09-20 21:45:07+02:00
v0001
2017-09-20 21:45:07+02:00npm ERR! A complete log of this run can be found in:
v0001
2017-09-20 21:45:07+02:00npm ERR! /root/.npm/_logs/2017-09-20T19_45_07_887Z-debug.log
v0001
2017-09-20 21:45:07+02:00npm WARN meteor-dev-bundle@0.0.0 No description
v0001
2017-09-20 21:45:07+02:00npm WARN meteor-dev-bundle@0.0.0 No repository field.
v0001
2017-09-20 21:45:07+02:00npm WARN meteor-dev-bundle@0.0.0 No license field.
v0001
2017-09-20 21:45:07+02:00npm ERR! code ELIFECYCLE
v0001
2017-09-20 21:45:07+02:00npm ERR! errno 254
v0001
2017-09-20 21:45:07+02:00npm ERR! meteor-dev-bundle@0.0.0 install: `node npm-rebuild.js`
v0001
2017-09-20 21:45:07+02:00npm ERR! Exit status 254
v0001
2017-09-20 21:45:07+02:00npm ERR!
v0001
2017-09-20 21:45:07+02:00npm ERR! Failed at the meteor-dev-bundle@0.0.0 install script.
v0001
2017-09-20 21:45:07+02:00npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
v0001
2017-09-20 21:45:07+02:00
v0001
2017-09-20 21:45:07+02:00npm ERR! A complete log of this run can be found in:
v0001
2017-09-20 21:45:07+02:00npm ERR! /root/.npm/_logs/2017-09-20T19_45_07_921Z-debug.log
v0001
2017-09-20 21:45:08+02:00Removing intermediate container b9554634a42d
v0001
2017-09-20 21:45:08+02:00Successfully built version 1.

I would appreciate anything that helps, thanks!

It’s hard to tell exactly what’s going on based on the logs, but any time I’ve run into these types of failed deployments, it’s because I’ve been working on different branches with different npm packages/versions.

From experience, I’ve found that deleting your local node_modules directory, and running meteor npm install --save to regenerate the folder, and then trying to deploy solves the issue.

1 Like

Many thanks! This actually solved another issue, which came up, after I solved my described problem :smiley:

I solved the problem by using this post:
Changing the backslash in myapp/node_modules/sshpk

Although this post is about a mup deployment, the same issue shows up by using Galaxy for a deployment via windows.

Just fyi, the sshpk problem will be fixed in Meteor 1.6 thanks to an update in npm itself!

2 Likes