Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • "reason:errno:111 Connection refused OR exception:connect failed" on mongoDB restart in ubuntu 16.04

    • 0
    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 6.10k
    Comment on it

    Fixed error "reason: error:111 Connection refused OR exception: connect failed" issue during mongoDB restart service in ubuntu 16.04

    I got the problem like below during start the Mongo DB service after it's installation.

    Problem:

    root@root: mongo
    MongoDB shell version: 2.6.12
    connecting to: test
    2016-08-26T11:32:14.847+0530 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
    2016-08-26T11:32:14.849+0530 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146
    exception: connect failed

     

    Solution: Run below commands to fix

    sudo rm /var/lib/mongodb/mongod.lock

     

    then

    sudo service mongod restart

     

    Output:

    root@root:~$ mongo
    MongoDB shell version: 2.6.12
    connecting to: test
    Server has startup warnings: 
    2016-08-26T11:39:54.807+0530 [initandlisten] 
    2016-08-26T11:39:54.807+0530 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
    2016-08-26T11:39:54.807+0530 [initandlisten] **       32 bit builds are limited to less than 2GB of data (or less with --journal).
    2016-08-26T11:39:54.807+0530 [initandlisten] **       Note that journaling defaults to off for 32 bit and is currently off.
    2016-08-26T11:39:54.807+0530 [initandlisten] **       See http://dochub.mongodb.org/core/32bit
    2016-08-26T11:39:54.807+0530 [initandlisten]
    >

 1 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: