2016-02-13 65 views
1

我安裝我的筆記本電腦,其擁有Windows 8.1蒙戈db和我已經下載的MongoDB以下版本的安裝目的:蒙戈DB安裝問題端口27017不工作

[下載鏈接] [1]

Windows選項64 2008 R2 +選項

安裝後不工作。

我已經有默認路徑,如:

C:\ DATA \ DB C:\ Program Files文件\ MongoDB的\服務器\ 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 : 
[email protected]/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。

+0

檢查我用的下載鏈接https://www.mongodb.org/downloads?_ga=1.67369048.897987180.1455355725#production –

回答

2

檢查mongo服務是否正在運行。如果沒有開始嘗試

net start mongodb

您可以通過執行win+rservices.msc

+0

有對於Mongo數據庫,不是處於停止狀態或運行狀態的任何Windows服務 –