LockerProject / Locker

Locker - the "me" platform
http://lockerproject.org/
BSD 3-Clause "New" or "Revised" License
1.07k stars 123 forks source link

Issue: Attempting to open connection to running mongodb server. #958

Closed volkovasystems closed 12 years ago

volkovasystems commented 12 years ago

I am doing test cases for my application with Locker Project application. (lockerproject.org) The locker is running with root privilege. The files inside it as well as the script has full root and as well as non root access to all the files. I am also using foreverjs to run the locker. So that when the locker dies it will restart again. The locker is attempting to open connection on a running mongodb server on localhost port 10001. There are no other mongodb servers running on that host:port and no one sharing the same mongodb directory. At first the locker is running normally until it attempts to open connection to the same mongodb server asynchronously. The mongo.Db is initialized properly. I had seen the contents using util.inspect. When we call db.open it doesn't execute the callback. Then suddenly the whole locker crash. No error prompts. Then forever restarted the locker. Then I am now receiving "exception in initAndListen: 10310 Unable to acquire lock for lockfilepath: /mongod.lock, terminating" The file path is the correct file path of the mongod.lock. Everything is running with root access as well as read/write privileges. I didn't try to run --repair since the locker is doing that for me. I am also trying to remove mongod.lock everytime the script starts but everytime the locker restart because of the forever, the locker does not remove the mongod.lock. I am assuming that even though I put a script that will remove the mongod.lock everytime the locker starts I will still receive the same crashing effect. I am running this test case on a fresh vm installed with Ubuntu 12.04 32 bit OS.

I had run the test case on my old Ubuntu 12.04 32 bit OS machine (not vm) And it is running normally no crashes or errors. But everytime we tested this test case on fresh Ubuntu VMs we were getting the same crashing scenario.

Can anyone help me with this crashing scenario. I hope I explained properly.

volkovasystems commented 12 years ago

Ok I updated my diagnosis. I put db.error and db.previousErrors after db.open then I am receiving this error: "Error: no open connections"

volkovasystems commented 12 years ago

It seems I am wrong placing the db.error and db.previousErrors so I place them inside db.open callback and I am not receiving any prompts now.

volkovasystems commented 12 years ago

No worries I already solve the issue. The current locker version needs a lower version of NodeJs I don't know what but we are using nodejs@0.6.19