MongoDB on Web Faction – DBClientCursor::init call() failed

I decided to take on the, what many would call “laborious”, task of installing MongoDB on Web Faction and running an instance along with Node for a tiny app that I’ve created and gotten to work awesomely locally.

John, just use Heroku and MongoLabs or ANYthing else, you say. Well to you sir or madam I say meh. This seems like something I should be able to do. I mean, the documentation is there, so it’s totally doable right?

That remains to be seen at this point. I went through the basic install. SSH’ed into the server, downloaded MongoDB, unzipped MongoDB, and ran the initial bits that Web Faction suggested. Somewhere something went haywire and I got this error:

2015-02-12T12:49:16.014+0000 DBClientCursor::init call() failed
2015-02-12T12:49:16.029+0000 Error: DBClientBase::findN: transport error: localhost:32385 ns: admin.$cmd query: { whatsmyuri: 1 } at src/mongo/shell/mongo.js:148
exception: connect failed

wat? To the Google!

But first, there was one thing that I could switch. I don’t know which one of the following I’m using, but I chose the 64-bit. I’ll wipe everything and switch to 32-bit.

“If you’re using a server less than Web300 or less than Dweb89, choose the Linux 32-bit download URL. If you’re using any other server, choose the Linux 64-bit download URL.”

$ wget https://fastdl.mongodb.org/linux/mongodb-linux-i686-2.6.7.tgz

$ tar -xzf mongodb-linux-i686-2.6.7.tgz

$ $HOME/webapps/application/mongodb-linux-architecture-version/bin/mongod --auth --dbpath $HOME/webapps/application/data/ --port number

That didn’t help either. Turned out I’d missed an error elsewhere. I missed the following:

ERROR: listen(): bind() failed errno:98 Address already in use for socket: 0.0.0.0:32385

Turned out I had set up an application in Web Faction that was already using that port.

I ended up setting up a different App, using Custom App (listening on port) and was able to set it up properly.

Problem existed between keyboard and my brain. So hopefully that will give you a different line of thinking. If not then I’m sorry I was of no help. Check your ports, check your tar file and if all else fails, check with Web Faction support who’s very nice.

If you’re not familiar with Web Faction, you should take a look at my switch from Dreamhost to Web Faction to see why it may be a good idea. Other hosts I’m currently using include Digital Ocean and Media Temple.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

John Hartley is a Director of Product Engineering at Beam Dental in Columbus, OH. With 7+ years of leadership experience he has worked in startups, agencies, and began his career as a freelance Front End Developer. Always looking to iterate, this blog is a place for him to share his knowledge as well as hone his craft, challenge assumptions, and build a strong base of leadership and management knowledge. Connect with him on LinkedIn

0
Would love your thoughts, please comment.x
()
x