@nexcode

MngoDB не запускается при выборе движка WiredTiger?

Создал папку /var/lib/mongoWT (права, владелец все как у папки с файлами стараджа mmapv1)

Изменяю секцию сторадж в конфиге MongoDB:
# Where and how to store data.
storage:
  dbPath: /var/lib/mongoWT
  journal:
    enabled: true
  engine: wiredTiger
#  mmapv1:
#  wiredTiger:

Перезапускаю сервис mongod:
[root@AdSpend ~]# systemctl restart mongod
Job for mongod.service failed. See 'systemctl status mongod.service' and 'journalctl -xn' for details.
[root@AdSpend ~]# 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.

Пробовал как версию 3.0 так и 3.2

[root@AdSpend ~]# systemctl stop mongod
[root@AdSpend ~]# 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 - это что и что там должно быть?
И почему оно хочет новую папку в корне диска?

Создал эту папку, запускаю:
[root@AdSpend ~]# 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

После обнаружил в папке /data/db файлы в именах которых часто встречается WiredTiger.
В созданной мной папке /var/lib/mongoWT пусто.

[root@AdSpend ~]# 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: [ÑÁÎÉ ]
  • Вопрос задан
  • 698 просмотров
Пригласить эксперта
Ответы на вопрос 1
@lega
Какая версия монги?

Попробуйте запустить из командной строки (не через сервис)
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы