data.data[0].isIecommend无论是1还是2网页页面切换白屏解决显示的还是否,求助解决这个问题。。。

initialization - MongoDB on a Windows 7 machine: No connection could be made - Stack Overflow
to customize your list.
Join the Stack Overflow Community
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
J it only takes a minute:
After I have started Mongo using mongod.exe on a Windows 7
machine, I tried to start the mongo shell that failed with the error:
Failed to connect to 127.0.0.1:27017, reason: errno:10061 No
connection could be made because the target machine actively refused
Error: couldn't connect to server 127.0.0.1:2.0.1),
connection attempt failed at src/mongo/shell/mongo.js:146 exception:
connect failed
In the CMD where I running the mongod the output is:
C:\Users\Vera>mongod --dbpath c:\mongodb\mongodata
T17:10:10.135-0300 [initandlisten] MongoDB starting :
pid=3296 port=27017 dbpath=c:\mongodb\mongodata 64-bit host=Vera-PC
T17:10:10.136-0300 [initandlisten] targetMinOS: Windows
7/Windows Server 2008 R2
T17:10:10.136-0300 [initandlisten] db version v2.6.1
T17:10:10.136-0300 [initandlisten] git version:
4b95b086d2374bdcfcdf2c9c726e8
T17:10:10.136-0300 [initandlisten] build info: windows
sys.getwindowsversion(major=6, minor=1, build=7601, platform=2,
service_pack='Service Pack 1')
BOOST_LIB_VERSION=1_49
T17:10:10.136-0300 [initandlisten] allocator: system
T17:10:10.136-0300 [initandlisten] options: { storage: {
dbPath: "c:\mongodb\mongodata" } }
T17:10:10.242-0300 [initandlisten] journal
dir=c:\mongodb\mongodata\journal
T17:10:10.243-0300 [initandlisten] recover : no journal
files present, no recovery needed
T17:10:11.077-0300 [initandlisten] waiting for connections
on port 27017
Any suggestion how to fix this issue?
39.6k2176112
I got the same error and fixed it with:
1) mkdir c:\data
2) cd data
3) mongod -dbpath .
4) Now in another command window I was able to connect from my client using the mongo command.
29.7k1154103
I got this problem. What fixed mine is:
Suppose you have a dir: "C:\mongo_databse"
Open Command Prompt and type (suppose you haved added the Mongo bin directory to PATH): mongod --dbpath=C:/mongo_database.
There will be some log to the command prompt.
Now open ANOTHER command prompt then type in mongo then it works.
What solved my issue was creating a file startmongo.conf
that sets the bind_ip to 127.0.0.1 . After that, I just created a *.bat to start the mongo using something like:
mongod --config c:\mongodb\bin\startmongo.conf
More details could be seem at this .
I assume your mongo.config file to be located inside the mongodb folder in the same level to the bin directory.The contents of the mongo.config file are:
dbpath=C:\mongodb\data
logpath=C:\mongodb\log\mongo.log
don't forget to create the data folder and log folder in the same level of bin directory
inside log folder
create the mongo.log empty file.
Point your command prompt to C:\mongodb\bin wherever
your mongo db bin folder is located.
create the mongo db service in windows
mongod.exe --storageEngine=mmapv1 --config=../mongo.config
from now unwards you can start the mongo db service as
net start mongodb
finally you can connect to the mongo db server from the mongo db client
have gone successfully from step 1 to step 3 from the next time on wards you only need the step 4 and 5.to start the service and to connect.
I got this error beacuse of not sufficient space in the disk.
Check your mongo log.
I was getting a similar error when I was trying to start my mongo db via cmd. However the difference was I had a config file which has the path to the db and log folders and wanted to use the same. I was using mongo few days back and it was running fine but when I started using it again today it was giving me the error :
T10:33:22.820-0400 I CONTROL
Hotfix KB2731284 or later update is
installed, no need to zero-out data files
MongoDB shell version: 3.0.2
connecting to: test
T10:33:23.854-0400 W NETWORK
Failed to connect to 27.0.0.1:27017, reason: errno:10061 No connection could be made because the target machine actively refused it.
T10:33:23.857-0400 E QUERY
Error: couldn't connect to server 127.0.0.1:2.0.1), connection attempt failed at connect src/mongo/shell/mongo.js:179:14) at (connect):1:6 at src/mongo/shell/mongo.js:179 exception: connect failed
Here's how I fixed it :
Open cmd as admin and navigate to the bin folder of your MongoDB and type :
mongod --config &path to your config file& --install
Now start your mongo db service : net start mongodb
you should get a message which says :
The MongoDB service was started successfully.
close this command prompt and open another one as admin, navigate to the bin folder once again and type mongo
This will connect you to the mongodb test.
Press ctrl+c anytime to exit.
Hope this helps.
I had a very similar experience to @user1501382, but tweaked everything slightly in accordance with
1) cd c: //changes to C drive
2) mkdir data //creates directory data
3) cd data
4) mkdir db //creates directory db
5) cd db //changes directory so that you are in c:/data/db
6) run mongod -dbpath
7) close this terminal, open a new one and run mongod
2,86722242
for mongodb 3.0 versions use "--smallfiles".
mongod --dbpath="C:\Program Files\MongoDB\Server\3.0" --logpath="C:\Program Files\MongoDB\Server\3.0\data\log.txt" --smallfiles --install
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled}

我要回帖

更多关于 页面加载慢如何解决 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信