MongoD Start Hangs Indefinitely at Connections:0 - mongodb

mongod --smallfiles
2014-06-05T13:19:15.085-0400 [initandlisten] MongoDB starting : pid=14584 port=27017 dbpath=/data/db 64-bit host=sfpop-predict06
2014-06-05T13:19:15.085-0400 [initandlisten] db version v2.6.1
2014-06-05T13:19:15.085-0400 [initandlisten] git version: 4b95b086d2374bdcfcdf2249272fb552c9c726e8
2014-06-05T13:19:15.085-0400 [initandlisten] build info: Linux build14.nj1.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2014-06-05T13:19:15.085-0400 [initandlisten] allocator: tcmalloc
2014-06-05T13:19:15.085-0400 [initandlisten] options: { storage: { smallFiles: true } }
2014-06-05T13:19:15.091-0400 [initandlisten] journal dir=/data/db/journal
2014-06-05T13:19:15.091-0400 [initandlisten] recover : no journal files present, no recovery needed
2014-06-05T13:19:15.113-0400 [initandlisten] waiting for connections on port 27017
2014-06-05T13:20:15.137-0400 [clientcursormon] mem (MB) res:35 virt:327
2014-06-05T13:20:15.137-0400 [clientcursormon] mapped (incl journal view):64
2014-06-05T13:20:15.138-0400 [clientcursormon] connections:0
It hangs for a minute on the "waiting for connections on port 27017" line, and indefinitely on the "connections:0" line. I can run Mongo just fine, but I need to run MongoD so I can connect to the databases with PHP. How can I fix this?
CentOS 5.7

I had the same doubt as you, What James said is right, just start another terminal, and run mongo, it will be connected automatically

Related

Failing to start mongo on a remote machine that I SSH into

I'm having some trouble starting up mongo. I am using it on a remote machine that I SSH into where. The remote machine is where I do everything (nothing is done on my own machine). Should I change the bind_ip from 127.0.0.1 to the remote machine's IP address? But regardless of whether I leave the IP as it is or change it to the IP of my remote machine, I get the same error message below:
melissa#simba:~$ mongo --version
MongoDB shell version: 2.6.11
melissa#simba:~$ sudo service mongod start
mongod start/running, process 10623
melissa#simba:~$ mongo
MongoDB shell version: 2.6.11
connecting to: test
2015-09-24T19:27:55.279+0000 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2015-09-24T19:27:55.280+0000 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
My remote machine is: Ubuntu 11.10 (GNU/Linux 2.6.35.4-rscloud x86_64) where the user melissa is a sudoer.
And this is the message I get when starting mongod &
melissa#simba:~$ mongod
mongod --help for help and startup options
2015-09-24T19:40:20.706+0000 [initandlisten] MongoDB starting : pid=10656 port=27017 dbpath=/data/db 64-bit host=simba
2015-09-24T19:40:20.707+0000 [initandlisten] db version v2.6.11
2015-09-24T19:40:20.707+0000 [initandlisten] git version: d00c1735675c457f75a12d530bee85421f0c5548
2015-09-24T19:40:20.707+0000 [initandlisten] build info: Linux build4.ny.cbi.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2015-09-24T19:40:20.707+0000 [initandlisten] allocator: tcmalloc
2015-09-24T19:40:20.707+0000 [initandlisten] options: {}
2015-09-24T19:40:20.746+0000 [initandlisten] exception in initAndListen: 10309 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating
2015-09-24T19:40:20.746+0000 [initandlisten] dbexit:
2015-09-24T19:40:20.746+0000 [initandlisten] shutdown: going to close listening sockets...
2015-09-24T19:40:20.746+0000 [initandlisten] shutdown: going to flush diaglog...
2015-09-24T19:40:20.746+0000 [initandlisten] shutdown: going to close sockets...
2015-09-24T19:40:20.746+0000 [initandlisten] shutdown: waiting for fs preallocator...
2015-09-24T19:40:20.746+0000 [initandlisten] shutdown: lock for final commit...
2015-09-24T19:40:20.746+0000 [initandlisten] shutdown: final commit...
2015-09-24T19:40:20.746+0000 [initandlisten] shutdown: closing all files...
2015-09-24T19:40:20.746+0000 [initandlisten] closeAllFiles() finished
2015-09-24T19:40:20.747+0000 [initandlisten] shutdown: removing fs lock...
2015-09-24T19:40:20.747+0000 [initandlisten] couldn't remove fs lock errno:9 Bad file descriptor
2015-09-24T19:40:20.747+0000 [initandlisten] dbexit: really exiting now
More info:
melissa#simba:~$ ps -edaf | grep mongo
melissa 10748 10555 0 19:45 pts/1 00:00:00 grep --color=auto mongo
melissa#simba:~$ service mongod status
status: Unable to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
melissa#simba:~$ sudo service mongod status
mongod stop/waiting
melissa#simba:~$ ps -aux | grep mongo
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
melissa 10786 0.0 0.3 8148 904 pts/1 S+ 19:47 0:00 grep --color=auto mongo
melissa#simba:~$ mongod --shutdown
There doesn't seem to be a server running with dbpath: /data/db
Then I tried to change the permission based on this, but got a new error:
melissa#simba:~/meeth-app$ sudo chown -R `id -u` /data/db
[sudo] password for melissa:
melissa#simba:~/meeth-app$ mongo
MongoDB shell version: 2.6.11
connecting to: test
2015-09-25T01:57:54.966+0000 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2015-09-25T01:57:54.967+0000 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
melissa#simba:~/meeth-app$ mongod &
[1] 16467
melissa#simba:~/meeth-app$ mongod --help for help and startup options
2015-09-25T01:55:07.366+0000 [initandlisten] MongoDB starting : pid=16467 port=27017 dbpath=/data/db 64-bit host=simba
2015-09-25T01:55:07.366+0000 [initandlisten] db version v2.6.11
2015-09-25T01:55:07.366+0000 [initandlisten] git version: d00c1735675c457f75a12d530bee85421f0c5548
2015-09-25T01:55:07.366+0000 [initandlisten] build info: Linux build4.ny.cbi.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2015-09-25T01:55:07.366+0000 [initandlisten] allocator: tcmalloc
2015-09-25T01:55:07.366+0000 [initandlisten] options: {}
2015-09-25T01:55:07.369+0000 [initandlisten] journal dir=/data/db/journal
2015-09-25T01:55:07.369+0000 [initandlisten] recover : no journal files present, no recovery needed
2015-09-25T01:55:07.370+0000 [initandlisten]
2015-09-25T01:55:07.370+0000 [initandlisten] ERROR: Insufficient free space for journal files
2015-09-25T01:55:07.370+0000 [initandlisten] Please make at least 3379MB available in /data/db/journal or use --smallfiles
2015-09-25T01:55:07.370+0000 [initandlisten]
2015-09-25T01:55:07.370+0000 [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
2015-09-25T01:55:07.370+0000 [initandlisten] dbexit:
2015-09-25T01:55:07.370+0000 [initandlisten] shutdown: going to close listening sockets...
2015-09-25T01:55:07.370+0000 [initandlisten] shutdown: going to flush diaglog...
2015-09-25T01:55:07.370+0000 [initandlisten] shutdown: going to close sockets...
2015-09-25T01:55:07.370+0000 [initandlisten] shutdown: waiting for fs preallocator...
2015-09-25T01:55:07.370+0000 [initandlisten] shutdown: lock for final commit...
2015-09-25T01:55:07.370+0000 [initandlisten] shutdown: final commit...
2015-09-25T01:55:07.370+0000 [initandlisten] shutdown: closing all files...
2015-09-25T01:55:07.370+0000 [initandlisten] closeAllFiles() finished
2015-09-25T01:55:07.370+0000 [initandlisten] journalCleanup...
2015-09-25T01:55:07.370+0000 [initandlisten] removeJournalFiles
2015-09-25T01:55:07.371+0000 [initandlisten] shutdown: removing fs lock...
2015-09-25T01:55:07.371+0000 [initandlisten] dbexit: really exiting now
Permission for /data are wrong. Startup cannot write the PID file or likely the db files either. Try
sudo chmod -R mongodb /data
Here is what happened that made mongo work again. Btw, I'm on Ubuntu 11.10.
Change the owner of /data from root to mongodb: sudo chown -R mongodb /data.
Add a line to turn smallfiles on in /etc/mongod.conf: smallfiles = true
Do NOT run mongod & because it's not running from a place with the right permissions, instead do sudo service mongod start and you can open the mongo shell with mongo.
Thanks to r05c03 and oldlaptop from freenode irc #linux for their help.

MongoDB running locally but when trying to access remotely it failed

Able to run MongoDB locally but when trying to access remotely it failed. Havent done any firewall setup. What could be the issue? How to do troubleshoot?
Also the MongoDB status show running
service mongod status
mongod (pid 25342) is running...
But when trying to restart the service it says
service mongod restart
Stopping mongod: [ OK ]
Starting mongod: [FAILED]
But still the process is running
Update
Tried mongod --repair here is the update
2015-01-10T10:46:33.109-0500 [initandlisten] MongoDB starting : pid=29018 port=2 7017 dbpath=/data/db 64-bit host=ns4008927.ip-192-99-3.net
2015-01-10T10:46:33.109-0500 [initandlisten] db version v2.6.6
2015-01-10T10:46:33.109-0500 [initandlisten] git version: 608e8bc319627693b04cc7 da29ecc300a5f45a1f
2015-01-10T10:46:33.109-0500 [initandlisten] build info: Linux build10.nj1.10gen .cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LI B_VERSION=1_49
2015-01-10T10:46:33.109-0500 [initandlisten] allocator: tcmalloc
2015-01-10T10:46:33.109-0500 [initandlisten] options: { repair: true }
2015-01-10T10:46:33.112-0500 [initandlisten] finished checking dbs
2015-01-10T10:46:33.112-0500 [initandlisten] dbexit:
2015-01-10T10:46:33.112-0500 [initandlisten] shutdown: going to close listening sockets...
2015-01-10T10:46:33.112-0500 [initandlisten] shutdown: going to flush diaglog...
2015-01-10T10:46:33.112-0500 [initandlisten] shutdown: going to close sockets...
2015-01-10T10:46:33.112-0500 [initandlisten] shutdown: waiting for fs preallocat or...
2015-01-10T10:46:33.112-0500 [initandlisten] shutdown: closing all files...
2015-01-10T10:46:33.112-0500 [initandlisten] closeAllFiles() finished
2015-01-10T10:46:33.112-0500 [initandlisten] shutdown: removing fs lock...
2015-01-10T10:46:33.112-0500 [initandlisten] dbexit: really exiting now
You need to remove this line from mongo's config file (on Ubuntu, mine is at /etc/mongod.conf):
bind_ip = 127.0.0.1
Or, if it's YAML,
bindIp: 127.0.0.1
Source: http://docs.mongodb.org/manual/reference/configuration-options/
"Changed in version 2.6.0: The deb and rpm packages include a default configuration file that sets net.bindIp to 127.0.0.1."
The default value for bindIp/bind_ip is "all interfaces" - so that's where the deletion comes in handy.

MongoDB --dbpath giving access to old data

I have mongo installed on my local machine. When I start the database by running mongod I got this error (that is fairly common, and this site has solutions to workarounds):
$ mongod
mongod --help for help and startup options
2015-01-01T22:31:17.350-0600 [initandlisten] MongoDB starting : pid=2835 port=27017 dbpath=/data/db 64-bit host=hermes
2015-01-01T22:31:17.351-0600 [initandlisten] db version v2.6.4
2015-01-01T22:31:17.351-0600 [initandlisten] git version: nogitversion
2015-01-01T22:31:17.351-0600 [initandlisten] build info: Darwin minimavericks.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
2015-01-01T22:31:17.351-0600 [initandlisten] allocator: tcmalloc
2015-01-01T22:31:17.351-0600 [initandlisten] options: {}
2015-01-01T22:31:17.351-0600 [initandlisten] exception in initAndListen: 10296
*********************************************************************
ERROR: dbpath (/data/db) does not exist.
Create this directory or give existing directory in --dbpath.
See http://dochub.mongodb.org/core/startingandstoppingmongo
*********************************************************************
, terminating
2015-01-01T22:31:17.351-0600 [initandlisten] dbexit:
2015-01-01T22:31:17.351-0600 [initandlisten] shutdown: going to close listening sockets...
2015-01-01T22:31:17.351-0600 [initandlisten] shutdown: going to flush diaglog...
2015-01-01T22:31:17.351-0600 [initandlisten] shutdown: going to close sockets...
2015-01-01T22:31:17.351-0600 [initandlisten] shutdown: waiting for fs preallocator...
2015-01-01T22:31:17.351-0600 [initandlisten] shutdown: lock for final commit...
2015-01-01T22:31:17.351-0600 [initandlisten] shutdown: final commit...
2015-01-01T22:31:17.351-0600 [initandlisten] shutdown: closing all files...
2015-01-01T22:31:17.352-0600 [initandlisten] closeAllFiles() finished
2015-01-01T22:31:17.355-0600 [initandlisten] dbexit: really exiting now
I created a directory in my development environment at /my/curent/directory/data/db and started mongo again with $ mongod --dbpath /my/curent/directory/data/db, this time producing:
2015-01-01T22:32:31.282-0600 [initandlisten] options: { storage: { dbPath: "./data/db" } }
2015-01-01T22:32:31.319-0600 [initandlisten] journal dir=./data/db/journal
2015-01-01T22:32:31.320-0600 [initandlisten] recover : no journal files present, no recovery needed
2015-01-01T22:32:31.383-0600 [FileAllocator] allocating new datafile ./data/db/local.ns, filling with zeroes...
2015-01-01T22:32:31.383-0600 [FileAllocator] creating directory ./data/db/_tmp
2015-01-01T22:32:31.482-0600 [FileAllocator] done allocating datafile ./data/db/local.ns, size: 16MB, took 0.098 secs
2015-01-01T22:32:31.842-0600 [FileAllocator] allocating new datafile ./data/db/local.0, filling with zeroes...
2015-01-01T22:32:32.756-0600 [FileAllocator] done allocating datafile ./data/db/local.0, size: 64MB, took 0.914 secs
2015-01-01T22:32:33.215-0600 [initandlisten] build index on: local.startup_log properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "local.startup_log" }
2015-01-01T22:32:33.216-0600 [initandlisten] added index to empty collection
2015-01-01T22:32:33.216-0600 [initandlisten] command local.$cmd command: create { create: "startup_log", size: 10485760, capped: true } ntoreturn:1 keyUpdates:0 numYields:0 reslen:37 1852ms
2015-01-01T22:32:33.216-0600 [initandlisten] waiting for connections on port 27017
2015-01-01T22:33:31.402-0600 [clientcursormon] mem (MB) res:33 virt:2635
2015-01-01T22:33:31.402-0600 [clientcursormon] mapped (incl journal view):160
2015-01-01T22:33:31.402-0600 [clientcursormon] connections:0
It's great. Using the mongo shell, I can access my collections that I was working with in this directory, but I can also see all of my other databases from weeks prior (when this directory did not exist) using show dbs. What purpose does the --dbpath option serve if not to isolate where data is stored? Is something weird happening here?
MongoDB requires a data directory to store all data. MongoDB’s default data directory path is \data\db.
To use an alternate dbpath, specify the path in the configuration file (e.g. C:\Program Files\MongoDB\mongod.cfg) or on the command line with the --dbpath option.
Read more about MongoDB Installation
If you are using windows then create data\db folder under C drive.
If you are using your own directory for data then pass full path of the folder as --dbpath argument value.
If MongoDB’s default data directory path "\data\db" is correct but accessing old data means just check your Task Manager.
End all mongo command and restart your mongodb. I tried it, working well

MongoDB Unrecoverable Failure

My Mac (OSX 9) had a power blip and when restarted, I have one db in Mongo that is completely unrecoverable. I am using the db per directory with dbpath and logpath specified options and was able to recover all except one of the dbs. This is the log from the unrecoverable one. Any ideas would be helpful - I have run --repair and removed the lock file with zero results.
LOG FILE:
2014-12-01T09:40:40.607-0700 [initandlisten] MongoDB starting : pid=1273 port=27017 dbpath=/mongo/dbs/ 64-bit host=bbcoms-imac-2.body.local
2014-12-01T09:40:40.607-0700 [initandlisten]
2014-12-01T09:40:40.607-0700 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2014-12-01T09:40:40.608-0700 [initandlisten] db version v2.6.5
2014-12-01T09:40:40.608-0700 [initandlisten] git version: nogitversion
2014-12-01T09:40:40.608-0700 [initandlisten] build info: Darwin minimavericks.local 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
2014-12-01T09:40:40.608-0700 [initandlisten] allocator: tcmalloc
2014-12-01T09:40:40.608-0700 [initandlisten] options: { repair: true, storage: { dbPath: "/mongo/dbs/", repairPath: "/mongo/db" } }
2014-12-01T09:40:40.608-0700 [initandlisten] exception in initAndListen: 12590 repairpath (/mongo/db) does not exist, terminating
2014-12-01T09:40:40.608-0700 [initandlisten] dbexit:
2014-12-01T09:40:40.608-0700 [initandlisten] shutdown: going to close listening sockets...
2014-12-01T09:40:40.608-0700 [initandlisten] shutdown: going to flush diaglog...
2014-12-01T09:40:40.609-0700 [initandlisten] shutdown: going to close sockets...
2014-12-01T09:20:58.339-0700 [clientcursormon] mapped (incl journal view):2176
2014-12-01T09:20:58.339-0700 [clientcursormon] connections:1
2014-12-01T09:25:58.390-0700 [clientcursormon] mem (MB) res:41 virt:4655
2014-12-01T09:25:58.390-0700 [clientcursormon] mapped (incl journal view):2176
2014-12-01T09:25:58.390-0700 [clientcursormon] connections:1
2014-12-01T09:28:53.518-0700 [conn1] end connection 127.0.0.1:50225 (0 connections now open)
2014-12-01T09:30:55.153-0700 [initandlisten] connection accepted from 127.0.0.1:50411 #3 (1 connection now open)
2014-12-01T09:30:57.586-0700 [conn3] command admin.$cmd command: listDatabases { listDatabases: 1.0 } keyUpdates:0 numYields:0 locks(micros) R:3 W:105826 r:14 reslen:337 106ms
2014-12-01T09:30:58.313-0700 [TTLMonitor] articles.system.indexes Assertion failure isOk() src/mongo/db/storage/extent.h 80
2014-12-01T09:30:58.316-0700 [TTLMonitor] articles.system.indexes 0x1010665aa 0x101011135 0x100ffdbf2 0x100e1ca0c 0x100e4d4bc 0x100977b13 0x100ad7187 0x100cfdbcb 0x100ce5e6d 0x100b7d0b7 0x100b85055 0x100b852bb 0x1008dae1b 0x1008bee8a 0x100b854f1 0x100e50be6 0x100e4fe07 0x101000606 0x10109f2a1 0x7fff84fd0899
0 mongod 0x00000001010665aa _ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEE + 58
1 mongod 0x0000000101011135 _ZN5mongo10logContextEPKc + 453
2 mongod 0x0000000100ffdbf2 _ZN5mongo12verifyFailedEPKcS1_j + 626
3 mongod 0x0000000100e1ca0c _ZNK5mongo13ExtentManager9getExtentERKNS_7DiskLocEb + 108
4 mongod 0x0000000100e4d4bc _ZN5mongo12FlatIteratorC2EPKNS_10CollectionERKNS_7DiskLocERKNS_20CollectionScanParams9DirectionE + 92
5 mongod 0x0000000100977b13 _ZNK5mongo10Collection11getIteratorERKNS_7DiskLocEbRKNS_20CollectionScanParams9DirectionE + 115
6 mongod 0x0000000100ad7187 _ZN5mongo14CollectionScan4workEPm + 519
7 mongod 0x0000000100cfdbcb _ZN5mongo12PlanExecutor7getNextEPNS_7BSONObjEPNS_7DiskLocE + 283
8 mongod 0x0000000100ce5e6d _ZN5mongo11newRunQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_ + 3101
9 mongod 0x0000000100b7d0b7 _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE + 2663
10 mongod 0x0000000100b85055 _ZN5mongo14DBDirectClient4callERNS_7MessageES2_bPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE + 165
2014-12-01T09:40:40.609-0700 [initandlisten] shutdown: waiting for fs preallocator...
2014-12-01T09:40:40.609-0700 [initandlisten] shutdown: closing all files...
2014-12-01T09:40:40.610-0700 [initandlisten] closeAllFiles() finished
2014-12-01T09:40:40.610-0700 [initandlisten] dbexit: really exiting now
I see the error about an assertion failure with an extent, but above that you have the lines
2014-12-01T09:40:40.608-0700 [initandlisten] options: { repair: true, storage: { dbPath: "/mongo/dbs/", repairPath: "/mongo/db" } }
2014-12-01T09:40:40.608-0700 [initandlisten] exception in initAndListen: 12590 repairpath (/mongo/db) does not exist, terminating
so it seems you aren't supplying a valid repairPath when you are running repair. Can you start the server? Is this mongod part of a replica set? If the server can start, can you run db.collection.validate on the collections in the bad database? What happens?

mongodb suddenly stopped to work

I've had mongo running for a while on my dev server running Centos 6.5 and mongo 2.6.4.
But then I needed to install mysql for a different project and now suddenly mongo doesn't work.
I tried to re-install it and upgrade it to 2.6.5 at the same time. I've tried to start it and restart it:
# sudo service mongod restart
Stopping mongod: [FAILED]
Starting mongod: [FAILED]
Repairing it said I missed /data/db which I then created. The repair responds like this:
# sudo mongod --repair
2014-10-24T15:52:14.710-0400 [initandlisten] MongoDB starting : pid=1182 port=27017 dbpath=/data/db 64-bit host=myhost
2014-10-24T15:52:14.710-0400 [initandlisten] db version v2.6.5
2014-10-24T15:52:14.710-0400 [initandlisten] git version: e99d4fcb4279c0279796f237aa92fe3b64560bf6
2014-10-24T15:52:14.710-0400 [initandlisten] build info: Linux build8.nj1.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2014-10-24T15:52:14.710-0400 [initandlisten] allocator: tcmalloc
2014-10-24T15:52:14.710-0400 [initandlisten] options: { repair: true }
2014-10-24T15:52:14.726-0400 [initandlisten] repairDatabase local
2014-10-24T15:52:14.726-0400 [initandlisten] allocating new ns file /data/db/_tmp_repairDatabase_0/local.ns, filling with zeroes...
2014-10-24T15:52:14.843-0400 [FileAllocator] allocating new datafile /data/db/_tmp_repairDatabase_0/local.0, filling with zeroes...
2014-10-24T15:52:14.843-0400 [FileAllocator] creating directory /data/db/_tmp_repairDatabase_0/_tmp
2014-10-24T15:52:14.879-0400 [FileAllocator] done allocating datafile /data/db/_tmp_repairDatabase_0/local.0, size: 64MB, took 0.017 secs
2014-10-24T15:52:14.897-0400 [initandlisten] finished checking dbs
2014-10-24T15:52:14.897-0400 [initandlisten] dbexit:
2014-10-24T15:52:14.897-0400 [initandlisten] shutdown: going to close listening sockets...
2014-10-24T15:52:14.897-0400 [initandlisten] shutdown: going to flush diaglog...
2014-10-24T15:52:14.897-0400 [initandlisten] shutdown: going to close sockets...
2014-10-24T15:52:14.897-0400 [initandlisten] shutdown: waiting for fs preallocator...
2014-10-24T15:52:14.897-0400 [initandlisten] shutdown: closing all files...
2014-10-24T15:52:14.897-0400 [initandlisten] closeAllFiles() finished
2014-10-24T15:52:14.897-0400 [initandlisten] shutdown: removing fs lock...
2014-10-24T15:52:14.897-0400 [initandlisten] dbexit: really exiting now
Starting it again, and fails.
did this:
#semanage port -a -t mongodb_port_t -p tcp 27017
Killed
Trying to enter the mongo shell responds with this:
# mongo
MongoDB shell version: 2.6.5
connecting to: test
2014-10-24T15:59:40.243-0400 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2014-10-24T15:59:40.244-0400 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
I'm out of ideas. Any suggestions?