Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6821873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:35:47+00:00 2026-05-26T21:35:47+00:00

I followed this tutorial: http://howtonode.org/express-mongodb Its strange, the first time I followed the tutorial

  • 0

I followed this tutorial: http://howtonode.org/express-mongodb

Its strange, the first time I followed the tutorial everything worked.
But now, one day after I wanted to play with the code again I coudn’t start
the server. This is what I get:

alex@alex-System-Product-Name:~/blog2$ node app.js Express server
listening on port 3000 in development mode

node.js:134
throw e; // process.nextTick error, or ‘error’ event on first tick
^ Error: failed to connect to [localhost:27017]
at [object Object]. (/home/alex/blog2/node_modules/mongodb/lib/mongodb/connection/server.js:189:47)
at [object Object].emit (events.js:67:17)
at [object Object]. (/home/alex/blog2/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:110:14)
at [object Object].emit (events.js:67:17)
at Socket. (/home/alex/blog2/node_modules/mongodb/lib/mongodb/connection/connection.js:301:10)
at Socket.emit (events.js:64:17)
at Array. (net.js:836:27)
at EventEmitter._tickCallback (node.js:126:26) alex@alex-System-Product-Name:~/blog2$

Any suggestions to fix this problem?

EDIT:

I just did:

alex@alex-System-Product-Name:~/blog2$ sudo service mongodb start
mongodb start/running, process 9847
alex@alex-System-Product-Name:~/blog2$ sudo service mongodb status
mongodb stop/waiting
alex@alex-System-Product-Name:~/blog2$ 

Not sure if it is running.

and this is what I get if I type $ mongo in the command line:

alex@alex-System-Product-Name:~/blog2$ mongo
MongoDB shell version: 1.8.2
Tue Nov 15 08:09:50 *** warning: spider monkey build without utf8 support.  consider rebuilding with utf8 support
connecting to: test
Tue Nov 15 08:09:50 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:79
exception: connect failed
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:35:48+00:00Added an answer on May 26, 2026 at 9:35 pm

    This fixed the problem:

    http://www.synchrosinteractive.com/blog/1-software/47-mongodb-repair-on-ubuntu

    Apparently mongodb creates a lock file when the database crashes or something.
    Deleting that file and repairing mongodb fixes the problem:

    Manually remove the lockfile: sudo rm /var/lib/mongodb/mongod.lock

    Run the repair script: sudo -u mongodb mongod -f /etc/mongodb.conf
    –repair

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've followed this tutorial: http://anandhansubbiah.com/blog/writing-your-first-android-application/ , but no matter what I do, and what
first time trying XNA Framework in C#.. followed this tutorial: http://www.uxmagic.com/blog/post/2010/08/17/e2809cHello-Worlde2809d-for-XNA-Game-Studio-40.aspx Everything's ok until
I'm building an ogre3d tutorial based on this setup http://www.ogre3d.org/wiki/index.php/SettingUpAnApplication#XCode I've followed all steps
I'm aggregating RSS feeds using FeedTools. I followed this tutorial: http://simonwoodside.com/weblog/2008/12/7/ruby_on_rails_feedrss_aggregator/ and everything functioned
I have followed this tutorial and added iAd to my app: http://bees4honey.com/blog/tutorial/how-to-add-iad-banner-in-iphoneipad-app/ But the
i followed this tutorial (http://github.com/tupps/OpenFlow) for creating cover-flow , but in open flow openflow
I have followed this tutorial http://netbeans.org/kb/docs/websvc/gs-axis.html and successfully created the web service. When i
Ive followed this tutorial to install (multiple) solr instances on tomcat http://wiki.apache.org/solr/SolrTomcat Now i
I Followed this tutorial for my Restlet server in the Google App Engine: http://wiki.restlet.org/docs_2.0/13-restlet/21-restlet/318-restlet/303-restlet.html
I have followed this tutorial to create the first azure application http://msdn.microsoft.com/en-us/WAZPlatformTrainingCourse_IntroToWindowsAzureLabVS2010 Because after

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.