Meteor: unexpected mongo exit code null. Restarting. What is this? - mongodb

The title pretty much says it - when I try to start a newly created meteor app, this appears when starting the proxy and I get the message that the mongo server can't be started.
I created some swap space already (that was mentioned in the only other thread realted to that problem) and even reinstalled it - no further success.
Weird thing is, on my normal laptop this works. The laptop I'm having trouble with is a Pentium III with 1GB RAM, maybe this matters.
Any thoughts? Is the machine too old?
EDIT:
My setup:
Thinkpad T23, PIII 1.13 GHz, 1GB RAM.
Debian Stretch/testing, Linux Kernel 4.1.0-1-686-pae
My log:
[[[[[ ~/Server/sample ]]]]]
=> Started proxy.
Unexpected mongo exit code null. Restarting.
Unexpected mongo exit code null. Restarting.
Unexpected mongo exit code null. Restarting.
Can't start Mongo Server.

This command will reset your database
meteor reset

Have you tried setting your LANG environment variable? As shown in Mongo can't be started when starting Meteor, which explains the following:
<snip>
If you get an error like
terminate called after throwing an instance of 'std::runtime_error'
what(): locale::facet::_S_create_c_locale name not valid
Unexpected mongo exit code null. Restarting.
...
Can't start Mongo server.
the solution is very easy but not easy to know:
You have not set your LANG settings in current shell.
Set your LANG env vars before starting meteor manually or permanent in your profile settings.
export LANG=C
export LC_ALL=C
Now you can run meteor and it should be able to start the mongo development process.
</snip>
It might be worth trying. HTH.

I think your suspicion about the machine being too old is correct.
You can reproduce the same error by trying to build a meteor app on a digitalocean droplet with 512mb of ram. On an otherwise identical machine with 8gb of ram, the app builds without error.

Just remove the #w=majority param in your connection string

Related

I am not able to start MongoDB ON WINDOWS 10

Mongod is not starting on windows 10 it shows 'access control is not enabled for the database. Read and write access to data and configuration is unrestr 10.
Mongo is started and is running. This message is simply a notice, not an error. It says that your Mongo database is insecure because anyone is able to read and write. This is fine for your development purposes on your computer, but you should change the settings if you use Mongo for a production, customer-facing website.

MongoError exception: FieldPath field names may not start with '$'

We just migrated our infrastructure on AWS from one account to another.
The mongo version installed on the server is 2.4.9
I am new to MongoDb and faced the following 2 errors when I ran the web app -
{"name":"MongoError","errmsg":"exception: FieldPath field names may not start with '$'.","code":16410,"ok":0}
and
{"name":"MongoError","errmsg":"exception: the $cond operator requires an array of 3 operands","code":16019,"ok":0}
The web app was working on our previous instances. Can anyone point me in the right direction?
Upgrading to the latest mongodb (3.0.2) helped resolve this issue for me.
P.S. - Make sure you kill the mongod process already running using killall -15 instead of pkill -9 as the latter could cause damage.

Unexpected mongo exit code 100. Restarting

I was trying to run Meteor on my VPS and I was getting this error:
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Can't start Mongo server.
MongoDB had an unspecified uncaught exception.
This can be caused by MongoDB being unable to write to a local database.
Check that you have permissions to write to .meteor/local. MongoDB does
not support filesystems like NFS that do not allow file locking.
I have figured out that the problem is in my user permissions or something like that. It works very smoothly when I try to run meteor with root access. If I try to run meteor with my "custom" user, it fails. Even though I grant him sudo privileges as listed on DigitalOcean. Why is it so? What is the problem behind?
I am on Ubuntu 14.04.1 LTS. Meteor is version 0.8.3 and I am using MongoDB coming with Meteor. I do not have seperated instalation of MongoDB.
Update: Basicly I have found the problem but I still do not now what is causing the problem. I am on DigitalOcean VPS. If I run Meteor over SSH, it fails. If I run Meteor on web Console Access, it works. I do not get it.
Answer https://stackoverflow.com/a/15752736 helped me to find out that Mongo doesn't want to start without properly set locale.
Try to run export LC_ALL="en_US.UTF-8" command before meteor command.
WARNING: This deletes the database and all of the application's data.
rm -rf .meteor/local
Solved it for me when none of the above solutions did.
I would guess that the custom user you created cannot remove the mongod.lock file due to insufficient premissions.
Also check that you have space on your HD, That was my problem.

Creating a new meteor.js file and get error 100, MongoDB not able to write

I'm playing with meteor.js and I get this error:
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Can't start mongod
MongoDB had an unspecified uncaught exception.
Check to make sure that MongoDB is able to write to its database directory.
I'm not sure how to remedy this, especially within the context of Meteor.js
I installed using curl on snow leopard mac os.
It was actually working for a while as I did a few exercises from a book I have, then it conked out with the error. Not sure what I did.
I fixed this by going to .meteor\local\db and deleting mongod.lock
I had this problem when I updated from 0.7 to 0.8 in my local environment, I had nothing to loose in my local database, so I fixed by:
rm -rf .meteor/local/db
As with our discussion, you just need to free up some disk space, I wish meteor would give more descriptive errors.
If you free up some space it should sort itself out
It could be that you have an instance of mongod running already, do a
ps -el | grep mongo
and if it's running kill it and restart
As #Akshat said:
If you even as root cannot run meteor, it's probably a full partion & you have to clean up or just move the folder to an other partition.
If you can run meteor as root, it's probably a rights issue solvable this way:
In the meteor project folder: sudo chown -R $USER:$USER .
I recommend not to use a NTFS partition as setting the correct rights there is difficult.

When using a separate MongoDB with meteor, meteor reset stopped working

I have my MONGO_URL set to mongodb://localhost:27017/meteor and have the MongoDB run as a service.
When running my project it seems OK to store data to the separate MongoDB until I tried to run meteor reset.
My assumption is it tried to remove its default database. The error complained that myproject.meteor\local is not empty and pointed to fs.js:456 which goes to files.js:256 (rm_recursive) and so on.
any idea what and how I can fix this?
$ meteor reset only resets the bundled MongoDB. It won't reset an external Mongo database.
(That's something we should explain better in the documentation.)
In your case, try connecting to the Mongo database directly (with the mongo command line shell) and running > db.dropDatabase()