Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the errors in the daily operation and maintenance of MongoDB?

2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Today, I will talk to you about the summary of errors in the daily operation and maintenance of MongoDB, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following contents for you. I hope you can gain something according to this article.

Error one:

An error was reported during cluster initialization:

ReplSetInitiate quorum check failed because not all proposed set members responded affirmatively

: 192.168.2.187:27017 failed with Error connecting to 192.168.2.187:27017::

Caused by:: Connection refused, 192.168.2.188:27017 failed with Error

Connecting to 192.168.2.188 connecting to 27017:: caused by:: Connection refused

As follows:

> rs.initiate (config)

{

"ok": 0

"errmsg": "replSetInitiate quorum check failed because not all proposed set members responded affirmatively: 192.168.2.187 failed with Error connecting to 27017:: caused by:: Connection refused, 192.168.2.188 errmsg 27017 failed with Error connecting to 192.168.2.188 failed with Error connecting to 27017:: caused by:: Connection refused"

"code": 74

"codeName": "NodeNotFound"

}

The cause of the problem:

The bind_ip parameter is not configured in the master-slave library configuration file. By default, you can only connect to the database remotely.

It can be tested when the slave node connects to the master library remotely.

Mongo-- host 192.168.2.222-- port 27017

There will also be Connection refused errors

Solution:

The master-slave library configuration file mongodb.conf adds the bind_ip parameter and restarts the database.

Bind_ip = 0.0.0.0

After reading the above, do you have any further understanding of the error summary in the daily operation and maintenance of MongoDB? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report