Chat+ MongoDB lock

Ok, last week a user here had an issue in which they restarted their server and after restart of server - mongodb would not connect to port 27017 - when attempting to run Chat+. Well, the other day, I had a power outage, and upon power restoration and starting server - I too ran into an issue where MongoDB could not connect to port 27017.

 

So - here are a few quick pointers. First off, I am using Centos 7 so all my notes are for that OS.

 

if for any reason you need to stop/restart your server - you should stop the Chat+ from running.

 

pidof node (this will list the process id of node)

kill -9 xxxxx (the xxxxx is the process id listed from command above)

service mongod stop

 

then you should be okay to stop/restart your server

 

If by chance you have a power outage like I did and are unable to stop the Chat+ from running and get stuck with cant connect to port 27017 - heres what I had to do:

 

yum erase mongo-10gen-mongos mongo-10gen-tools mongo-10gen-shell (this should remove all packages of mongodb)


rpm -qa | less | grep mongo (this will list any packages not removed. if anything is listed, then use:)


rpm --qa | less | grep mongo | xargz yum remove

 

ANd to make sure it is is actually uninstalled:

 

which mongod

 

this should return nothing. Then you have to remove all data pertaining to the mongodb.

 

Delete the following directories:

 

/var/lib/mongo (this directory is not empty so try:

   rm -rf /var/lib/mongo/*.*

   rmdir /var/lib/mongo

 

 

Then - you have to reinstall mongodb

   yum install mongodb-org

 

 

after that - all should be working well when you restart the Chat+ server.

caredesign.net
Quote · 19 Mar 2016

fine, king

Quote · 19 Mar 2016

it took me a few days to get the instructions laid out. I was trying all different kind of things to see:

 

A - if any other scenario would trigger this problem

B - if there was another way to accomplish this

C - if other ways - which way was the most consistent and easiest

caredesign.net
Quote · 19 Mar 2016

So did you loose all your setting in the db for the chat app and pretty much start over ?

https://dolphin-techs.com - Skype: Dolphin Techs
Quote · 19 Mar 2016

yes - i did

 

I have no idea how to just "unlock" the mongodb. Basically - what happens in an abrupt stoppage of the Chat+ - upon restart of the server - mongodb is "locked" and thinks that it is still open. At first, I thought it was just the .lock file that was created - so I deleted it and it still did not work. even restarting the server appropriately did not unlock it either. The one thing I figured would work for sure - delete it all and reinstall mongodb

caredesign.net
Quote · 19 Mar 2016
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.