执行mongod.exe闪屏

2023-05-05 18:58:07 浏览数 (2)

windows环境下下载mongodb后,启动数据库服务mongod.exe 闪屏,捕捉不到异常问题。 需要切入到 dos 命令行查看,

代码语言:javascript复制
PS E:111softwaresmongodb-win32-x86_64-2008plus-ssl-4.0.2bin> E:111softwaresmongodb-win32-x86_64-2008plus-ssl-4.0.2
binmongod.exe
2018-10-08T16:01:53.911 0800 I CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2018-10-08T16:01:54.303 0800 I CONTROL  [initandlisten] MongoDB starting : pid=12732 port=27017 dbpath=E:datadb 64-bit host=DESKTOP-V0N5T5P
2018-10-08T16:01:54.303 0800 I CONTROL  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2018-10-08T16:01:54.304 0800 I CONTROL  [initandlisten] db version v4.0.2
2018-10-08T16:01:54.304 0800 I CONTROL  [initandlisten] git version: fc1573ba18aee42f97a3bb13b67af7d837826b47
2018-10-08T16:01:54.304 0800 I CONTROL  [initandlisten] allocator: tcmalloc
2018-10-08T16:01:54.304 0800 I CONTROL  [initandlisten] modules: none
2018-10-08T16:01:54.305 0800 I CONTROL  [initandlisten] build environment:
2018-10-08T16:01:54.305 0800 I CONTROL  [initandlisten]     distmod: 2008plus-ssl
2018-10-08T16:01:54.305 0800 I CONTROL  [initandlisten]     distarch: x86_64
2018-10-08T16:01:54.305 0800 I CONTROL  [initandlisten]     target_arch: x86_64
2018-10-08T16:01:54.305 0800 I CONTROL  [initandlisten] options: {}
2018-10-08T16:01:54.305 0800 I STORAGE  [initandlisten] exception in initAndListen: NonExistentPath: Data directory E:datadb not found., terminating
2018-10-08T16:01:54.305 0800 I CONTROL  [initandlisten] now exiting
2018-10-08T16:01:54.305 0800 I CONTROL  [initandlisten] shutting down with code:100
PS E:111softwaresmongodb-win32-x86_64-2008plus-ssl-4.0.2bin>

根据提示创建 E:datadb 目录(因为mongodb默认在/data/db下创建数据库),重新执行mongod.exe,OK:

代码语言:javascript复制
PS E:111softwaresmongodb-win32-x86_64-2008plus-ssl-4.0.2bin> E:111softwaresmongodb-win32-x86_64-2008plus-ssl-4.0.2
binmongod.exe
2018-10-08T16:05:19.412 0800 I CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2018-10-08T16:05:19.818 0800 I CONTROL  [initandlisten] MongoDB starting : pid=8832 port=27017 dbpath=E:datadb 64-bit host=DESKTOP-V0N5T5P
2018-10-08T16:05:19.818 0800 I CONTROL  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2018-10-08T16:05:19.819 0800 I CONTROL  [initandlisten] db version v4.0.2
2018-10-08T16:05:19.819 0800 I CONTROL  [initandlisten] git version: fc1573ba18aee42f97a3bb13b67af7d837826b47
2018-10-08T16:05:19.819 0800 I CONTROL  [initandlisten] allocator: tcmalloc
2018-10-08T16:05:19.819 0800 I CONTROL  [initandlisten] modules: none
2018-10-08T16:05:19.819 0800 I CONTROL  [initandlisten] build environment:
2018-10-08T16:05:19.819 0800 I CONTROL  [initandlisten]     distmod: 2008plus-ssl
2018-10-08T16:05:19.819 0800 I CONTROL  [initandlisten]     distarch: x86_64
2018-10-08T16:05:19.819 0800 I CONTROL  [initandlisten]     target_arch: x86_64
2018-10-08T16:05:19.819 0800 I CONTROL  [initandlisten] options: {}
2018-10-08T16:05:19.821 0800 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=5590M,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-10-08T16:05:20.001 0800 I STORAGE  [initandlisten] WiredTiger message [1538985920:911][8832:140711014579280], txn-recover: Set global recovery timestamp: 0
2018-10-08T16:05:20.126 0800 I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
2018-10-08T16:05:20.387 0800 I CONTROL  [initandlisten]
2018-10-08T16:05:20.388 0800 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-10-08T16:05:20.389 0800 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2018-10-08T16:05:20.389 0800 I CONTROL  [initandlisten]
2018-10-08T16:05:20.390 0800 I CONTROL  [initandlisten] ** WARNING: This server is bound to localhost.
2018-10-08T16:05:20.390 0800 I CONTROL  [initandlisten] **          Remote systems will be unable to connect to this server.
2018-10-08T16:05:20.390 0800 I CONTROL  [initandlisten] **          Start the server with --bind_ip <address> to specify which IP
2018-10-08T16:05:20.392 0800 I CONTROL  [initandlisten] **          addresses it should serve responses from, or with --bind_ip_all to
2018-10-08T16:05:20.393 0800 I CONTROL  [initandlisten] **          bind to all interfaces. If this behavior is desired, start the
2018-10-08T16:05:20.393 0800 I CONTROL  [initandlisten] **          server with --bind_ip 127.0.0.1 to disable this warning.
2018-10-08T16:05:20.394 0800 I CONTROL  [initandlisten]
2018-10-08T16:05:20.396 0800 I STORAGE  [initandlisten] createCollection: admin.system.version with provided UUID: 09da8a00-19b9-4173-bf27-83c9ac529754
2018-10-08T16:05:20.528 0800 I COMMAND  [initandlisten] setting featureCompatibilityVersion to 4.0
2018-10-08T16:05:20.541 0800 I STORAGE  [initandlisten] createCollection: local.startup_log with generated UUID: 99f6cc41-5718-465e-b069-eaf5b155710b
2018-10-08T16:05:23.039 0800 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory 'E:/data/db/diagnostic.data'
2018-10-08T16:05:23.044 0800 I STORAGE  [LogicalSessionCacheRefresh] createCollection: config.system.sessions with generated UUID: e1bc7bb1-0484-4202-a03c-3228922a28fc
2018-10-08T16:05:23.044 0800 I NETWORK  [initandlisten] waiting for connections on port 27017
2018-10-08T16:05:23.300 0800 I INDEX    [LogicalSessionCacheRefresh] build index on: config.system.sessions properties: { v: 2, key: { lastUse: 1 }, name: "lsidTTLIndex", ns: "config.system.sessions", expireAfterSeconds: 1800 }
2018-10-08T16:05:23.300 0800 I INDEX    [LogicalSessionCacheRefresh]     building index using bulk method; build may temporarily use up to 500 megabytes of RAM
2018-10-08T16:05:23.309 0800 I INDEX    [LogicalSessionCacheRefresh] build index done.  scanned 0 total records. 0 secs
2018-10-08T16:05:23.310 0800 I COMMAND  [LogicalSessionCacheRefresh] command config.$cmd command: createIndexes { createIndexes: "system.sessions", indexes: [ { key: { lastUse: 1 }, name: "lsidTTLIndex", expireAfterSeconds: 1800 } ], $db: "config" } numYields:0 reslen:114 locks:{ Global: { acquireCount: { r: 1, w: 1 } }, Database: { acquireCount: { W: 1 } }, Collection: { acquireCount: { w: 1 } } } protocol:op_msg 266ms
2018-10-08T16:05:26.010 0800 I NETWORK  [listener] connection accepted from 127.0.0.1:51102 #1 (1 connection now open)
2018-10-08T16:05:26.048 0800 I NETWORK  [conn1] received client metadata from 127.0.0.1:51102 conn1: { driver: { name: "mongo-java-driver", version: "3.6.4" }, os: { type: "Windows", name: "Windows 10", architecture: "amd64", version: "10.0" }, platform: "Java/Oracle Corporation/1.8.0_144-b01" }

0 人点赞