2017-02-23 62 views
0

我安装了mongodb,然后创建了一个服务来运行它。 启动服务没有问题,但试图关闭它,我得到一个错误代码由Windows。我检查日志文件,这就是我得到:MongoDB返回退出代码49

2017-02-23T08:36:51.518+0100 I CONTROL [serviceStopWorker] shutting down with code:49 enter image description here

(翻译) 错误1067:意外终止进程

服务路径:

"C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe" --config "C:\Program Files\MongoDB\Server\3.4\bin\mongod.cfg" --service

mongodb.cfg

systemLog: 
    destination: file 
    path: "C:\\data\\log\\mongod.log" 
storage: 
    dbPath: "C:\\data\\db" 

我试图找到错误代码,但它没有出现。

https://docs.mongodb.com/manual/reference/exit-codes/

我能找到的唯一的参考是这样的。有关退出代码的问题/答案的测试。 (问题7)

http://www.sanfoundry.com/mongodb-questions-answers-exit-codes-statutes/

7. 49 code is returned by mongod from _________ Service control Manager. 
a) Linux 
b) Windows 
c) Ubuntu 
d) All of the mentioned 
View Answer 

Answer:a 
Explanation:Custom read preferences and write concerns evaluate tags sets in different ways. 

但我在Windows 7机器上。所以这很奇怪。

的Windows 7 SP1 64位

的MongoDB 3.4.2

任何想法?

LOG

2017-02-23T08:36:48.484+0100 I CONTROL [main] Trying to start Windows service 'MongoDB'

2017-02-23T08:36:48.485+0100 I CONTROL [initandlisten] MongoDB starting : pid=17856 port=27017 dbpath=C:\data\db 64-bit host=FRAmdsWS430

2017-02-23T08:36:48.485+0100 I CONTROL [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2

2017-02-23T08:36:48.485+0100 I CONTROL [initandlisten] db version v3.4.2

2017-02-23T08:36:48.485+0100 I CONTROL [initandlisten] git version: 3f76e40c105fc223b3e5aac3e20dcd026b83b38b

2017-02-23T08:36:48.485+0100 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1u-fips 22 Sep 2016

2017-02-23T08:36:48.485+0100 I CONTROL [initandlisten] allocator: tcmalloc

2017-02-23T08:36:48.485+0100 I CONTROL [initandlisten] modules: none

2017-02-23T08:36:48.486+0100 I CONTROL [initandlisten] build environment:

2017-02-23T08:36:48.486+0100 I CONTROL [initandlisten] distmod: 2008plus-ssl

2017-02-23T08:36:48.486+0100 I CONTROL [initandlisten] distarch: x86_64

2017-02-23T08:36:48.486+0100 I CONTROL [initandlisten] target_arch: x86_64

2017-02-23T08:36:48.486+0100 I CONTROL [initandlisten] options: { config: "C:\Program Files\MongoDB\Server\3.4\bin\mongod.cfg", service: true, storage: { dbPath: "C:\data\db" }, systemLog: { destination: "file", path: "C:\data\log\mongod.log" } }

2017-02-23T08:36:48.488+0100 I - [initandlisten] Detected data files in C:\data\db created by the 'mmapv1' storage engine, so setting the active storage engine to 'mmapv1'.

2017-02-23T08:36:48.497+0100 I JOURNAL [initandlisten] journal dir=C:\data\db\journal

2017-02-23T08:36:48.497+0100 I JOURNAL [initandlisten] recover : no journal files present, no recovery needed

2017-02-23T08:36:48.636+0100 I JOURNAL [durability] Durability thread started

2017-02-23T08:36:48.636+0100 I JOURNAL [journal writer] Journal writer thread started

2017-02-23T08:36:48.693+0100 I CONTROL [initandlisten]

2017-02-23T08:36:48.693+0100 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.

2017-02-23T08:36:48.693+0100 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.

2017-02-23T08:36:48.693+0100 I CONTROL [initandlisten]

2017-02-23T08:36:48.938+0100 W FTDC [initandlisten] Failed to initialize Performance Counters for FTDC: WindowsPdhError: PdhExpandCounterPathW failed with 'Das angegebene Objekt wurde nicht auf dem Computer gefunden.' for counter '\Memory\Available Bytes'

2017-02-23T08:36:48.938+0100 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory 'C:/data/db/diagnostic.data'

2017-02-23T08:36:48.940+0100 I NETWORK [thread1] waiting for connections on port 27017

2017-02-23T08:36:48.940+0100 I STORAGE [initandlisten] Service running

2017-02-23T08:36:51.412+0100 I CONTROL [serviceShutdown] got SERVICE_CONTROL_STOP request from Windows Service Control Manager, will terminate after current cmd ends

2017-02-23T08:36:51.412+0100 I NETWORK [serviceShutdown] shutdown: going to close listening sockets...

2017-02-23T08:36:51.412+0100 I NETWORK [serviceShutdown] closing listening socket: 456

2017-02-23T08:36:51.413+0100 I NETWORK [serviceShutdown] shutdown: going to flush diaglog...

2017-02-23T08:36:51.413+0100 I FTDC [serviceShutdown] Shutting down full-time diagnostic data capture

2017-02-23T08:36:51.413+0100 I STORAGE [serviceShutdown] shutdown: waiting for fs preallocator...

2017-02-23T08:36:51.413+0100 I STORAGE [serviceShutdown] shutdown: final commit...

2017-02-23T08:36:51.438+0100 I JOURNAL [serviceShutdown] journalCleanup...

2017-02-23T08:36:51.439+0100 I JOURNAL [serviceShutdown] removeJournalFiles

2017-02-23T08:36:51.439+0100 I JOURNAL [serviceShutdown] old journal file will be removed: C:\data\db\journal\j._0

2017-02-23T08:36:51.439+0100 I JOURNAL [serviceShutdown] Terminating durability thread ...

2017-02-23T08:36:51.516+0100 I JOURNAL [journal writer] Journal writer thread stopped

2017-02-23T08:36:51.516+0100 I JOURNAL [durability] Durability thread stopped

2017-02-23T08:36:51.516+0100 I STORAGE [serviceShutdown] shutdown: closing all files...

2017-02-23T08:36:51.518+0100 I STORAGE [serviceShutdown] closeAllFiles() finished

2017-02-23T08:36:51.518+0100 I STORAGE [serviceShutdown] shutdown: removing fs lock...

2017-02-23T08:36:51.518+0100 I CONTROL [serviceShutdown] now exiting

2017-02-23T08:36:51.518+0100 I CONTROL [serviceStopWorker] shutting down with code:49

回答

相关问题