Questions tagged [mongodb-3.0]

This is the tag for mongodb version 3.0

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

how can I translate a “include” column in a index from sql server to mongodb?

Does MongoDB have INCLUDE columns? in SQL Server let's say we have this query SELECT NAME FROM USERS WHERE ADDRESS ='LIGHT STREET' then I can create an index on ADDRESS and INCLUDE NAME. So , does ...
0
votes
0answers
37 views

Mongodb Replica Set Collection Has Different Document Count

I've created a new 3 node replica set and rsync'ed data from an existing mongo database for initial population. The secondary nodes went into STARTUP2 mode and seemed to successfully sync from the ...
1
vote
2answers
548 views

MongoDB - Mongorestore is not working as expected

A Very Good Day, I have the user in the mongodb like below who has the superuser privileges (I confirmed the role setting using show users command) { "_id" : "admin.mongoadmin", "user" : "...
0
votes
0answers
23 views

Mongos Impact On Sharding

I've recently just failed the mongo developer exam. One of the questions was on sharding. I'd like to know what are some of the pitfalls and benefits of increasing the mongos in summary?
1
vote
1answer
627 views

Mongo queries are slow and yielding/waiting for locks thousand times

We are using mongo setup with replica sets on AWS. Setup Details: 1 Primary node: r3.8xlarge 4 secondary nodes: r5.xlarge Mongo version: 3.0.8 (WiredTiger) Database size: 358GB We have configured ...
2
votes
1answer
50 views

Getting exception on running sh.status() command on MongoDB sharded cluster

I am running sh.status() command on my mongos instance of sharded Mongo cluster and I am getting below exception. mongos> sh.status() assert: command failed: { "ok" : 0, "errmsg" : "error ...
0
votes
1answer
188 views

Why slower using multiple mongos?

When I use a single mongos like 1.1.1.1:30000, the driver will return in 20ms to find a batch of documents. When I use 1.1.1.1:30000,1.1.1.2:30000,1.1.1.3:30000,it costs 60ms,three times more to ...
1
vote
2answers
924 views

Update single field in a document (document.update($set)?)

Can't seem to figure out how to update a single field. Whatever I try, to update one field (picture: "url") the rest of the fields are being removed and set to null. I use the following command now: ...
1
vote
1answer
299 views

Mongodump Backup Resume

My database size is approx 1.5 TB and I have approx 2TB free on backup mount point. But after 10 hours my backup fail due to lack of storage and its just 60% complete. Is their any why through which i ...
1
vote
1answer
191 views

mongodump: fact.bson: input/output error

We are trying to export 1.5TB database into mongodb. But its fail after 100gb and giving us below error. As we notice root mount point got 100% space. We are using below command: mongodump -u admin -...
0
votes
1answer
30 views

mongodb is not accessible through IP address 35.x.x.x

I have installed mongo DB on window server that is accessible on localhost:27017 but not accessible on 35.x.x.x:27017. I checked: 27017 Port is open. mongoDB is running. output of: netstat -anb | ...
1
vote
2answers
4k views

Is it possible to delete cache in Mongo?

My case is that I run several queries in Mongo and measure the response time. I know that Mongo uses Memory Mapped files and cache some data in RAM. If I create an index and run a query the execution ...
2
votes
1answer
2k views

Mongodb create user with only read and write access

Hi I created a new using using following command in mongodb, db.createUser({ user: 'csquad', pwd: 'somepass123', roles: [ { role: "readWrite", db: "cloud"}]}); Now this user is able to login to db ...
2
votes
1answer
128 views

Huge logs are generated in mongo db shard logs

We are using Mongo db Shard set up. What i see that on primary of each shard log file keep growing to GBs. Even in a day it reaches to 10GB for single day. This appears to be slowing down Mongo ...
1
vote
2answers
100 views

MongoDB Replica Set member cannot start due “84 key/value already in index”

I have a Replica Set with 3 members (1 primary and 2 secondaries), and one of the secondaries was working just fine and thrown the following error > 2018-03-12T11:03:54.868-0400 E REPL [repl ...
0
votes
1answer
316 views

Moving MongoDB shards from one server to another

I have a new server on which i have to copy the old version of the MongoDB already configured. On the old server(3.0.4), there are two shards: one shard has 350GB, and the other has 300GB of data. I ...
3
votes
1answer
365 views

MongoDB in ReplicaSet databases showing different sizes and objects

I have a MongoDB in a ReplicaSet with 3 members, and last week the primary node got corrupted somehow and stopped. I had to resync the data from the other nodes. It has been a week but I was checking ...
1
vote
0answers
247 views

MongoDB 64 on Raspberry Pi 3 with SLES 12 64 bit

I am trying to run MongoDB 3.4 on raspberry pi 3 with an OS which was made by SUSE and SUSE is the only official 64 bit OS for raspberry pi (SLES 12 SP2). I have downloaded the MongoDB from the link ...
2
votes
1answer
389 views

Clean up space used by moveChunk in file system

I have a directory in my local file system where databases are stored called moveChunk which I understand is used by MongoDB for shard movement of chunks. This is taking up around 206GB and I can't ...
3
votes
3answers
4k views

List all MongoDB databases from Linux bash terminal

Can you list all databases in MongoDB from a linux bash terminal? I cannot find the correct command. I am trying to list all so as that I can write a bash script to backup all DB's individually. Is ...
6
votes
2answers
5k views

MongoDB — Failed global initialization: Failed to open “var/log/mongodb/mongod.log”

I am getting errors starting Mongod v3.0.15 in Debian linux. I had changed the /etc/mongod.conf file to use smallFiles by addingmmapv1: smallFiles: true to the storage options. I now get the ...
0
votes
1answer
2k views

Can't auth admin db on the replica set

have one problem with a replica set There is an admin user with root permissions It's fully working on config servers, but when I trying to auth with it on any RS - got: 2017-09-18T09:01:53.755-0400 ...
1
vote
0answers
153 views

Mongodb auto-balancing issue

I have an issue with our production mongo db, could you, great mongo experts hint me on where to dig further please? The problem was detected in the application side (java): Caused by: com.mongodb....
3
votes
2answers
7k views

How to set up a user who doesn't have `admin` database access but use it as authentication database?

I want to setup a user in MongoDB. This user will not have admin database access. But it uses admin as authentication database. It will fail to connect the mongoDB by this command mongo --host ...
0
votes
1answer
508 views

What does PROJECTION stage mean in mongo explain result

I am running a explain command on a shard cluster in mongodb shell. From the output I see the first stage under inputStage is PROJECTION. I don't quite understand what this stage means. And I couldn't ...
0
votes
2answers
7k views

Mongodb list current connection

I am using a db.currentOp() to check the current connection in Mongodb. How can I get the total number of all record and how can I get all the "client" IP in a one column? Thanks db.currentOp() { ...
1
vote
1answer
45 views

How to resolve unmodifiable replica set state

We are using mongoDB 3.0, and our setup uses six instances with one PRIMARY and the rest of them as SECONDARY. We were trying to remove three of these using the following command sequence - rs....
0
votes
1answer
595 views

UnknownError: error while getting last oplog entry for begin timestamp: find command not yet implemented

I have 2 mongoDBs. One running as PRIMARY, its version is 3.0.13. The other works as SECONDARY in the replica set, its version is 3.0.11. Replication works perfectly at this point. I want to add a ...
1
vote
1answer
570 views

How to validate mongodb backup and restore

I am using mongodump to create a backup of the db based on some query params and mongorestore to restore the same in another mongodb in a diff environment. How can I validate whether the dump created ...
-1
votes
1answer
520 views

Benchmarking Mongodb Queries Without cache

I want to benchmark some Mongodb queries by calculating their execution time but I could not find a way to do so without caching : The first time I execute a query it takes a decent amount of time and ...
1
vote
0answers
564 views

Using MongoDB mongorestore to append data to collection with existing records

We are trying restore documents in the dump that are not present in a collection and skip over documents in the existing collection using mongorestore. This is how we run our restore command: ...
1
vote
1answer
542 views

Restoring the database dump of a newer version to an older version of mongodb

I find myself having to move a database between hosts but at the moment don't have the option of upgrading or downgrading any of the hosts. I'm trying to find out if it is safe to do the following: ...
0
votes
1answer
102 views

Why my mongodb Shell not getting started even after my mongodb server is running?

I am not getting the right problem what might be making the mongodb shell not getting initiated. Here is the gist of my log of MongoDB: https://gist.github.com/JafferWilson/...
0
votes
1answer
1k views

Mongodb error after db repair command

I was working with MongoDB using Pymongo Libraries. Suddenly MongoDB stopped. I restarted it. After a while it stopped again. So I searched and tried the following repair command: mongod --dbpath f:...
-1
votes
1answer
31 views

Updating a mongoCluster

We have Mongodb 3.2.6 as a cluster with 2 arbiter and 2 working data nodes running. Now we want to update to version 3.4.3. What is the intended way of doing this? Can I update one by one and will ...
4
votes
0answers
306 views

Performance degradation after upgrade from 3.0.11 to 3.2.12

Environment: CentoOS 6 (kernel 2.6.32), MongoDB community edition 3.0.11 and 3.2.12 , storage engine MMAP, config servers on SCCC We are experiencing performance degradation when moving from 3.0.11 ...
1
vote
1answer
43 views

When _id is present in the projection, is the index on _id used for the query?

My query is db.new.find({'a':{'$gt':200}, 'b':{'$lt': 30}}, {'a':1, 'c':1} ).sort({'c':-1}) Indexes present are (a,b), (a,c), (c), (a,b,c), (_id) When I check with explain('...
0
votes
1answer
48 views

Get two result sets in a single call

I'm working on an eCommerce-based website using MongoDb. In my DBCollection I have two types of documents: Company details Item { doc_type : 'company', name : 'Acer', type : 'Laptops', ...
2
votes
0answers
57 views

Why are these MongoDB queries using indexes differently?

I've been trying to diagnose some long running queries and whilst profiling them I've noticed some very strange behaviour that I can't explain (pun intended); which I'm hoping someone here can... ...
1
vote
0answers
366 views

Mongo read performance

I am running a simple iterator over all the documents in a collection in a mongo replica set (primary, secondary, arbitrary). On a collection with 1.000.000 items it takes about 10 seconds. On a ...
3
votes
1answer
517 views

cleaning up failed repair db: path: /var/lib/docker/wesfgr/repair/_tmp_repairDatabase_0

We run MongoDB 3.0.6 with MMAP in Docker container (single node). The filesystem was full and I did a repair with other path. 2016-10-03T08:58:51.186+0200 I INDEX [initandlisten] building ...
1
vote
1answer
144 views

mongodb - enableSharding for database takes five to six minutes to complete

I'm seeing some odd behavior when invoking the enableSharding command for a database. First a bit of background: I'm using MongoDB v3.2.7 and the Java driver. Currently I have only one replica set (...
1
vote
1answer
1k views

MongoDB duplicate “_id ” for an array “_id”

Consider db "test" in my standalone mongodb instance. I created a collection called testCol and inserted a document with the following syntax : db.testCol.insert({_id:{"age":22,"empId":1},"DOJ":"...
0
votes
1answer
194 views

MongoDB cannot be started after moving the server

I had a happy MongoDB 3.0.5 installed on a VM on a Windows 2012R2 Server, for light use. I moved the VM to a new physical server without any major changes, and to my surprise it cannot be started; and ...
1
vote
1answer
543 views

MongoDB Storage Engine

How can I change the storage engine of MongoDB permanently so that I don't have to run mongod without having to specify the storage engine every time? I am using shell version 3.2.7 on Windows 7 32-...
2
votes
1answer
696 views

Sharding Balancer and long running query problem

I have problem on my Sharding. There are a couple of long running queries observed, running for more than 3 hours. My question is, are the below things interrelated? What is the issue? How do I fix ...
2
votes
2answers
665 views

MongoDB aaS - administrate volumes/disk size - consequences of full volume - new file allocation failure

We run MongoDB (currently 3.0.6) as a Service. MongoDB is running inside Docker Container with a small volume 8 GB where mongod data files are stored permanent. The volume can't be extended. This is ...
1
vote
1answer
174 views

Error 13141 in mongos shell while trying to write to a result of the mapReduce invocation to a sharded collection

In our db init script, we have the following lines: var conn = new Mongo(); var admin = conn.getDB("admin"); var db = conn.getDB("foodb"); admin.runCommand({ "enableSharding": "foodb" }); // ... db....
1
vote
0answers
261 views

Operational issue for scheduling mongodump as backup method

For production backup, MongoDB recommends mongodump instead of mongoexport for accuracy of data. However, a few operational issue remain unclear to me, appreciate if anyone can advise on this matter. ...
0
votes
1answer
1k views

Mongo crash after 2 seconds of starting

My mongod service crashes within 2-5 seconds of starting. I don't understand why. Here are the systemctl logs: systemctl status mongod.service mongod.service - High-performance, schema-free ...