Exited with code 8 # node_modules/fibers/futures.js - meteor

Adams-MacBook-Pro:faze1app adamhanna$ meteor
[[[[[ ~/Desktop/apps/temp/faze1App ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Meteor 1.3.5.1 is available. Update this project with 'meteor update'.
W20160722-07:52:52.466(-7)? (STDERR)
W20160722-07:52:52.468(-7)? (STDERR) /Users/adamhanna/.meteor/packages/meteor-tool/.1.3.2_4.1qxzz7q++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:300
W20160722-07:52:52.469(-7)? (STDERR) throw(ex);
W20160722-07:52:52.469(-7)? (STDERR) ^
W20160722-07:52:52.469(-7)? (STDERR) [object Object]
=> Exited with code: 8
The error doesn't tell me much, so it's hard to debug. It's only happening in this one project, so I'm sure it's project specific.
I've tried:
Uninstalling / reinstalling meteor
Updating meteor to the latest version
Meteor reset
This solution
This other solution
Is there anyway to get more info out of the error rather than [object Object]?

SOLVED
Ok, so this is my fault, but it would be nice if the error was more descriptive.
Essentially, I need to connect my app to multiple mongoDB's, so I have the following in my server code:
var myOtherDatabase = new MongoInternals.RemoteCollectionDriver("mongodb://myOtherMongoURI");
myOtherCollection = new Mongo.Collection('stuff', { _driver: myOtherDatabase });
I have ufw set up on that other mongoDB and forgot to allow access from my new ip. My app wasn't able to connect and was throwing an err.

Related

Cannot start up existing Meteor application

I have an existing Meteor app that appears to have crashed today. I re-ran meteor in terminal and it proceeds to run meteor but it’s not picking up correct db we are using in mongodb. When I run
MONGO_URL=mongodb://dbuser:dbpass#127.0.0.1/db meteor run it proceeds to build the application but then exits with a code:8. Then it just loops back to creating the application again and selecting package versions. Then when I visit our URL in the browser for the site, I’m getting the following error:
“It looks like you are trying to access MongoDB over HTTP on the native driver port.”
Not sure how to get this app back up and running so any help/suggestions would be appreciated. So short story is we had this running yesterday but then it crashed and now I can’t get the app running again. The db is intact and the collection we use is present in the db. The app code for meteor is all in place. I’m just having problems starting up the app again. The app is hosted in AWS CentOS server running Apache.
Detailed error that I'm seeing when trying to run the app:
/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20171114-03:34:08.618(0)? (STDERR) throw(ex);
W20171114-03:34:08.618(0)? (STDERR) ^
W20171114-03:34:08.618(0)? (STDERR) TypeError: Object #<Object> has no method 'describe'
W20171114-03:34:08.618(0)? (STDERR) at app/server/packages/npm-container/package.js:4:9
W20171114-03:34:08.619(0)? (STDERR) at app/server/packages/npm-container/package.js:25:3
W20171114-03:34:08.619(0)? (STDERR) at /var/www/mongo-parcc-user/parcc-meteor/.meteor/local/build/programs/server/boot.js:222:10
W20171114-03:34:08.619(0)? (STDERR) at Array.forEach (native)
W20171114-03:34:08.619(0)? (STDERR) at Function._.each._.forEach (/root/.meteor/packages/meteor-tool/.1.1.3.115udz9++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20171114-03:34:08.619(0)? (STDERR) at /var/www/mongo-parcc-user/parcc-meteor/.meteor/local/build/programs/server/boot.js:117:5
=> Exited with code: 8

Meteor tutorials giving 'sanitizeForInObject' error

I have been using Meteor for years and have version 1.1 on my Mac. I have created a new directory, typed meteor update and checked that meteor --version gives Meteor 1.5.
Following the tutorial, I typed meteor create simple-todos, cd into it, and typed meteor.
But meteor crashes - see the error below. How can I get the tutorial running? I'd still like to be able to run my older Meteor 1.1 app too.
=> Started proxy.
=> Started MongoDB.
W20170605-21:34:04.700(10)? (STDERR) /Users/.../.meteor/packages/meteor-tool/.1.5.0.3kmr7i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20170605-21:34:04.801(10)? (STDERR) throw(ex);
W20170605-21:34:04.801(10)? (STDERR) ^
W20170605-21:34:04.803(10)? (STDERR)
W20170605-21:34:04.803(10)? (STDERR) TypeError: Cannot read property 'sanitizeForInObject' of undefined
W20170605-21:34:04.804(10)? (STDERR) at [object Object].LocalCollection.insert (packages/minimongo/minimongo.js:569:3)
W20170605-21:34:04.805(10)? (STDERR) at [object Object].insert (packages/mongo/collection.js:524:37)
W20170605-21:34:04.805(10)? (STDERR) at updateVersions (packages/autoupdate.js:133:20)
W20170605-21:34:04.806(10)? (STDERR) at packages/autoupdate.js:197:3
W20170605-21:34:04.806(10)? (STDERR) at Function.time (/Users/.../Javascript/meteor/simple-todos/.meteor/local/build/programs/server/profile.js:309:28)
W20170605-21:34:04.807(10)? (STDERR) at /Users/.../Javascript/meteor/simple-todos/.meteor/local/build/programs/server/boot.js:347:13
W20170605-21:34:04.807(10)? (STDERR) at /Users/.../Javascript/meteor/simple-todos/.meteor/local/build/programs/server/boot.js:388:5
W20170605-21:34:04.808(10)? (STDERR) at Function.run (/Users/.../Javascript/meteor/simple-todos/.meteor/local/build/programs/server/profile.js:510:12)
W20170605-21:34:04.809(10)? (STDERR) at /Users/.../Javascript/meteor/simple-todos/.meteor/local/build/programs/server/boot.js:386:11
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.
I just had to re-install Meteor as described on https://www.meteor.com/install, and then it all worked fine. I could even run Meteor version 1.1 in one directory and version 1.6 in another.

TypeError: Object #<Object> has no method 'describe in Meteor

I have created a meteor app and cloned houston. I run meteor from the path app/houston, the following error appears.
TypeError: Object #<Object> has no method 'describe'
W20150316-16:02:33.273(5.5)? (STDERR) at app/houston/package.js:3:9
W20150316-16:02:33.273(5.5)? (STDERR) at app/houston/package.js:76:3
W20150316-16:02:33.273(5.5)? (STDERR) at /home/garima.wadhera/houston_app/.meteor/local/build/programs/server/boot.js:205:10
W20150316-16:02:33.273(5.5)? (STDERR) at Array.forEach (native)
W20150316-16:02:33.274(5.5)? (STDERR) at Function._.each._.forEach (/home/admin/.meteor/packages/meteor-tool/.1.0.41.yumiah++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20150316-16:02:33.274(5.5)? (STDERR) at /home/garima.wadhera/houston_app/.meteor/local/build/programs/server/boot.js:116:5
=> Exited with code: 8
=> Your application is crashing. Waiting for file change.
Where Am I making a mistake? Please guide.
For reference: houston code
The houston package at https://github.com/gterrono/houston is a meteor package not a meteor project. It runs if you add it as a package in an existing meteor project.
You have to add the package to another meteor project.
meteor create project
cd project
meteor add houston:admin
Then you can load it up at /admin on your web browser.
If you want to edit the code create a directory called packages clone the package into that and meteor remove houston:admin (if you added it above) and add it back with meteor add houston:admin (will add the local one)

Meteor with cloud9

When trying to run meteor in cloud9 I encounter one of the following errors:
Running the older modified version from cloud9 I get the error:
No dependency info in bundle. Filesystem monitoring disabled.
=> Errors prevented startup:
Exception while bundling application:
Error: Package not found: standard-app-packages
at self.api.use (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/tools/bundler.js:113:17)
at Array.forEach (native)
at Function._.each._.forEach (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
at Object.self.api.use (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/tools/bundler.js:110:9)
When I try running the lastest version, I get an error from cloud9:
Cloud9 Error: you may be using the wrong PORT & HOST for your server app
Node: use 'process.env.PORT' as the port and 'process.env.IP' as the host in your scripts. See also https://c9.io/site/blog/2013/05/can-i-use-cloud9-to-do-x/
In both cases, I clone the corresponding GitHub repository and run export BIND_IP=$IP as well as export PORT=20000 (as it is described in on several posts). I also gave up the hope using the default MongoDB server and am instead exporting MONGO_URL to a free database hosted on https://www.mongohq.com/.
I've also tried to merge the pull request from cloud9's meteor version to the master, but those files don't even exist anymore. Everything else I could find was about Meteor version 0.6.5 and 0.5
Trying to modify the latest Meteor-version I looked for the httpServer.listen call, but I found only one in meteor/packages/webapp/webapp_server.js, and it seems that the cloud9 error is thrown before that part of code is reached (if it is ever reached). So that there must be a another piece of code which is bound to the wrong address or port.
The plugins I use are:
standard-app-packages
insecure
preserve-inputs
underscore
backbone
jquery
accounts-ui
accounts-base
accounts-password
accounts-facebook
accounts-google
coffeescript
Update:
After some more hours looking for a solution, I got much further. The problem was in meteor/tools/run-proxy.js:
In line 94 you can see: self.server.listen(self.listenPort, function () { here is the corresponding IP-address missing to which the server should bind itself. Now meteor used to use an environmental variable BIND_IP which we could introduce here again, but this would have unnecessary additional changes on cloud9, since they export the current IP address to which a service should bind itself in the IP variable. So I changed the line in question to: self.server.listen(self.listenPort, process.env.IP, function () {
I've also additionally modified meteor/tools/run-all.js, since I wasn't sure if the correct port parameter is used. On line 24 I exchanged var listenPort = options.port; with var listenPort = process.env.PORT;
While I can now finally start the application, it is still not running and I'm getting the following output:
=> Running Meteor from a checkout -- overrides project version (0.7.2)
[[[[[ ~/<PROJECT_ID>/<PROJECT_NAME> ]]]]]
=> Started proxy.
W20140321-22:31:42.591(-4)? (STDERR)
W20140321-22:31:43.036(-4)? (STDERR) events.js:72
W20140321-22:31:43.037(-4)? (STDERR) throw er; // Unhandled 'error' event
W20140321-22:31:43.037(-4)? (STDERR) ^
Cloud9 Error: you may be using the wrong PORT & HOST for your server app
Node: use 'process.env.PORT' as the port and 'process.env.IP' as the host in your scripts. See also https://c9.io/site/blog/2013/05/can-i-use-cloud9-to-do-x/
W20140321-22:31:43.108(-4)? (STDERR) Error: listen EACCES
W20140321-22:31:43.109(-4)? (STDERR) at errnoException (net.js:901:11)
W20140321-22:31:43.109(-4)? (STDERR) at Server._listen2 (net.js:1020:19)
W20140321-22:31:43.111(-4)? (STDERR) at listen (net.js:1061:10)
W20140321-22:31:43.111(-4)? (STDERR) at net.js:1143:9
W20140321-22:31:43.112(-4)? (STDERR) at dns.js:72:18
W20140321-22:31:43.112(-4)? (STDERR) at process._tickCallback (node.js:415:13)
=> Exited with code: 8
However meteor doesn't crash and the exceptions keep coming in one after another. That's why I first thought, the exception is due to an authentication error on MongoDB, since also Error-Code 8 for MongoDB is authentication error, but this is what I get when I use an invalid username + password on my MongoHQ-hosted database:
[...]
=> Started proxy.
W20140321-22:54:17.282(-4)? (STDERR)
W20140321-22:54:18.700(-4)? (STDERR) /var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/mongo_client.js:400
W20140321-22:54:18.777(-4)? (STDERR) throw err
W20140321-22:54:18.778(-4)? (STDERR) ^
W20140321-22:54:18.778(-4)? (STDERR) MongoError: auth fails
W20140321-22:54:18.778(-4)? (STDERR) at Object.toError (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/utils.js:110:11)
W20140321-22:54:18.779(-4)? (STDERR) at /var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/auth/mongodb_cr.js:34:33
W20140321-22:54:18.779(-4)? (STDERR) at /var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/db.js:1670:9
W20140321-22:54:18.779(-4)? (STDERR) at Server.Base._callHandler (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/connection/base.js:382:41)
W20140321-22:54:18.780(-4)? (STDERR) at /var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/connection/server.js:472:18
W20140321-22:54:18.780(-4)? (STDERR) at MongoReply.parseBody (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
W20140321-22:54:18.780(-4)? (STDERR) at null.<anonymous> (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/connection/server.js:430:20)
W20140321-22:54:18.781(-4)? (STDERR) at EventEmitter.emit (events.js:95:17)
W20140321-22:54:18.781(-4)? (STDERR) at null.<anonymous> (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:191:13)
W20140321-22:54:18.782(-4)? (STDERR) at EventEmitter.emit (events.js:98:17)
=> Exited with code: 8
This error is thrown in meteor/packages/mongo-livedata/mongo_driver.js at line 149:
147: MongoDB.connect(url, mongoOptions, function(err, db) {
148: if (err)
149: throw err;
150: self.db = db;
This is also OK, however I couldn't find where the other error comes from, which occurs, when my credentials are correct.
I just ran into similar issues initially, but the latest version of Meteor (0.9.0) makes this easy at least.
meteor run --port=$IP:$PORT
Seems to do the trick (at least so far)
This is doc'd in
meteor help run
hth
Andy
Ok, so actually the first part of the question is the correct answer, if I hadn't done it the other way around:
BIND_IP is used within meteor/packages/webapp/webapp_server.js, but not in meteor/tools/run-proxy.js. However both need to bind to cloud9's 'IP'-variable.
So to solve this issue, simply update the proxy, similar as I did it, to use the correct IP-address: self.server.listen(self.listenPort, process.env.IP, function () {
and just write in your .bashrc export BIND_IP=$IP
now everything works smoothly (provided, that you use a mongodb outside of cloud9)
I've summarised the necessary steps in my blog: http://peter.grman.at/how-to-run-meteor-in-cloud9/
meteor works very nice in c9.io, i am working in c9.io with metor. just following the steps.
select workshop as nodejs.
in terminal write the command "curl https://install.meteor.com/ | sh"
in terminal write $ meteor create newapp(your main application folder name)
in terminal write cd newapp
in terminal write $ meteor -p 8080 (note -p or --port, if you using port as 300 that not working properly in c9.io . so you should using port as 8080 or 8081 or 8082)
after few seconds you get a link app running at: localhost:8080
click the link and open it.
Meteor 1.4:
At first, I tried a lot of different variations, with and without the --port flag mentioned in Andrew's answer.
If I only ran the meteor command without any flag, the app would successfully start on port 3000, but apparently that port can't be used in Cloud9 (https://docs.c9.io/docs/multiple-ports)
If I used the --port flag, meteor would just hang on "Starting your app"
Most likely something got stuck along the way (with all the retries), because what probably finally fixed it was to run a meteor reset before starting the app (Meteor application - Stuck at "Starting your app" when trying to run):
...$ sudo meteor reset
...$ sudo meteor --port=$IP:$PORT
If that doesn't help, I had also added some detailed logging on the attempt that finally worked (see this meteor forum post: Meteor stuck at starting your app). Try this if you're still stuck:
...$ sudo meteor reset
...$ METEOR_PROFILE=1
...$ METEOR_LOG=debug
...$ sudo meteor --port=$IP:$PORT --verbose
After it worked the first time, I can now start the app with only one command:
...$ sudo meteor --port=$IP:$PORT

Meteor unable to run application after adding ui-accounts

I decided to try out Meteor and found myself a tutorial to follow.
So as one does I googled "Meteor tutorials" and this one is at the top of the results list:
http://www.smashingmagazine.com/2013/06/13/build-app-45-minutes-meteor/
Hey all!
So - I start following the tutorial but as soon as I get to step 2 meteor isn't able to run my application anymore.
The log is as follows:
Your app is crashing. Here's the latest log.
W2047-00:56:09.699(0)? (STDERR) /home/vidirr/.meteor/packages/mongo- livedata/45bb567dec/npm/node_modules/mongodb/lib/mongodb/mongo_client.js:359
W2047-00:56:09.700(0)? (STDERR) throw err
W2047-00:56:09.700(0)? (STDERR) ^
W2047-00:56:09.702(0)? (STDERR) Error: failed to connect to [127.0.0.1:3002]
W2047-00:56:09.704(0)? (STDERR) at null.<anonymous> (/home/vidirr/.meteor/packages/mongo-livedata/45bb567dec/npm/node_modules/mongodb/lib/mongodb/connection/server.js:540:74)
W2047-00:56:09.704(0)? (STDERR) at EventEmitter.emit (events.js:106:17)
W2047-00:56:09.704(0)? (STDERR) at null.<anonymous> (/home/vidirr/.meteor/packages/mongo-livedata/45bb567dec/npm/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:140:15)
W2047-00:56:09.705(0)? (STDERR) at EventEmitter.emit (events.js:98:17)
W2047-00:56:09.705(0)? (STDERR) at Socket.<anonymous> (/home/vidirr/.meteor/packages/mongo-livedata/45bb567dec/npm/node_modules/mongodb/lib/mongodb/connection/connection.js:478:10)
W2047-00:56:09.705(0)? (STDERR) at Socket.EventEmitter.emit (events.js:95:17)
W2047-00:56:09.705(0)? (STDERR) at net.js:441:14
W2047-00:56:09.706(0)? (STDERR) at process._tickCallback (node.js:415:13)
=> Exited with code: 8
=> Your application is crashing. Waiting for file change.
I checked in the the IRC room but they hadn't heard of the problem before.
TL;DR:
I create a new app:
meteor create newApp
I change into the new directory and run the app:
cd newApp
meteor
Everything works fine.
I kill the app, and add two smart-packages to my app:
meteor add accounts-ui
meteor add accounts-twitter
-(also tried accounts-facebook, same results).
I start the app - and it crashes.
Info:
Running a 32-bit distribution of Arch.
HDD space is fine.
RAM usage is about 1GB of 3GB before starting app - don't see any spikes.
Nothing seems to be bound to port 3002, checked using netstat.
Tried manually running mongod before starting app - no change.
Tried creating multiple projects - no change.
Removed ~/.meteor, reinstalled meteor, started a new project - no change.
Basically - I'm stumped. Seeing that I haven't actually written any code at all, I'm kinda blaming this on something else.
And since the guys in the IRC channel didn't see anything wrong with those steps, I'm also blaming it on something else then the tutorial.
Any ideas?
Best regards,
Víðir
For formalities, I'll place it here then.
Try restarting the PC
There is something using port 3002 and is not releasing it or Meteor just can't use port 3002 for some reason. If you can't manage to get hold of what's holding port 3002, then restarting the PC should do.
I had the similar problem with the latest Meteor 1.0 installation on my OS X 10.9: any application crashed after adding ui-accounts. In my case some other libs were involved and simple restart had no effect. What I had to do is completely remove Meteor and then install it again.
rm -rf ~/.meteor
rm -rf /usr/local/bin/
curl https://install.meteor.com/ | sh

Resources