Get the App
SLTechnology News&Howtos  ›  Database  › 

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

Shulou Source: shulou.com Published: 2022-05-31 17:27:44 10月01日 Update

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.

Tags: Errors content configuration dimension master-slave parameters data databases files reasons solutions more knowledge articles nodes industries solutions information information channels problems Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS NVidia MySQL Xiaomi Shulou Technology