N
N
nexcode2015-11-24 22:54:09
MongoDB
nexcode, 2015-11-24 22:54:09

MngoDB not starting when selecting WiredTiger engine?

I created the /var/lib/mongoWT folder (rights, the owner is the same as the folder with mmapv1 storage files)
I change the storage section in the MongoDB config:

# Where and how to store data.
storage:
  dbPath: /var/lib/mongoWT
  journal:
    enabled: true
  engine: wiredTiger
#  mmapv1:
#  wiredTiger:

I restart the mongod service:
[[email protected] ~]# systemctl restart mongod
Job for mongod.service failed. See 'systemctl status mongod.service' and 'journalctl -xn' for details.
[[email protected] ~]# systemctl status mongod
mongod.service - SYSV: Mongo is a scalable, document-oriented database.
   Loaded: loaded (/etc/rc.d/init.d/mongod)
   Active: failed (Result: exit-code) since Вт 2015-11-24 22:40:45 MSK; 6s ago
  Process: 22733 ExecStop=/etc/rc.d/init.d/mongod stop (code=exited, status=0/SUCCESS)
  Process: 22804 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=1/FAILURE)
 Main PID: 2566 (code=exited, status=0/SUCCESS)

ноя 24 22:40:45 AdSpend systemd[1]: Starting SYSV: Mongo is a scalable, document-oriented database....
ноя 24 22:40:45 AdSpend runuser[22811]: pam_unix(runuser:session): session opened for user mongod by (uid=0)
ноя 24 22:40:45 AdSpend mongod[22804]: Starting mongod: [СБОЙ ]
ноя 24 22:40:45 AdSpend systemd[1]: mongod.service: control process exited, code=exited status=1
ноя 24 22:40:45 AdSpend systemd[1]: Failed to start SYSV: Mongo is a scalable, document-oriented database..
ноя 24 22:40:45 AdSpend systemd[1]: Unit mongod.service entered failed state.

Tried both version 3.0 and 3.2
[[email protected] ~]# systemctl stop mongod
[[email protected] ~]# mongod
2015-11-24T23:03:22.034+0300 I CONTROL  [initandlisten] MongoDB starting : pid=23592 port=27017 dbpath=/data/db 64-bit host=AdSpend
2015-11-24T23:03:22.034+0300 I CONTROL  [initandlisten] db version v3.2.0-rc2-74-g78d3e85
2015-11-24T23:03:22.034+0300 I CONTROL  [initandlisten] git version: 78d3e85ae6de50fc016433c4d161ad11b801c717
2015-11-24T23:03:22.034+0300 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2015-11-24T23:03:22.034+0300 I CONTROL  [initandlisten] allocator: tcmalloc
2015-11-24T23:03:22.034+0300 I CONTROL  [initandlisten] modules: none
2015-11-24T23:03:22.034+0300 I CONTROL  [initandlisten] build environment:
2015-11-24T23:03:22.034+0300 I CONTROL  [initandlisten]     distmod: rhel70
2015-11-24T23:03:22.034+0300 I CONTROL  [initandlisten]     distarch: x86_64
2015-11-24T23:03:22.034+0300 I CONTROL  [initandlisten]     target_arch: x86_64
2015-11-24T23:03:22.034+0300 I CONTROL  [initandlisten] options: {}
2015-11-24T23:03:22.049+0300 I STORAGE  [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
2015-11-24T23:03:22.049+0300 I CONTROL  [initandlisten] dbexit:  rc: 100

/data/db - what is it and what should be there?
And why does it want a new folder at the root of the drive?
Created this folder, run:
[[email protected] ~]# mongod
2015-11-24T23:17:17.087+0300 I CONTROL  [initandlisten] MongoDB starting : pid=24022 port=27017 dbpath=/data/db 64-bit host=AdSpend
2015-11-24T23:17:17.087+0300 I CONTROL  [initandlisten] db version v3.2.0-rc2-74-g78d3e85
2015-11-24T23:17:17.087+0300 I CONTROL  [initandlisten] git version: 78d3e85ae6de50fc016433c4d161ad11b801c717
2015-11-24T23:17:17.087+0300 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2015-11-24T23:17:17.087+0300 I CONTROL  [initandlisten] allocator: tcmalloc
2015-11-24T23:17:17.087+0300 I CONTROL  [initandlisten] modules: none
2015-11-24T23:17:17.087+0300 I CONTROL  [initandlisten] build environment:
2015-11-24T23:17:17.087+0300 I CONTROL  [initandlisten]     distmod: rhel70
2015-11-24T23:17:17.087+0300 I CONTROL  [initandlisten]     distarch: x86_64
2015-11-24T23:17:17.087+0300 I CONTROL  [initandlisten]     target_arch: x86_64
2015-11-24T23:17:17.087+0300 I CONTROL  [initandlisten] options: {}
2015-11-24T23:17:17.102+0300 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=8G,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),
2015-11-24T23:17:17.559+0300 I CONTROL  [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2015-11-24T23:17:17.559+0300 I CONTROL  [initandlisten] 
2015-11-24T23:17:17.560+0300 I CONTROL  [initandlisten] 
2015-11-24T23:17:17.560+0300 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2015-11-24T23:17:17.560+0300 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2015-11-24T23:17:17.560+0300 I CONTROL  [initandlisten] 
2015-11-24T23:17:17.560+0300 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2015-11-24T23:17:17.560+0300 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2015-11-24T23:17:17.560+0300 I CONTROL  [initandlisten] 
2015-11-24T23:17:17.560+0300 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2015-11-24T23:17:17.560+0300 I NETWORK  [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2015-11-24T23:17:17.716+0300 I NETWORK  [initandlisten] waiting for connections on port 27017
2015-11-24T23:17:18.800+0300 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:44382 #1 (1 connection now open)
^C2015-11-24T23:17:31.314+0300 I CONTROL  [signalProcessingThread] got signal 2 (Interrupt), will terminate after current cmd ends
2015-11-24T23:17:31.314+0300 I FTDC     [signalProcessingThread] Shuting down full-time diagnostic data capture
2015-11-24T23:17:31.315+0300 I CONTROL  [signalProcessingThread] now exiting
2015-11-24T23:17:31.315+0300 I NETWORK  [signalProcessingThread] shutdown: going to close listening sockets...
2015-11-24T23:17:31.315+0300 I NETWORK  [signalProcessingThread] closing listening socket: 5
2015-11-24T23:17:31.315+0300 I NETWORK  [signalProcessingThread] closing listening socket: 6
2015-11-24T23:17:31.315+0300 I NETWORK  [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
2015-11-24T23:17:31.315+0300 I NETWORK  [signalProcessingThread] shutdown: going to flush diaglog...
2015-11-24T23:17:31.315+0300 I NETWORK  [signalProcessingThread] shutdown: going to close sockets...
2015-11-24T23:17:31.315+0300 I STORAGE  [signalProcessingThread] WiredTigerKVEngine shutting down
2015-11-24T23:17:31.315+0300 I NETWORK  [conn1] end connection 127.0.0.1:44382 (0 connections now open)
2015-11-24T23:17:31.700+0300 I STORAGE  [signalProcessingThread] shutdown: removing fs lock...
2015-11-24T23:17:31.700+0300 I CONTROL  [signalProcessingThread] dbexit:  rc: 0

After that, I found files in the / data / db folder in the names of which WiredTiger is often found.
The /var/lib/mongoWT folder I created is empty.
[[email protected] ~]# journalctl -u mongod
íîÿ 25 10:28:23 AdSpend systemd[1]: Starting SYSV: Mongo is a scalable, document-oriented database....
íîÿ 25 10:28:23 AdSpend runuser[25951]: pam_unix(runuser:session): session opened for user mongod by (uid=0)
íîÿ 25 10:28:23 AdSpend runuser[25951]: pam_unix(runuser:session): session closed for user mongod
íîÿ 25 10:28:23 AdSpend mongod[25944]: Starting mongod: [ÑÁÎÉ ]
íîÿ 25 10:28:23 AdSpend systemd[1]: mongod.service: control process exited, code=exited status=1
íîÿ 25 10:28:23 AdSpend systemd[1]: Failed to start SYSV: Mongo is a scalable, document-oriented database..
íîÿ 25 10:28:23 AdSpend systemd[1]: Unit mongod.service entered failed state.
íîÿ 25 10:30:55 AdSpend systemd[1]: Starting SYSV: Mongo is a scalable, document-oriented database....
íîÿ 25 10:30:55 AdSpend runuser[25995]: pam_unix(runuser:session): session opened for user mongod by (uid=0)
íîÿ 25 10:30:55 AdSpend runuser[25995]: pam_unix(runuser:session): session closed for user mongod
íîÿ 25 10:30:55 AdSpend mongod[25988]: Starting mongod: [ÑÁÎÉ ]
íîÿ 25 10:30:55 AdSpend systemd[1]: mongod.service: control process exited, code=exited status=1
íîÿ 25 10:30:55 AdSpend systemd[1]: Failed to start SYSV: Mongo is a scalable, document-oriented database..
íîÿ 25 10:30:55 AdSpend systemd[1]: Unit mongod.service entered failed state.
íîÿ 25 10:33:17 AdSpend systemd[1]: Starting SYSV: Mongo is a scalable, document-oriented database....
íîÿ 25 10:33:17 AdSpend runuser[26011]: pam_unix(runuser:session): session opened for user mongod by (uid=0)
íîÿ 25 10:33:17 AdSpend mongod[26004]: Starting mongod: [ÑÁÎÉ ]

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
L
lega, 2015-11-24
@lega

What version of monga?
Try to run from command line (not via service)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question