Meteor deploy Bcrypt error Invoking deployment process - meteor

I want to deploy a meteor app (v1.2) to digital ocean. I am using MUP with this tutorial.
When I run mup deploy verbose I get this error (see below). I tried this as well being how i am on linux. meteor build myAppHere --architecture os.linux.x86_64 . But I still get the error.
Any ideas?
Started TaskList: Deploy app 'myAppHere' (linux)
[162.243.58.84] - Uploading bundle
[162.243.58.84] - Uploading bundle: SUCCESS
[162.243.58.84] - Setting up Environment Variables
[162.243.58.84] - Setting up Environment Variables: SUCCESS
[162.243.58.84] - Invoking deployment process
[162.243.58.84] x Invoking deployment process: FAILED
-----------------------------------STDERR-----------------------------------
ile=node.lib',
gyp info spawn args '-Dmodule_root_dir=/opt/myAppHere/tmp/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gyp info ok
npm WARN package.json meteor-dev-bundle#0.0.0 No description
npm WARN package.json meteor-dev-bundle#0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle#0.0.0 No README data
stop: Unknown instance:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 81: Connection refused
Latest deployment failed! Reverted back to the previous version.

What is your node version? Most probably installed nodejs version is old. You can try with "nodeVersion": "0.10.40" in your mup.json

Related

kubernetes nginx upstream server as service not found

These are my yaml files referenced by here (kubernetes.io/docs)
deployment gists
And I use command kubectl apply -f backend-deployment.yaml -f frontend-configmap.yaml -f frontend-deployment.yaml
Backend were launched successfully, but Frontend occured error.
[emerg] 1#1: host not found in upstream "backend-service" in /etc/nginx/conf.d/nginx.conf:2
#nginx: [emerg] host not found in upstream "backend-service" in /etc/nginx/conf.d/nginx.conf:2
Even if 'backend-service' is declared, nginx couldn't recognize it.
Command nslookup backend-service result is:
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find backend-service: SERVFAIL
What am I missing?
I have gotten closer to the issue/solution.
First of all, you if the images in your supplied answer are correct, you are running nginx in your backend deployment and node-js server on your frontend deployment. This is a mistake.
after changing the images frontend is running (as expected) but backend pod is crashing.
However, the backend pod is successfully resolving the mysql-service to its internal clusterIp and I appear to have wrong authentication setup.
`> server#1.0.0 start /usr/src/app
> node backend.js
(node:18) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:18) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
(node:18) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency
(node:18) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency
listening on 3000
events.js:292
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED 10.100.77.32:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1142:16)
--------------------
at Protocol._enqueue (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at Connection.connect (/usr/src/app/node_modules/mysql/lib/Connection.js:116:18)
at Object.<anonymous> (/usr/src/app/backend.js:58:12)
at Module._compile (internal/modules/cjs/loader.js:1185:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
at Module.load (internal/modules/cjs/loader.js:1034:32)
at Function.Module._load (internal/modules/cjs/loader.js:923:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
Emitted 'error' event on Connection instance at:
at Connection._handleProtocolError (/usr/src/app/node_modules/mysql/lib/Connection.js:423:8)
at Protocol.emit (events.js:315:20)
at Protocol._delegateError (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:398:10)
at Handshake.<anonymous> (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:153:12)
at Handshake.emit (events.js:315:20)
at Handshake.Sequence.end (/usr/src/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:78:12)
at Protocol.handleNetworkError (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:369:14)
at Connection._handleNetworkError (/usr/src/app/node_modules/mysql/lib/Connection.js:418:18)
at Socket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:96:8)
at emitErrorCloseNT (internal/streams/destroy.js:68:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '10.100.77.32',
port: 3306,
> node backend.js
fatal: true
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! server#1.0.0 start: `node backend.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the server#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-07-21T08_46_32_833Z-debug.log`
if you look at the log. it says it tries to connect to 10.100.77.32:3306 and the output of kubectl get svc is the following mysql-service ClusterIP 10.100.77.32 <none> 3306/TCP 17m
with the matching ip of my service.
kubectl get endpoints shows that the mysql-service has indeed found an endpoint:
mysql-service ClusterIP 10.100.77.32 <none> 3306/TCP 17m
and here is additional log information showing that the authentication mechanism of your nodejs application appearently is not working for the mysql pod.
Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at Handshake.Sequence._packetToError (/usr/src/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
at Handshake.ErrorPacket (/usr/src/app/node_modules/mysql/lib/protocol/sequences/Handshake.js:123:18)
at Protocol._parsePacket (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:291:23)
at Parser._parsePacket (/usr/src/app/node_modules/mysql/lib/protocol/Parser.js:433:10)
at Parser.write (/usr/src/app/node_modules/mysql/lib/protocol/Parser.js:43:10)
at Protocol.write (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:38:16)
at Socket.<anonymous> (/usr/src/app/node_modules/mysql/lib/Connection.js:88:28)
at Socket.<anonymous> (/usr/src/app/node_modules/mysql/lib/Connection.js:526:10)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:296:12)
at readableAddChunk (_stream_readable.js:272:9)
at Socket.Readable.push (_stream_readable.js:213:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
--------------------
at Protocol._enqueue (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at Connection.connect (/usr/src/app/node_modules/mysql/lib/Connection.js:116:18)
at Object.<anonymous> (/usr/src/app/backend.js:58:12)
at Module._compile (internal/modules/cjs/loader.js:1185:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
at Module.load (internal/modules/cjs/loader.js:1034:32)
at Function.Module._load (internal/modules/cjs/loader.js:923:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
Emitted 'error' event on Connection instance at:
at Connection._handleProtocolError (/usr/src/app/node_modules/mysql/lib/Connection.js:423:8)
at Protocol.emit (events.js:315:20)
at Protocol._delegateError (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:398:10)
at Handshake.<anonymous> (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:153:12)
at Handshake.emit (events.js:315:20)
at Handshake.Sequence.end (/usr/src/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:78:12)
at Handshake.ErrorPacket (/usr/src/app/node_modules/mysql/lib/protocol/sequences/Handshake.js:125:8)
at Protocol._parsePacket (/usr/src/app/node_modules/mysql/lib/protocol/Protocol.js:291:23)
[... lines matching original stack trace ...]
at readableAddChunk (_stream_readable.js:272:9) {
code: 'ER_NOT_SUPPORTED_AUTH_MODE',
errno: 1251,
sqlMessage: 'Client does not support authentication protocol requested by server; consider upgrading MySQL client',
sqlState: '08004',
fatal: true
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! server#1.0.0 start: `node backend.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the server#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-07-21T08_55_22_133Z-debug.log
However, with the changes suggest at the beginning of the answer the issues around resolving the service name and communicating inside of kubernetes should be resolved.
backend-deployment image : bateaux/test-nginx
frontend-deployment image : bateaux/test-node-server
When deploy backend-deployment, remove [livenessProbe, readinessProbe].
Because node.js express server use #cloudnative/health-connect To readinessProbe, so call PingCheck(worker node ip).
Wow....I found solution for getaddrinfo EAI_AGAIN mysql-service.
I think if network can't find service, there is error in dns.
kubectl logs --namespace=kube-system -l k8s-app=kube-dns
Result of command is gist.
So...I finally found this link about kubernetes coredns.
By belphegor's answer, it works restart coredns.
Although, there is new error Client does not support authentication protocol requested by server; consider upgrading MySQL client, but i think to solve it is easier than dns error. hhhhhhhhhhhhhhhh

Grisome build succeeds locally but fails on AWS Amplify

I have a Gridsome site that I'm trying to deploy to AWS Amplify.
The site builds fine and with no errors locally with gridsome build, however on AWS Amplify, it fails.
I initially thought the error was related to a non-SSR component I was using that required <ClientOnly> tags, as this was throwing warnings in my local build. However, I've since removed that component and the issue persists.
I also thought the issue may be due to some outdated dependencies being required by packages related to webpack, but after several hours of trying to resolve these, I'm relatively confident this is not the case.
I don't quite understand the error log, but I think the issue may be related to the large number of images on my website, and AWS Amplify running out of memory (ENOMEM) while processing them. I haven't been able to find a way to increase the memory allocation for AWS Amplify, if this is even the cause.
The AWS Amplify log provides the following information:
2020-04-23T14:21:23.331Z [WARNING]: Gridsome v0.7.14
2020-04-23T14:21:23.867Z [WARNING]: Initializing plugins...
2020-04-23T14:21:24.053Z [WARNING]: Load sources - 0.1s
2020-04-23T14:21:24.166Z [WARNING]: Create GraphQL schema - 0.11s
2020-04-23T14:21:24.200Z [WARNING]: Create pages and templates - 0.03s
2020-04-23T14:21:24.224Z [WARNING]: Generate temporary code - 0.02s
2020-04-23T14:21:24.224Z [WARNING]: Bootstrap finish - 0.89s
2020-04-23T14:21:24.226Z [WARNING]: Compiling assets...
2020-04-23T14:28:43.461Z [WARNING]: Compile assets - 439.23s
2020-04-23T14:28:43.487Z [WARNING]: Execute GraphQL (14 queries) - 0.03s
2020-04-23T14:28:43.492Z [WARNING]: Write out page data (14 files) - 0s
2020-04-23T14:28:45.196Z [WARNING]: Render HTML (14 files) - 1.7s
2020-04-23T14:28:45.198Z [WARNING]: Process files (0 files) - 0s
2020-04-23T14:28:45.563Z [INFO]: [2K
2020-04-23T14:28:45.563Z [INFO]: [1GProcessing images (7675 images) - 0%
2020-04-23T14:28:47.487Z [INFO]: [2K
2020-04-23T14:28:47.489Z [INFO]: [1GProcessing images (7675 images) - 0%
2020-04-23T14:28:47.579Z [INFO]: [2K[1G
2020-04-23T14:28:47.579Z [INFO]: Processing images (7675 images) - 1%
2020-04-23T14:28:48.834Z [INFO]: [2K[1GProcessing images (7675 images) - 1%
...
2020-04-23T14:33:25.168Z [INFO]: [2K[1GProcessing images (7675 images) - 41%
2020-04-23T14:33:26.901Z [WARNING]: internal/child_process.js:366
throw errnoException(err, 'spawn');
^
Error: spawn ENOMEM
at ChildProcess.spawn (internal/child_process.js:366:11)
at spawn (child_process.js:551:9)
at Object.fork (child_process.js:113:10)
at ChildProcessWorker.initialize (/codebuild/output/src926123643/src/website/node_modules/jest-worker/build/workers/ChildProcessWorker.js:105:44)
at ChildProcessWorker.onExit (/codebuild/output/src926123643/src/website/node_modules/jest-worker/build/workers/ChildProcessWorker.js:204:12)
at ChildProcess.emit (events.js:198:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
2020-04-23T14:33:27.254Z [WARNING]: npm
2020-04-23T14:33:27.254Z [WARNING]: ERR! code ELIFECYCLE
npm ERR! errno 1
2020-04-23T14:33:27.255Z [WARNING]: npm
2020-04-23T14:33:27.259Z [WARNING]: ERR! website# build: `gridsome build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the website# build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-04-23T14:33:27.270Z [WARNING]:
2020-04-23T14:33:27.270Z [WARNING]: npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-04-23T14_33_27_259Z-debug.log
2020-04-23T14:33:27.270Z [HELP]: Outputting the npm debug log
0 info it worked if it ends with ok
1 verbose cli [ '/root/.nvm/versions/node/v10.16.0/bin/node',
1 verbose cli '/root/.nvm/versions/node/v10.16.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm#6.9.0
3 info using node#v10.16.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle website#~prebuild: website#
6 info lifecycle website#~build: website#
7 verbose lifecycle website#~build: unsafe-perm in lifecycle true
8 verbose lifecycle website#~build: PATH: /root/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/codebuild/output/src926123643/src/website/node_modules/.bin:/usr/local/rvm/gems/ruby-2.4.6/bin:/usr/local/rvm/gems/ruby-2.4.6#global/bin:/usr/local/rvm/rubies/ruby-2.4.6/bin:/usr/local/rvm/bin:/root/.yarn/bin:/root/.config/yarn/global/node_modules/.bin:/root/.nvm/versions/node/v10.16.0/bin:/root/.local/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle website#~build: CWD: /codebuild/output/src926123643/src/website
10 silly lifecycle website#~build: Args: [ '-c', 'gridsome build' ]
11 silly lifecycle website#~build: Returned: code: 1 signal: null
12 info lifecycle website#~build: Failed to exec build script
13 verbose stack Error: website# build: `gridsome build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/root/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/root/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid website#
15 verbose cwd /codebuild/output/src926123643/src/website
16 verbose Linux 4.14.165-103.209.amzn1.x86_64
17 verbose argv "/root/.nvm/versions/node/v10.16.0/bin/node" "/root/.nvm/versions/node/v10.16.0/bin/npm" "run" "build"
18 verbose node v10.16.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error website# build: `gridsome build`
22 error Exit status 1
23 error Failed at the website# build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
2020-04-23T14:33:27.291Z [ERROR]: !!! Build failed
2020-04-23T14:33:27.292Z [ERROR]: !!! Non-Zero Exit Code detected
2020-04-23T14:33:27.292Z [INFO]: # Starting environment caching...
2020-04-23T14:33:27.296Z [INFO]: # Environment caching completed
Terminating logging...
My package.json contains the following:
{
"name": "website",
"private": true,
"scripts": {
"build": "gridsome build",
"develop": "gridsome develop",
"explore": "gridsome explore"
},
"dependencies": {
"#gridsome/source-filesystem": "^0.6.2",
"#gridsome/transformer-remark": "^0.5.0",
"gridsome": "^0.7.14",
"gridsome-plugin-gtm": "^0.1.1",
"marked": "^0.8.0",
"vue-burger-menu": "^2.0.4",
"vue-easy-lightbox": "^0.11.0",
"vue-slick-carousel": "^1.0.5"
},
"devDependencies": {
"node-sass": "^4.13.1",
"normalize.css": "^8.0.1",
"sass-loader": "^8.0.2",
"style-resources-loader": "^1.3.3"
},
"browserslist": [
"defaults"
]
}
I'd be grateful for any help in trying to resolve this issue.
Thank you in advance.
UPDATE #1
I am now quite sure this is due to the large number of images being processed on my site via <g-image>.
I decided to try to build using AWS CodeBuild to see if I got any more information. It failed too, but did give me some more helpful errors.
When I removed all but a handful of images, the build works. Once I get above ~300 images being displayed at different dimensions, things start to fail. The error messages:
Process files (0 files) - 0s
...
[2K·[1GProcessing images (4671 images) - 58%Error: Failed to process image src/assets/media/jobs/1.jpg. spawn ENOMEM
at pMap.concurrency (/codebuild/output/src132267748/src/github.com/xxxxx/website/node_modules/gridsome/lib/workers/image-processor.js:113:13)
(sharp:31795): GLib-CRITICAL **: 04:50:22.507: g_hash_table_lookup: assertion 'hash_table != NULL' failed
(sharp:31795): GLib-CRITICAL **: 04:50:22.516: g_hash_table_lookup: assertion 'hash_table != NULL' failed
(sharp:31795): GLib-CRITICAL **: 04:50:22.516: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed
(sharp:31795): GLib-CRITICAL **: 04:50:22.516: g_hash_table_lookup: assertion 'hash_table != NULL' failed
So, yeah, I guess this is a Gridsome bug?
UPDATE #2
Adding node-options=--max_old_space_size=4096 in the .npmrc file causes the build to hang and eventually timeout.
UPDATE #3
Batch resized images so the max width/height was 2000px (effective max file size of ~2MB). Builds are now succeeding.
Hopefully someone can assist with a solution so we can build from the source files without pre-processing images.
This appears to be a bug where Gridsome runs out of memory processing a large number of large files.
This workaround preprocesses all of the image files in order to reduce the load of each image before Gridsome tries to process them.
Preprocess images with Sharp
// image-preprocessor.js
const fs = require("fs");
const path = require("path");
const sharp = require("sharp");
const dirPath = "./src/assets/";
const maxWidth = 2000;
const maxHeight = 2000;
const getAllFiles = function(dirPath, arrayOfFiles) {
files = fs.readdirSync(dirPath);
arrayOfFiles = arrayOfFiles || [];
files.forEach(function(file) {
if (fs.statSync(`${dirPath}/${file}`).isDirectory()) {
arrayOfFiles = getAllFiles(`${dirPath}/${file}`, arrayOfFiles);
} else {
arrayOfFiles.push(path.join(__dirname, dirPath, "/", file));
}
});
return arrayOfFiles;
};
const result = getAllFiles(dirPath);
result.forEach(async (file) => {
await sharp(`${file}`)
.resize(maxWidth, maxHeight, {
fit: "inside",
})
.toBuffer(function(err, buffer) {
fs.writeFile(`${file}`, buffer, function(err) {
if (err) {
console.log(err);
}
});
});
});
Add the image preprocesser to the builspec
// buildspec.yml
...
build:
commands:
- node image-preprocessor.js
- npm run build
...
Note that because the preprocessing is done every time Gridsome is built via the buildpsec, the source images remain untouched in the repository (and ultimately await a proper fix to this issue).

Mup deploy - js-bson: Failed to load c++ bson extension, using pure JS version

Trying to deploy my meteorJS app to digital ocean droplet under Ubuntu 14.04 with the help of Meteor Up
mup init is sucessful but when I deploy I have:
-----------------------------------STDERR-----------------------------------
npm WARN package.json meteor-dev-bundle#0.0.0 No description
npm WARN package.json meteor-dev-bundle#0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle#0.0.0 No README data
js-bson: Failed to load c++ bson extension, using pure JS version
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 80: Connection refused
Latest deployment failed! Reverted back to the previous version.
-----------------------------------STDOUT-----------------------------------
/ansi-styles
chalk#0.5.1 node_modules/chalk
escape-string-regexp#1.0.3 node_modules/escape-string-regexp
strip-ansi#0.3.0 node_modules/strip-ansi
has-ansi#0.1.0 node_modules/has-ansi
supports-color#0.2.0 node_modules/supports-color
eachline#2.3.3 node_modules/eachline
type-of#2.0.1 node_modules/type-of
amdefine#1.0.0 node_modules/amdefine
asap#2.0.3 node_modules/asap
underscore#1.5.2 node_modules/underscore
meteor-promise#0.5.0 node_modules/meteor-promise
promise#7.0.4 node_modules/promise
source-map-support#0.3.2 node_modules/source-map-support
semver#4.1.0 node_modules/semver
source-map#0.1.32 node_modules/source-map
fibers#1.0.5 node_modules/fibers
Waiting for MongoDB to initialize. (5 minutes)
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
connected
admin stop/waiting
admin start/running, process 14399
Waiting for 30 seconds while app is booting up
Checking is app booted or not?
admin stop/waiting
admin start/running, process 14542
----------------------------------------------------------------------------
Config :
node -v
v0.10.40
npm list bson
└── bson#0.4.20
I've seen a lot of issue resolved by changing
bson = require('../build/Release/bson');
to
bson = require('../browser_build/bson');
But where do I find my node_module ? I have one directory at the root of my app but in this directory I don't even have /build only browser_build so I can"t try this fix ...

Meteor-Up failures on 2 different servers

I am experiencing failure every time I try to deploy to either an AWS/EC2 instance or a Digital Ocean droplet. With the EC2 instance I am using a pem file and with the droplet I am using password access. There were a lot of hoops to jump through to get through the mup setup, but that is finally successful on both instances. It's the mup deploy that fails on the Invoking deployment process: step.
Here's my mup.json for the droplet:
{
// Server authentication info
"servers": [
{
"host": "xx.xx.xx.xx",
"username": "root",
"password": "notmypassword"
// or pem file (ssh based authentication)
//"pem": "~/.ssh/id_rsa"
//"pem": "/users/alex/dropbox/awspems/projectmanager.pem"
}
],
// Install MongoDB in the server, does not destroy local MongoDB on future setup
"setupMongo": true,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: If nodeVersion omitted will setup 0.10.33 by default. Do not use v, only version number.
"nodeVersion": "0.10.35",
// Install PhantomJS in the server
"setupPhantom": true,
// Application name (No spaces)
"appName": "projectmanager",
// Location of app (local directory)
"app": "/users/alex/dropbox/projectmanager",
// Configure environment
"env": {
"ROOT_URL": "http://xx.xx.xx.xx"
},
// Meteor Up checks if the app comes online just after the deployment
// before mup checks that, it will wait for no. of seconds configured below
"deployCheckWaitTime": 30
}
The following messages appear whether in the EC2 instance or the droplet instance:
Claire-MacAir-7:projectmanager alex$ mup deploy
Meteor Up: Production Quality Meteor Deployments
------------------------------------------------
“ Checkout Kadira!
It's the best way to monitor performance of your app.
Visit: https://kadira.io/mup ”
Building Started: /users/notmyusername/dropbox/projectmanager
Started TaskList: Deploy app 'projectmanager' (linux)
[xx.xx.xx.xx] - Uploading bundle
[xx.xx.xx.xx] ✔ Uploading bundle: SUCCESS
[xx.xx.xx.xx] - Setting up Environment Variables
[xx.xx.xx.xx] ✔ Setting up Environment Variables: SUCCESS
[xx.xx.xx.xx] - Invoking deployment process
[xx.xx.xx.xx] ✘ Invoking deployment process: FAILED
-----------------------------------STDERR-----------------------------------
ir=/root/.node-gyp/0.10.35',
gyp info spawn args '-Dmodule_root_dir=/opt/projectmanager/tmp/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gyp info ok
npm WARN package.json meteor-dev-bundle#0.0.0 No description
npm WARN package.json meteor-dev-bundle#0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle#0.0.0 No README data
stop: Unknown instance:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 80: Connection refused
App did not pick up! Please check app logs.
-----------------------------------STDOUT-----------------------------------
LE(target) Release/obj.target/bcrypt_lib.node: Finished
COPY Release/bcrypt_lib.node
make: Leaving directory `/opt/projectmanager/tmp/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/build'
> fibers#1.0.1 install /opt/projectmanager/tmp/bundle/programs/server/node_modules/fibers
> node ./build.js
`linux-x64-v8-3.14` exists; testing
Binary is fine; exiting
underscore#1.5.2 node_modules/underscore
semver#4.1.0 node_modules/semver
chalk#0.5.1 node_modules/chalk
├── escape-string-regexp#1.0.2
├── ansi-styles#1.1.0
├── supports-color#0.2.0
├── strip-ansi#0.3.0 (ansi-regex#0.2.1)
└── has-ansi#0.1.0 (ansi-regex#0.2.1)
eachline#2.3.3 node_modules/eachline
└── type-of#2.0.1
source-map-support#0.2.8 node_modules/source-map-support
└── source-map#0.1.32 (amdefine#0.1.0)
fibers#1.0.1 node_modules/fibers
Waiting for MongoDB to initialize. (5 minutes)
connected
projectmanager start/running, process 11786
Waiting for 30 seconds while app is booting up
Checking is app booted or not?
----------------------------------------------------------------------------
Completed TaskList: Deploy app 'projectmanager' (linux)
The project works perfectly with no errors on my localhost.
Any ideas?
Thanks in advance, Alex Adams
And the solution is:
The mup logs showed that it didn't like a path designated for a folder to hold uploaded files. I changed the app to use GridFS, thus storing the files in the database. The app deploys correctly now.

mup throwing error, worked well for last two deployments

I have deployed to my ip twice with this and worked fine, and now I've added anothe npm package phantom to my app and now when I try to deploy it ,it is throwing some error
✘ Invoking deployment process: FAILED
-----------------------------------STDERR-----------------------------------
gyp info spawn args '-Dmodule_root_dir=/opt/meteor/tmp/bundle/programs/server/npm/npm-container/node_modules/phantom/node_modules/dnode/node_modules/weak',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gyp info ok
npm WARN package.json meteor-dev-bundle#0.0.0 No description
npm WARN package.json meteor-dev-bundle#0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle#0.0.0 No README data
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 80: Connection refused
Latest deployment failed! Reverted back to the previous version.
-----------------------------------STDOUT-----------------------------------
s/dnode/node_modules/weak/build'
CXX(target) Release/obj.target/weakref/src/weakref.o
SOLINK_MODULE(target) Release/obj.target/weakref.node
SOLINK_MODULE(target) Release/obj.target/weakref.node: Finished
COPY Release/weakref.node
make: Leaving directory `/opt/meteor/tmp/bundle/programs/server/npm/npm-container/node_modules/phantom/node_modules/dnode/node_modules/weak/build'
> fibers#1.0.1 install /opt/meteor/tmp/bundle/programs/server/node_modules/fibers
> node ./build.js
`linux-x64-v8-3.14` exists; testing
Binary is fine; exiting
underscore#1.5.2 node_modules/underscore
semver#2.2.1 node_modules/semver
source-map-support#0.2.5 node_modules/source-map-support
└── source-map#0.1.29 (amdefine#0.1.0)
fibers#1.0.1 node_modules/fibers
meteor stop/waiting
meteor start/running, process 30029
Waiting for MongoDB to initialize. (5 minutes)
connected
Waiting for 15 seconds while app is booting up
Checking is app booted or not?
meteor stop/waiting
meteor start/running, process 30169
Anyone Have idea abou this? ANy suggestions welcome

Resources