I am debugging my meteor server as described here: How to debug server side code in a Meteor app
When I try to make a database query I get the following error. How do I investigate the database on the server?
>Meteor.users.find({_id:"HM3JWNm3D2GYMRqZfz"}).fetch()
Error: Can't wait without a fiber
Start your app with:
$ meteor
Open a new Terminal window and type:
$ meteor mongo
This will open the serverside mongo database console.
FYI:
If you deployed your app to meteor you can access its database console via:
$ meteor mongo myapp
Related
I am new to meteor. When i try to run meteor app in cmd prompt is showing ctrl-c option to stop the app.
When I enter y or n option the app gets stopped and I am unable to connect with mongo db. It is showing an error that meteor is not running a local mongodb server. It is mentioned to start the app first with meteor command.
Someone please help me
Thanks
yes, that's right. when running locally, the mongodb instance attached to your application is started when you run meteor, and stops running when you stop meteor.
in a real production application, you would have a mongo instance that is separate. e.g. running on mLab or Atlas. then you would start your meteor app with a settings file that specified the setting string(s) to connect to the database.
I deployed my meteor app to Galaxy and created my mongodb on mLab. I added the user account required. I did not import my database into mLab.
I am getting the error. Error: No scheme found in URI
Will meteor recreate the data collections on mLab?
Is there a way I can view the server side logs of a Meteor application in production? My deployed app (myapp.meteor.com) is throwing an 'Internal Server Error' so I need to view the server log.
Using the meteor command line tool:
meteor logs myapp.meteor.com
How can i update a deployed app using meteor.
So i deploy my app using
meteor deploy xxxxxxx
and to delete i do
meteor deploy --delete xxxxxx
how can i update?
It is not in the command line help also
when i type
meteor deploy --help
I get
Options:
--delete, -D permanently delete this deployment
--debug deploy in debug mode (don't minify, etc)
--settings set optional data for Meteor.settings
--star a star (tarball) to deploy instead of the current Meteor app
Is your app hosted on meteor.com?
If so you only need to issue a
Meteor deploy XXXXX
Command again and it will update your app.
Meteor Deploy uses the same hotcode reload that the apps use.
Just refresh the web page where you're making the changes and the meteor server will make itself restart! :)
When running the "parties" example locally, if I first specify my MONGO_URL to use an already existing mongo instance meteor mongo reports that meteor isn't running, even though it is and even though it is connecting just fine to a separate mongo instance.
If you run the meteor app without specifying a separate MONGO_URL, no problems meteor mongo works as expected
Now I have also tried setting the MONGO_URL before running meteor mongo to no avail. I haven't tried deploying the app to see what would happen.
The one other attempt to troubleshoot is after running the app, I try to connect using meteor mongo with the --url localhost:27017 flag it asks for a Password:. This is supposed to give me a URL to connect to the database instance, and the request for a Password isn't mongo either, since
a) I don't have authentication enabled on my local instance
b) Even if the local instance isn't running and you run meteor mongo it still asks for a password.
In the meteor documentation it notes under meteor mongo:
For now, you must already have your application running locally with meteor run. This will be easier >in the future.
Is this what they mean?
Obviously, it is isn't crucial that I have shell access from meteor to my local instance since I can always get shell access by just typing mongo, but my concern has to do with deployment, and should I want shell access then, this might be a problem.
Meteor mongo is meant to connect to the mongo database meteor runs when it runs in development, i.e that is run with meteor run, without a MONGO_URL or in deployment mode on meteor.com
This means it can't access other mongodbs, for instance if you specify MONGO_URL. meteor mongo will actually look for the running process id of the mongodb running in the .meteor directory of your project.
The reason meteor mongo --url localhost:27017 asks for a password is its attempting to connect to meteor.com hosting (if you deployed your app via meteor deploy), so if you deployed your app to test.meteor.com you could access its mongodb uri via meteor mongo test.meteor.com. If a password is set it will ask for that password.
To access your local mongodb collection you would have to look at the /bin directory of your mongodb instance or use mongo --dbpath xxx where xxx is where your database is installed. (Or as you mentioned to use mongo)