Mongodb Mongo db安装问题端口27017不工作

Mongodb Mongo db安装问题端口27017不工作,mongodb,Mongodb,我在装有Windows 8.1的笔记本电脑上安装了Mongo db,并下载了以下版本的Mongodb进行安装: [下载连结][1] Windows选项64 2008 R2+选项 安装后,它不工作 我已经有了如下默认路径: C:\data\db C:\Program Files\MongoDB\Server\3.2\bin 在运行Mongodb时,我面临以下错误: C:\Program Files\MongoDB\Server\3.2\bin>mongo.exe MongoDB shell

我在装有Windows 8.1的笔记本电脑上安装了Mongo db,并下载了以下版本的Mongodb进行安装:

[下载连结][1]

Windows选项64 2008 R2+选项

安装后,它不工作

我已经有了如下默认路径:

C:\data\db C:\Program Files\MongoDB\Server\3.2\bin

在运行Mongodb时,我面临以下错误:

C:\Program Files\MongoDB\Server\3.2\bin>mongo.exe
MongoDB shell version: 3.2.1
connecting to: test
2016-02-13T15:06:56.643+0530 W NETWORK  [thread1] Failed to connect to 127.0.0.1
:27017, reason: errno:10061 No connection could be made because the target machi
ne actively refused it.
2016-02-13T15:06:56.645+0530 E QUERY    [thread1] Error: couldn't connect to ser
ver 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:224:14
@(connect):1:6

exception: connect failed

C:\Program Files\MongoDB\Server\3.2\bin>mongod.exe
2016-02-13T15:16:14.082+0530 I CONTROL  [initandlisten] MongoDB starting : pid=6
156 port=27017 dbpath=C:\data\db\ 64-bit host=DELL
2016-02-13T15:16:14.084+0530 I CONTROL  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2016-02-13T15:16:14.107+0530 I CONTROL  [initandlisten] options: {}
2016-02-13T15:16:14.110+0530 I -        [initandlisten] Detected data files in C
:\data\db\ created by the 'wiredTiger' storage engine, so setting the active sto
rage engine to 'wiredTiger'.
2016-02-13T15:16:14.114+0530 I STORAGE  [initandlisten] wiredtiger_open config:
create,cache_size=1G,session_max=20000,eviction=(threads_max=4),config_base=fals
e,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snapp
y),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),stati
stics_log=(wait=0),
2016-02-13T15:16:16.094+0530 I NETWORK  [HostnameCanonicalizationWorker] Startin
g hostname canonicalization worker
2016-02-13T15:16:16.094+0530 I FTDC     [initandlisten] Initializing full-time d
iagnostic data capture with directory 'C:/data/db/diagnostic.data'
2016-02-13T15:16:16.111+0530 I NETWORK  [initandlisten] waiting for connections
on port 27017
我在互联网上检查了很多东西,比如我发现了以下链接,并为此运行了以下防火墙命令:

    netsh advfirewall firewall add rule name="Open mongod port 27017" dir=in action=allow protocol=TCP localport=27017
netsh advfirewall firewall add rule name="Allowing mongod" dir=in action=allow program="C:\Program Files\MongoDB\Server\3.2\bin\mongod.exe"
netsh advfirewall firewall add rule name="Allowing mongos" dir=in action=allow program="C:\Program Files\MongoDB\Server\3.2\bin\mongos.exe"
netsh advfirewall firewall add rule name="Open mongod shard port 27018" dir=in action=allow protocol=TCP localport=27018
netsh advfirewall firewall add rule name="Open mongod config svr port 27019" dir=in action=allow protocol=TCP localport=27019
netsh advfirewall firewall add rule name="Open mongod config svr inbound" dir=in action=allow protocol=TCP remoteip=127.0.0.1 localport=27019
netsh advfirewall firewall add rule name="Open mongod config svr inbound" dir=in action=allow protocol=TCP remoteip=127.0.0.1 localport=27017

netsh advfirewall firewall add rule name="Open mongod shardsvr inbound" dir=in action=allow protocol=TCP remoteip=127.0.0.1 localport=27018
netsh advfirewall firewall add rule name="Open mongod shardsvr outbound" dir=out action=allow protocol=TCP remoteip=127.0.0.1 localport=27018
netsh advfirewall firewall add rule name="Open mongod shardsvr inbound" dir=in action=allow protocol=TCP remoteip=127.0.0.1 localport=27017
netsh advfirewall firewall add rule name="Open mongod shardsvr outbound" dir=out action=allow protocol=TCP remoteip=127.0.0.1 localport=27017

netsh advfirewall firewall add rule name="Open mongod config svr outbound" dir=out action=allow protocol=TCP remoteip=127.0.0.1 localport=27018
netsh advfirewall firewall add rule name="Open mongod config svr outbound" dir=out action=allow protocol=TCP remoteip=127.0.0.1 localport=27017

netsh advfirewall firewall add rule name="Open mongod HTTP monitoring inbound" dir=in action=allow protocol=TCP remoteip=127.0.0.1 localport=28017
netsh advfirewall firewall add rule name="Open mongod HTTP monitoring inbound" dir=in action=allow protocol=TCP remoteip=127.0.0.1 localport=27017

netsh advfirewall firewall add rule name="Open mongos HTTP monitoring inbound" dir=in action=allow protocol=TCP remoteip=127.0.0.1 localport=28018
netsh advfirewall firewall add rule name="Open mongos HTTP monitoring inbound" dir=in action=allow protocol=TCP remoteip=127.0.0.1 localport=27017

netsh advfirewall firewall add rule name="Open mongod configsvr HTTP monitoring inbound" dir=in action=allow protocol=TCP remoteip=127.0.0.1 localport=28019
netsh advfirewall firewall add rule name="Open mongod configsvr HTTP monitoring inbound" dir=in action=allow protocol=TCP remoteip=127.0.0.1 localport=27017

但Mongo db仍然不起作用。请帮助我成功运行Mongo DB。

检查Mongo服务是否正在运行。如果没有启动,请尝试

net start mongodb


您可以通过执行
win+r
服务进行检查。msc

我使用了下载链接Mongo db没有任何windows服务处于停止或运行状态