Openstack - Kilo
OS - CentOS Linux release 7.2.1511 (Core)
Applying 10.xx.xxx.xx_mongodb.pp
Applying 10.xx.xxx.xx_redis.pp
10.xx.xxx.xx_mongodb.pp: [ ERROR ]
Applying Puppet manifests [ ERROR ]
ERROR : Error appeared during Puppet run: 10.xx.xxx.xx_mongodb.pp
Error: Unable to connect to mongodb server! (10.xx.xxx.xx:27017)
You will find full trace in log /var/tmp/packstack/20160101-065236-2OHqyr/manifests/10.xx.xxx.xx_mongodb.pp.log
Please check log file /var/tmp/packstack/20160101-065236-2OHqyr/openstack-setup.log for more information
Additional information:
* A new answerfile was created in: /root/packstack-answers-20160101-065237.txt
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* File /root/keystonerc_admin has been created on OpenStack client host 10.xx.xxx.xx. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to 10.xx.xxx.xx/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* To use Nagios, browse to 10.xx.xxx.xx/nagios username: nagiosadmin, password: d11c096693bb44cd
mabgodb.log detail
2015-12-31T14:18:24.233-0500 [initandlisten] MongoDB starting : pid=34017 port=27017 dbpath=/var/lib/mongodb 64-bit host=vcswin01.samgpunb.symantec.com
2015-12-31T14:18:24.234-0500 [initandlisten]
2015-12-31T14:18:24.234-0500 [initandlisten] ** WARNING: You are running on a NUMA machine.
2015-12-31T14:18:24.234-0500 [initandlisten] ** We suggest launching mongod like this to avoid performance problems:
2015-12-31T14:18:24.234-0500 [initandlisten] ** numactl --interleave=all mongod [other options]
2015-12-31T14:18:24.234-0500 [initandlisten]
2015-12-31T14:18:24.234-0500 [initandlisten] db version v2.6.6
2015-12-31T14:18:24.234-0500 [initandlisten] git version: nogitversion
2015-12-31T14:18:24.234-0500 [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2015-12-31T14:18:24.235-0500 [initandlisten] build info: Linux c1bg.rdu2.centos.org 2.6.32-431.20.3.el6.x86_64 #1 SMP Thu Jun 19 21:14:45 UTC 2014 x86_64 BOOST_LIB_VERSION=1_53
2015-12-31T14:18:24.235-0500 [initandlisten] allocator: tcmalloc
2015-12-31T14:18:24.235-0500 [initandlisten] options: { command: [ "run" ], config: "/etc/mongodb.conf", net: { bindIp: "127.0.0.1", http: { enabled: false }, port: 27017 }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/mongod.pid" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", path: "/var/log/mongodb/mongodb.log", quiet: true } }
2015-12-31T14:18:24.235-0500 [initandlisten]
2015-12-31T14:18:24.235-0500 [initandlisten] ** WARNING: Readahead for /var/lib/mongodb is set to 4096KB
2015-12-31T14:18:24.235-0500 [initandlisten] ** We suggest setting it to 256KB (512 sectors) or less
2015-12-31T14:18:24.235-0500 [initandlisten] ** http://dochub.mongodb.org/core/readahead
2015-12-31T14:18:24.236-0500 [initandlisten] journal dir=/var/lib/mongodb/journal
2015-12-31T14:18:24.237-0500 [initandlisten] recover : no journal files present, no recovery needed
2015-12-31T14:18:24.260-0500 [initandlisten] allocating new ns file /var/lib/mongodb/local.ns, filling with zeroes...
2015-12-31T14:18:24.293-0500 [FileAllocator] allocating new datafile /var/lib/mongodb/local.0, filling with zeroes...
2015-12-31T14:18:24.293-0500 [FileAllocator] creating directory /var/lib/mongodb/_tmp
2015-12-31T14:18:24.295-0500 [FileAllocator] done allocating datafile /var/lib/mongodb/local.0, size: 64MB, took 0 secs
2015-12-31T14:18:24.299-0500 [initandlisten] build index on: local.startup_log properties: { v: 1, key: { _id: 1 }, name: "id", ns: "local.startup_log" }
2015-12-31T14:18:24.299-0500 [initandlisten] added index to empty collection
2015-12-31T14:18:24.300-0500 [initandlisten] waiting for connections on port 27017
For now see "Hackery setting up RDO Kilo on CentOS 7.2 with Mongodb up and running as of 01/08/2016"
http://dbaxps.blogspot.com/2016/01/set-up-rdo-kilo-on-centos-72-with.html
Related
when i run the command sudo service mongod start the MongoDB cannot start and when i run the service mongod status it shows it has not been started, and the log shows:
2018-07-05T14:32:03.595+0800 I CONTROL [main] ***** SERVER RESTARTED *****
2018-07-05T14:32:03.605+0800 I CONTROL [initandlisten] MongoDB starting : pid=15656 port=27017 dbpath=/var/lib/mongodb 64-bit host=iZbp1ik57sceo226yjpivxZ
2018-07-05T14:32:03.605+0800 I CONTROL [initandlisten] db version v4.0.0-rc7
2018-07-05T14:32:03.605+0800 I CONTROL [initandlisten] git version: 7230641bb09b1ceb04c3135cf83a5044c4838906
2018-07-05T14:32:03.605+0800 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
2018-07-05T14:32:03.605+0800 I CONTROL [initandlisten] allocator: tcmalloc
2018-07-05T14:32:03.605+0800 I CONTROL [initandlisten] modules: none
2018-07-05T14:32:03.605+0800 I CONTROL [initandlisten] build environment:
2018-07-05T14:32:03.605+0800 I CONTROL [initandlisten] distmod: ubuntu1604
2018-07-05T14:32:03.605+0800 I CONTROL [initandlisten] distarch: x86_64
2018-07-05T14:32:03.605+0800 I CONTROL [initandlisten] target_arch: x86_64
2018-07-05T14:32:03.605+0800 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "0.0.0.0", port: 27017 }, processManagement: { timeZoneInfo: "/usr/share/zoneinfo" }, security: { authorization: "enabled" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2018-07-05T14:32:03.605+0800 I STORAGE [initandlisten] Detected data files in /var/lib/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2018-07-05T14:32:03.605+0800 I STORAGE [initandlisten]
2018-07-05T14:32:03.605+0800 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2018-07-05T14:32:03.605+0800 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2018-07-05T14:32:03.605+0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=488M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2018-07-05T14:32:04.204+0800 E STORAGE [initandlisten] WiredTiger error (13) [1530772324:204155][15656:0x7fb5cb734a00], wiredtiger_open: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1530772324:204155][15656:0x7fb5cb734a00], wiredtiger_open: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2018-07-05T14:32:04.204+0800 E STORAGE [initandlisten] WiredTiger error (13) [1530772324:204458][15656:0x7fb5cb734a00], wiredtiger_open: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1530772324:204458][15656:0x7fb5cb734a00], wiredtiger_open: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2018-07-05T14:32:04.204+0800 E STORAGE [initandlisten] WiredTiger error (13) [1530772324:204610][15656:0x7fb5cb734a00], wiredtiger_open: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1530772324:204610][15656:0x7fb5cb734a00], wiredtiger_open: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2018-07-05T14:32:04.204+0800 F STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version.
2018-07-05T14:32:04.204+0800 F STORAGE [initandlisten] 13: Permission denied
2018-07-05T14:32:04.204+0800 F - [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 194
2018-07-05T14:32:04.204+0800 F - [initandlisten]
***aborting after fassert() failure
but when i tried mongod --auth -f /etc/mongod.conf the server can start and when visit the log file it shows that:
2018-07-05T14:35:34.228+0800 I CONTROL [main] ***** SERVER RESTARTED *****
2018-07-05T14:35:34.239+0800 I CONTROL [initandlisten] MongoDB starting : pid=15665 port=27017 dbpath=/var/lib/mongodb 64-bit host=iZbp1ik57sceo226yjpivxZ
2018-07-05T14:35:34.239+0800 I CONTROL [initandlisten] db version v4.0.0-rc7
2018-07-05T14:35:34.239+0800 I CONTROL [initandlisten] git version: 7230641bb09b1ceb04c3135cf83a5044c4838906
2018-07-05T14:35:34.240+0800 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
2018-07-05T14:35:34.240+0800 I CONTROL [initandlisten] allocator: tcmalloc
2018-07-05T14:35:34.240+0800 I CONTROL [initandlisten] modules: none
2018-07-05T14:35:34.240+0800 I CONTROL [initandlisten] build environment:
2018-07-05T14:35:34.240+0800 I CONTROL [initandlisten] distmod: ubuntu1604
2018-07-05T14:35:34.240+0800 I CONTROL [initandlisten] distarch: x86_64
2018-07-05T14:35:34.240+0800 I CONTROL [initandlisten] target_arch: x86_64
2018-07-05T14:35:34.240+0800 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "0.0.0.0", port: 27017 }, processManagement: { timeZoneInfo: "/usr/share/zoneinfo" }, security: { authorization: "enabled" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2018-07-05T14:35:34.240+0800 I STORAGE [initandlisten] Detected data files in /var/lib/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2018-07-05T14:35:34.240+0800 I STORAGE [initandlisten]
2018-07-05T14:35:34.240+0800 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2018-07-05T14:35:34.240+0800 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2018-07-05T14:35:34.240+0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=488M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2018-07-05T14:35:35.005+0800 I STORAGE [initandlisten] WiredTiger message [1530772535:5560][15665:0x7f0ab9512a00], txn-recover: Main recovery loop: starting at 18/8960
2018-07-05T14:35:35.113+0800 I STORAGE [initandlisten] WiredTiger message [1530772535:113878][15665:0x7f0ab9512a00], txn-recover: Recovering log 18 through 19
2018-07-05T14:35:35.179+0800 I STORAGE [initandlisten] WiredTiger message [1530772535:179582][15665:0x7f0ab9512a00], txn-recover: Recovering log 19 through 19
2018-07-05T14:35:35.248+0800 I STORAGE [initandlisten] WiredTiger message [1530772535:248647][15665:0x7f0ab9512a00], txn-recover: Set global recovery timestamp: 0
2018-07-05T14:35:35.283+0800 I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
2018-07-05T14:35:35.311+0800 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2018-07-05T14:35:35.311+0800 I CONTROL [initandlisten]
2018-07-05T14:35:35.312+0800 I CONTROL [initandlisten]
2018-07-05T14:35:35.312+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2018-07-05T14:35:35.312+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2018-07-05T14:35:35.312+0800 I CONTROL [initandlisten]
2018-07-05T14:35:35.312+0800 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 7856 processes, 65535 files. Number of processes should be at least 32767.5 : 0.5 times number of files.
2018-07-05T14:35:35.312+0800 I CONTROL [initandlisten]
2018-07-05T14:35:35.336+0800 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/var/lib/mongodb/diagnostic.data'
2018-07-05T14:35:35.337+0800 I NETWORK [initandlisten] waiting for connections on port 27017
and the whole config file is as below:
# mongod.conf
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# network interfaces
net:
port: 27017
bindIp: 0.0.0.0
# how the process runs
processManagement:
timeZoneInfo: /usr/share/zoneinfo
#security:
security:
authorization: enabled
#operationProfiling:
#replication:
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp:
So, what is the matter with it? why the first method can not run it but the second method can start it?
According to #Markus W Mahlberg, and after run these command, the problem has been solved.
[sudo] chown mongodb.mongodb -R /var/lib/mongodb
If you ran the command mongod as root on the server while testing your configuration file, as in:
$ mongod -f /etc/mongod.conf
The mongo server will generate the mongo.lock file and the WiredTiger.lock files and further files in the mongodb folder with root:root ownership as in:
-rw------- 1 mongodb mongodb 36864 Nov 25 12:03 index-95--8062076833940689665.wt
-rw------- 1 mongodb mongodb 45056 Nov 25 12:03 index-96--8062076833940689665.wt
-rw------- 1 mongodb mongodb 36864 Nov 25 12:03 index-99--8062076833940689665.wt
drwx------ 2 mongodb mongodb 4096 Nov 25 15:23 journal/
-rw------- 1 mongodb mongodb 45056 Nov 25 15:32 _mdb_catalog.wt
-rw------- 1 root root 0 Nov 25 15:32 mongod.lock
-rw------- 1 mongodb mongodb 36864 Nov 25 15:32 sizeStorer.wt
-rw------- 1 mongodb mongodb 114 Oct 17 17:41 storage.bson
-rw------- 1 mongodb mongodb 44 Oct 17 17:41 WiredTiger
-rw------- 1 mongodb mongodb 4096 Nov 25 15:32 WiredTigerLAS.wt
-rw------- 1 root root 21 Nov 25 15:22 WiredTiger.lock
-rw------- 1 mongodb mongodb 1201 Nov 25 15:32 WiredTiger.turtle
-rw------- 1 mongodb mongodb 188416 Nov 25 15:32 WiredTiger.wt
The service is most likely configured to run mongod with the mongodb user. which will not have permission to remove, or overwrite the WiredTiger.lock nor the mongod.lock or any other file that were created when mongod was running using the root user. In the case above the /var/lib/mongodb/WiredTiger.turtle
The solution is to reset the ownership of all the files in the folder in the case above the /var/lib/mongodb/ folder to the mongodb user:
$ sudo chown -R mongodb:mongodb /var/lib/mongodb/
That should solve the issue.
On a mac OS
Browse to the data directory you configured when installing mongodb. For ex: data/db where the mongod.lock and WiredTiger.lock are present
sudo chown -R {username}:{groupname} /data/db
Make sure you have stopped any mongo processes
run 'mongod' command
You should now see the prompt which is now ready to accept connections.
I tried to start up my computer's mongodb service and it wouldn't start. I spent over an hour trying to debug it during which time I tried many solutions. Trying all of them may have messed up my mongo install, but I tried reinstalling mongo to get a fresh start. That didn't work either. I now have the following error and cannot find anything on google about how to fix it.
2017-06-01T16:57:02.339-0400 I CONTROL [main] ***** SERVER RESTARTED *****
2017-06-01T16:57:02.343-0400 I CONTROL [initandlisten] MongoDB starting : pid=15070 port=27017 dbpath=/var/lib/mongodb 64-bit host=moss-greenelab
2017-06-01T16:57:02.343-0400 I CONTROL [initandlisten] db version v3.2.13
2017-06-01T16:57:02.343-0400 I CONTROL [initandlisten] git version: 23899209cad60aaafe114f6aea6cb83025ff51bc
2017-06-01T16:57:02.343-0400 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
2017-06-01T16:57:02.343-0400 I CONTROL [initandlisten] allocator: tcmalloc
2017-06-01T16:57:02.343-0400 I CONTROL [initandlisten] modules: none
2017-06-01T16:57:02.343-0400 I CONTROL [initandlisten] build environment:
2017-06-01T16:57:02.343-0400 I CONTROL [initandlisten] distmod: ubuntu1604
2017-06-01T16:57:02.343-0400 I CONTROL [initandlisten] distarch: x86_64
2017-06-01T16:57:02.343-0400 I CONTROL [initandlisten] target_arch: x86_64
2017-06-01T16:57:02.343-0400 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1", port: 27017 }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log", quiet: true } }
2017-06-01T16:57:02.361-0400 I - [initandlisten] Detected data files in /var/lib/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2017-06-01T16:57:02.361-0400 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=18G,session_max=20000,eviction=(threads_min=4,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),
2017-06-01T16:57:02.364-0400 E STORAGE [initandlisten] WiredTiger (13) [1496350622:364565][15070:0x7f80e0292c80], connection: /var/lib/mongodb/journal/WiredTigerPreplog.0000000002: file-remove: unlink: Permission denied
2017-06-01T16:57:02.383-0400 I - [initandlisten] Assertion: 28595:13: Permission denied
2017-06-01T16:57:02.383-0400 I STORAGE [initandlisten] exception in initAndListen: 28595 13: Permission denied, terminating
2017-06-01T16:57:02.383-0400 I CONTROL [initandlisten] dbexit: rc: 100
I'm running Ubuntu 16.04.
Here's the telling part of the log:
/var/lib/mongodb/journal/WiredTigerPreplog.0000000002: file-remove: unlink: Permission denied
So have a look at ls -la /var/lib/mongodb/journal and see what the permissions on those files are. I'm betting that those (an probably others) are not properly owned by the correct user, which is normally mongodb on Ubuntu.
Assuming you've got an issue with ownership there, you can just run chown -R mongodb:mongodb /var/lib/mongodb.
If that doesn't work, as a last resort you can always just wipe out your data directory (assuming you don't need your data!) by running rm -rf /var/lib/mongodb/*.
I'm getting this error when I'm trying to start mongodb:
[initandlisten] exception in initAndListen: 20 Attempted to create a lock file on a read-only directory: /mnt/data/mng, terminating
I'm using centos 7.3 and I don't know if I can be an issue related with se_linux...
As you can see I'm set that mongo storage directory is on /mnt/data/mng. The problem seems to be related with some kind of permissions. I've took a look on there:
# ls -lha /mnt/data/
drwxr-xr-x. 3 root root 17 Jun 1 10:01 .
drwxr-xr-x. 3 root root 18 Jun 1 10:01 ..
drwxr-xr-x. 2 mongod mongod 6 Jun 1 10:01 mng
Here you can see the complete message:
I CONTROL [main] ***** SERVER RESTARTED *****
I CONTROL [initandlisten] MongoDB starting : pid=3373 port=30158 dbpath=/mnt/data/mng 64-bit host=localhost.localdomain
I CONTROL [initandlisten] db version v3.4.2
I CONTROL [initandlisten] git version: 3f76e40c105fc223b3e5aac3e20dcd026b83b38b
I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
I CONTROL [initandlisten] allocator: tcmalloc
I CONTROL [initandlisten] modules: none
I CONTROL [initandlisten] build environment:
I CONTROL [initandlisten] distmod: rhel70
I CONTROL [initandlisten] distarch: x86_64
I CONTROL [initandlisten] target_arch: x86_64
I CONTROL [initandlisten] options: { command: [ "run" ], config: "/etc/mongod.conf", net: { bindIp: "localhost", port: 30158 }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/mongod.pid" }, security: { authorization: "enabled" }, storage: { dbPath: "/mnt/data/mng", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log", quiet: true } }
I STORAGE [initandlisten] exception in initAndListen: 20 Attempted to create a lock file on a read-only directory: /mnt/data/mng, terminating
I NETWORK [initandlisten] shutdown: going to close listening sockets...
I NETWORK [initandlisten] shutdown: going to flush diaglog...
I CONTROL [initandlisten] now exiting
I CONTROL [initandlisten] shutting down with code:100
I have installed MongoDB 3.4 on Windows 10 and I cannot execute any commands to view or create users.
I have followed the documentation to the letter and read as many answers to what seems to be a common problem, but I still cannot solve this problem.
Any help would be appreciated. Below are the command prompt outputs:
Command prompt 1 running with admin rights:
C:\Program Files\MongoDB\Server\3.4\bin>mongod.exe --storageEngine mmapv1 --dbpath C:\mongodb\data\db --directoryperdb -journal
2017-04-01T16:21:46.414+0200 I CONTROL [initandlisten] MongoDB starting : pid=10936 port=27017 dbpath=C:\mongodb\data\db 64-bit host=Acer
2017-04-01T16:21:46.415+0200 I CONTROL [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2017-04-01T16:21:46.415+0200 I CONTROL [initandlisten] db version v3.4.3
2017-04-01T16:21:46.416+0200 I CONTROL [initandlisten] git version: f07437fb5a6cca07c10bafa78365456eb1d6d5e1
2017-04-01T16:21:46.416+0200 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1u-fips 22 Sep 2016
2017-04-01T16:21:46.417+0200 I CONTROL [initandlisten] allocator: tcmalloc
2017-04-01T16:21:46.417+0200 I CONTROL [initandlisten] modules: none
2017-04-01T16:21:46.418+0200 I CONTROL [initandlisten] build environment:
2017-04-01T16:21:46.418+0200 I CONTROL [initandlisten] distmod: 2008plus-ssl
2017-04-01T16:21:46.418+0200 I CONTROL [initandlisten] distarch: x86_64
2017-04-01T16:21:46.419+0200 I CONTROL [initandlisten] target_arch: x86_64
2017-04-01T16:21:46.419+0200 I CONTROL [initandlisten] options: { storage: { dbPath: "C:\mongodb\data\db", directoryPerDB: true, engine: "mmapv1", journal: { enabled: true } } }
2017-04-01T16:21:46.429+0200 I JOURNAL [initandlisten] journal dir=C:\mongodb\data\db\journal
2017-04-01T16:21:46.429+0200 I JOURNAL [initandlisten] recover begin
2017-04-01T16:21:46.430+0200 I JOURNAL [initandlisten] info no lsn file in journal/ directory
2017-04-01T16:21:46.430+0200 I JOURNAL [initandlisten] recover lsn: 0
2017-04-01T16:21:46.431+0200 I JOURNAL [initandlisten] recover C:\mongodb\data\db\journal\j._0
2017-04-01T16:21:46.480+0200 I JOURNAL [initandlisten] recover applying initial journal section with sequence number 1
2017-04-01T16:21:46.622+0200 I JOURNAL [initandlisten] recover cleaning up
2017-04-01T16:21:46.622+0200 I JOURNAL [initandlisten] removeJournalFiles
2017-04-01T16:21:46.623+0200 I JOURNAL [initandlisten] old journal file will be removed: C:\mongodb\data\db\journal\j._0
2017-04-01T16:21:46.627+0200 I JOURNAL [initandlisten] recover done
2017-04-01T16:21:46.780+0200 I JOURNAL [durability] Durability thread started
2017-04-01T16:21:46.838+0200 I JOURNAL [journal writer] Journal writer thread started
2017-04-01T16:21:46.880+0200 I CONTROL [initandlisten]
2017-04-01T16:21:46.880+0200 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2017-04-01T16:21:46.881+0200 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2017-04-01T16:21:46.883+0200 I CONTROL [initandlisten]
2017-04-01T16:21:48.911+0200 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory 'C:/mongodb/data/db/diagnostic.data'
2017-04-01T16:21:48.919+0200 I INDEX [initandlisten] allocating new ns file C:\mongodb\data\db\admin\admin.ns, filling with zeroes...
2017-04-01T16:21:49.119+0200 I FTDC [ftdc] Unclean full-time diagnostic data capture shutdown detected, found interim file, some metrics may have been lost. OK
2017-04-01T16:21:49.399+0200 I STORAGE [FileAllocator] allocating new datafile C:\mongodb\data\db\admin\admin.0, filling with zeroes...
2017-04-01T16:21:49.401+0200 I STORAGE [FileAllocator] creating directory C:\mongodb\data\db\admin_tmp
2017-04-01T16:21:49.407+0200 I STORAGE [FileAllocator] done allocating datafile C:\mongodb\data\db\admin\admin.0, size: 64MB, took 0.003 secs
2017-04-01T16:21:49.425+0200 I INDEX [initandlisten] build index on: admin.system.version properties: { v: 2, key: { version: 1 }, name: "incompatible_with_version_32", ns: "admin.system.version" }
2017-04-01T16:21:49.425+0200 I INDEX [initandlisten] building index using bulk method; build may temporarily use up to 500 megabytes of RAM
2017-04-01T16:21:49.426+0200 I INDEX [initandlisten] build index done. scanned 0 total records. 0 secs
2017-04-01T16:21:49.427+0200 I COMMAND [initandlisten] setting featureCompatibilityVersion to 3.4
2017-04-01T16:21:49.429+0200 I NETWORK [thread1] waiting for connections on port 27017
Command prompt 2 running with admin rights:
> use admin
switched to db admin
> db.createUser( {
... user: "siteUserAdmin",
... pwd: "password",
... roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
... });
Error coming back is
2017-04-01T16:44:14.281+0200 E QUERY [thread1]
Error: couldn't add user: not authorized on admin to execute command
{ createUser: "siteUserAdmin", pwd: "xxx", roles: [ { role: "userAdminAnyDatabase", db: "admin" } ], digestPassword: false, writeConcern: { w: "majority", wtimeout: 600000.0 } } : _getErrorWithCode#src/mongo/shell/utils.js:25:13
DB.prototype.createUser#src/mongo/shell/db.js:1290:15
#(shell):1:1"
> use admin
> db.getUsers();
2017-04-01T16:52:41.537+0200 E QUERY [thread1] Error: not authorized on admin to execute command { usersInfo: 1.0 } :
_getErrorWithCode#src/mongo/shell/utils.js:25:13
DB.prototype.getUsers#src/mongo/shell/db.js:1537:1
#(shell):1:1
>
I have a website ( Analytics Service ) for website and i have about +3K concurrent user .. i'm using php with MongoDB
MongoDB architecture is ( 1 Query , 3 Config server , 2 Shard ) . i'm sure that my mongo configuration is working fine . but shard 1 stopped suddenly with no reason. and when i tried to run sudo services mongod restart mongo doesn't run. when i view the log file i get the last lines
2016-10-15T09:35:52.334-0400 I CONTROL [main] ***** SERVER RESTARTED *****
2016-10-15T09:35:52.343-0400 I CONTROL [initandlisten] MongoDB starting : pid=2168 port=27017 dbpath=/var/lib/mongodb 64-bit host=Analytics-DB-shard-01
2016-10-15T09:35:52.343-0400 I CONTROL [initandlisten] db version v3.2.8
2016-10-15T09:35:52.343-0400 I CONTROL [initandlisten] git version: ed70e33130c977bda0024c125b56d15957sdaaf0
2016-10-15T09:35:52.343-0400 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
2016-10-15T09:35:52.343-0400 I CONTROL [initandlisten] allocator: tcmalloc
2016-10-15T09:35:52.343-0400 I CONTROL [initandlisten] modules: none
2016-10-15T09:35:52.343-0400 I CONTROL [initandlisten] build environment:
2016-10-15T09:35:52.343-0400 I CONTROL [initandlisten] distmod: ubuntu1404
2016-10-15T09:35:52.343-0400 I CONTROL [initandlisten] distarch: x86_64
2016-10-15T09:35:52.343-0400 I CONTROL [initandlisten] target_arch: x86_64
2016-10-15T09:35:52.343-0400 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1", port: 27017 }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2016-10-15T09:35:52.373-0400 E NETWORK [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock errno:1 Operation not permitted
2016-10-15T09:35:52.373-0400 I - [initandlisten] Fatal Assertion 28578
2016-10-15T09:35:52.373-0400 I - [initandlisten]
***aborting after fassert() failure
i can't figure out mongo problems but i'm trying to manage it to work correctly as much as possible .. any idea how to make sure that it won't dropped again ?