11

The problem can be solved by: Backing-up all the databases (using mongodump) Removing every file in /data/db, due to their incompatibility with the newer version: rm -rf /data/db/* Restarting the MongoDB service Restoring all the databases (using mongorestore)


3

according to https://docs.mongodb.com/manual/reference/built-in-roles/ the "readwrite" is to blame ... readWrite Provides all the privileges of the read role plus ability to modify data on all non-system collections and the system.js collection. The role provides the following actions on those collections: collStats convertToCapped ...


2

Basically, I made it with db.updateUser. On the doc, it says the following: passwordDigestor : string Optional. Indicates whether the server or the client digests the password. Available values are: "server" (Default) The server receives undigested password from the client and digests the password. "client" (Not compatible ...


2

I have met similiar problem with admin db, when upgrade from old mongodb 3.4 to 4.2. Solution is to mongodump all dbs and delete /var/lib/mongodb, then mongorestore all dbs back. STORAGE [initandlisten] exception in initAndListen: MustDowngrade: Collection does not have UUID in KVCatalog. Collection: admin.system.users, terminating 2019-09-24T21:59:55....


2

mongoreplay is currently not included in the Windows installation packages (as at MongoDB 4.0). This tool uses the libpcap packet capture library which is available on most UNIX/Linux platforms but is not standard on Windows. There's a relevant feature request to watch/upvote in the MongoDB Jira issue tracker: TOOLS-1730: Release mongoreplay for windows. ...


2

Can I choose which databases/collections are replicated ? A replica set is a group of mongodb instances that maintain the same data set, so it is necessary for the entire set of data to be replicated between nodes. Is a 2-members (a primary and a secondary) replica set eligible ? A replica set should have an odd number of voting members. If you want ...


1

Seems like the point of checkpoints was to move fast, but at the risk of losing a minute of data at a time. Whereas the journal is all about accounting for everything. So why have both? Seems like having the Journal kind of overrides any gains that Checkpoints were supposed to give. Although journal and checkpoint processes both write data to disk, they ...


1

Reference on how shard chunks work: https://docs.mongodb.com/v4.0/core/sharding-data-partitioning/ MongoDB uses the shard key associated to the collection to partition the data into chunks. A chunk consists of a subset of sharded data. Each chunk has a inclusive lower and exclusive upper range based on the shard key. The mongos routes writes to ...


1

In MongoDB 3.6+ you can add a pipeline to your $lookup stage to include additional join conditions. A solution was less obvious than I expected since your source lookup field is an array, but the following should return the expected outcome: db.collection1.aggregate([ { $match: { _id: "col1id1" }}, // Filtered lookup based on agg ...


1

Some tricks that help with performance issues: Use database limit/skip(both in queries and aggregations), and implement application pagination. If you expect users to only look for 50 records at a time, why are you sending 50,000? When doing the aggregation, use the $lookup stage after filtering the collection ([$match,$lookup]). Avoid doing the whole ...


1

This is a general architectural problem with the WiredTiger storage engine. It is now being discussed here: https://jira.mongodb.org/browse/WT-5479 Long story short, your number of open files is too high. If you can, consider removing unnecessary indexes, e.g. indexes on small collections. You could also explore the new wildcard indexes introduced in ...


1

MongoDB's server roles & permissions (as at MongoDB 4.0) don't provide the level of granularity you are after. However, I think this level of control is much better handled in your application logic. For example, even if it were possible to limit write access to the $push operator, there are additional options such as $slice that could cause existing ...


1

The read/write ticket values are set to 128 to prevent overwhelming WiredTiger with concurrent requests. They are chosen to cater for the typical server hardware. It's generally not recommended to change these values. If you see stalling and observed that the read/write tickets to be maxed out, it's extremely likely that this is just a symptom. The cause of ...


1

I found a solution where i configure rsyslog to pick up that file and forward it to my target server. # RSyslog Configuration for MongoDB /etc/rsyslog.d/mongod.conf $ModLoad imfile $InputFileName /var/log/mongodb/mongod.log $InputFileTag mongodb $InputFileStateFile mongodb-state $InputFileFacility local3 $InputRunFileMonitor local3.* action(type="omfwd" ...


1

Currently, The lower level you can control the access of resources is at the collection level. One option you can try is to create collections at each user level and give the user access to only that collection.


1

As here Mr. onetwopunch said that I had the same thing and it turned out to be a permissions issue .If the owner of the child process cannot access the log path or the log path does not exist, it will fail. What I did was put the log directory in my home directory: mkdir ~/log mongod --fork --logpath ~/log/mongodb.log


1

First, make sure the MongoDB service is running in the remote machine. Next, check if the MongoDB port is open to the outside network or not. The following will help you check if the 27017 is accessible from an outside machine. nmap -Pn 13.56.140.11 If the port is not enabled, use the following command to expose the port. sudo iptables -I INPUT -p tcp -...


1

There is an OPEN issue already created in MongoDB JIRA for the same. As per the issue, MongoDB index creation is not Multi-Threaded. use multiple cores for index sort-phase Multi-threaded index creation UPDATE Try increasing the maxIndexBuildMemoryUsageMegabytes parameter value. The default value is 500 MB. What does it do? Limits the amount of ...


1

What uses that much memory during the resync? There is so many things uses the memory during the resync time, As Mr. SpiXel has clearly defined here The WiredTiger cache settings only controls the size of memory directly used by the WiredTiger storage engine (not the total memory used by mongod). Many other things are potentially taking memory in a MongoDB/...


1

As MongoDB documentation here With WiredTiger, MongoDB utilizes both the WiredTiger internal cache and the filesystem cache. Starting in 3.4, the WiredTiger internal cache, by default, will use the larger of either: 50% of (RAM - 1 GB), or 256 MB. For example, on a system with a total of 4GB of RAM the WiredTiger cache will use 1.5GB of RAM (0.5 * (4 GB ...


1

As per MongoDB articles blog here The Connection Manager in Studio 3T makes it easy to connect to MongoDB, whether it is cloud-hosted or on-premise, or through a direct connection or a replica set. Create a new connection Open Studio 3T. Click on the Connect button either in the global toolbar or under the Recent Connections tab. This will open the ...


Only top voted, non community-wiki answers of a minimum length are eligible