This is my first experience with MongoDB. I am a SQL Server and MySQL DBA, so I am kind of lost here.
The issue is that mongod will not start (3.2 version in centos 7). I have tried every possible thing I can think off, it will just not start. Here are a few useful information:
Log entry:
2016-02-16T20:38:41.954+0100 I CONTROL [initandlisten] MongoDB starting : pid=2241 port=27017 dbpath=/var/lib/mongo 64-bit host=localhost.localdomain
2016-02-16T20:38:41.954+0100 I CONTROL [initandlisten] db version v3.2.1
2016-02-16T20:38:41.954+0100 I CONTROL [initandlisten] git version: a14d55980c2cdc565d4704a7e3ad37e4e535c1b2
2016-02-16T20:38:41.954+0100 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2016-02-16T20:38:41.954+0100 I CONTROL [initandlisten] allocator: tcmalloc
2016-02-16T20:38:41.954+0100 I CONTROL [initandlisten] modules: none
2016-02-16T20:38:41.954+0100 I CONTROL [initandlisten] build environment:
2016-02-16T20:38:41.954+0100 I CONTROL [initandlisten] distmod: rhel70
2016-02-16T20:38:41.954+0100 I CONTROL [initandlisten] distarch: x86_64
2016-02-16T20:38:41.954+0100 I CONTROL [initandlisten] target_arch: x86_64
2016-02-16T20:38:41.954+0100 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "0.0.0.0", port: 27017 }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/mongod.pid" }, storage: { dbPath: "/var/lib/mongo", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2016-02-16T20:38:41.997+0100 I - [initandlisten] Detected data files in /var/lib/mongo created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2016-02-16T20:38:41.997+0100 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2016-02-16T20:38:42.150+0100 E STORAGE [initandlisten] WiredTiger (13) [1455651522:150880][2241:0x7fa44d9c4dc0], txn-recover: /var/lib/mongo/journal/WiredTigerLog.0000000008: Permission denied
2016-02-16T20:38:42.150+0100 E STORAGE [initandlisten] WiredTiger (13) [1455651522:150955][2241:0x7fa44d9c4dc0], txn-recover: Recovery failed: Permission denied
2016-02-16T20:38:42.152+0100 I - [initandlisten] Assertion: 28595:13: Permission denied
2016-02-16T20:38:42.177+0100 I STORAGE [initandlisten] exception in initAndListen: 28595 13: Permission denied, terminating
2016-02-16T20:38:42.177+0100 I CONTROL [initandlisten] dbexit: rc: 100
Permissions:
-rwxr-xr-x 1 mongod mongod 16384 Feb 16 20:44 collection-0-1312287423206501205.wt
-rwxr-xr-x 1 mongod mongod 36864 Feb 16 20:44 collection-0--3025592519689880938.wt
-rwxr-xr-x 1 mongod mongod 16384 Feb 16 20:44 collection-2-1312287423206501205.wt
drwxr-xr-x 2 mongod mongod 4096 Feb 16 20:44 diagnostic.data
-rwxr-xr-x 1 mongod mongod 16384 Feb 16 20:44 index-1-1312287423206501205.wt
-rwxr-xr-x 1 mongod mongod 36864 Feb 16 20:44 index-1--3025592519689880938.wt
-rwxr-xr-x 1 mongod mongod 16384 Feb 16 18:00 index-3-1312287423206501205.wt
-rwxr-xr-x 1 mongod mongod 16384 Feb 16 18:00 index-4-1312287423206501205.wt
drwxr-xr-x 2 mongod mongod 107 Feb 16 20:44 journal
-rwxr-xr-x 1 mongod mongod 32768 Feb 16 20:44 _mdb_catalog.wt
-rwxr-xr-x 1 mongod mongod 0 Feb 16 20:44 mongod.lock
-rwxr-xr-x 1 mongod mongod 36864 Feb 16 20:44 sizeStorer.wt
-rwxr-xr-x 1 mongod mongod 95 Feb 16 17:54 storage.bson
-rwxr-xr-x 1 mongod mongod 49 Feb 16 17:54 WiredTiger
-rwxr-xr-x 1 mongod mongod 4096 Feb 16 20:44 WiredTigerLAS.wt
-rwxr-xr-x 1 mongod mongod 21 Feb 16 17:54 WiredTiger.lock
-rwxr-xr-x 1 mongod mongod 925 Feb 16 20:44 WiredTiger.turtle
-rwxr-xr-x 1 mongod mongod 53248 Feb 16 20:44 WiredTiger.wt
Configuration file:
# mongod.conf
# for documentation of all options, see:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# Where and how to store data.
storage:
dbPath: /var/lib/mongo/
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# how the process runs
processManagement:
fork: true # fork and run in background
pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
# network interfaces
net:
port: 27017
bindIp: 0.0.0.0 # Listen to local interface only, comment to listen on all interfaces.
security:
authorization : enabled
Conf file is default, exception is the security feature which is enabled. It fails with permission error. I have even tried to set permissions on /var/lib/mongo to 777. Still the same error.
I could really use some help on this one.