mongodb连接不上
黄舟
黄舟 2017-04-28 09:04:36
0
3
930

用mongovue连接时显示:

提示框里的代码如下:

Connection was refused
Unable to connect to server 127.0.0.1:27017: 由于目标计算机积极拒绝,无法连接。 127.0.0.1:27017.
Type: MongoDB.Driver.MongoConnectionException
Stack:    at MongoDB.Driver.Internal.DirectMongoServerProxy.Connect(TimeSpan timeout, ReadPreference readPreference)
   at MongoDB.Driver.MongoServer.Connect(TimeSpan timeout)
   at MongoDB.Driver.MongoServer.Connect()
   at MangoUI.MMongo.Open(Boolean mustWrite)
   at MangoUI.MMongo.Open()
   at MangoUI.MConnection.get_IsValid()
   at MangoUI.WinConnect.btnTest_Click(Object sender, EventArgs e)


由于目标计算机积极拒绝,无法连接。 127.0.0.1:27017
Type: System.Net.Sockets.SocketException
Stack:    at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at System.Net.Sockets.TcpClient.Connect(IPEndPoint remoteEP)
   at MongoDB.Driver.Internal.MongoConnection.Open()
   at MongoDB.Driver.Internal.MongoConnection.GetNetworkStream()
   at MongoDB.Driver.Internal.MongoConnection.SendMessage(BsonBuffer buffer, Int32 requestId)
   at MongoDB.Driver.Internal.MongoConnection.SendMessage(MongoRequestMessage message)
   at MongoDB.Driver.Operations.CommandOperation`1.Execute(MongoConnection connection)
   at MongoDB.Driver.MongoServerInstance.RunCommandAs[TCommandResult](MongoConnection connection, String databaseName, IMongoCommand command)
   at MongoDB.Driver.MongoServerInstance.Ping(MongoConnection connection)
   at MongoDB.Driver.MongoServerInstance.Connect()
   at MongoDB.Driver.Internal.DirectMongoServerProxy.Connect(TimeSpan timeout, ReadPreference readPreference)
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(3)
刘奇

The first step is to make sure your mongo service starts normally. The test method is to use local telnet on the server where mongo is located. Troubleshoot mongo service issues

If the first step is successful, switch to the same network segment telnet and test. If it cannot be accessed, check whether the port occupied by mongo is blocked by the firewall or anti-virus software. If so, add the corresponding inbound and outbound rules in the inbound and outbound rules. Troubleshoot firewall and antivirus issues.

Finally use your mongovue.

阿神

For Database, you need to fill in the name of the database you want to connect to, and then test the connection to see if it can pass the connection test. . .

黄舟

『Unable to connect because the target computer actively refused. 127.0.0.1:27017』

Has it bind_ip reached 127.0.0.1?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!