Questions tagged [mongodb-3.0]

This is the tag for mongodb version 3.0

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

Mongo 3.0 config database - can i delete data from collection actionlog?

I have 3 nodes with mongo 3.0 as follows: node 1 has mongos,config and shard process node 2 has config and shard process node 3 has config and shard process i.e a sharded cluster with one shard. ...
user avatar
1 vote
2 answers
813 views

MongoDB "select x from y where id in" another table

I'm trying to understand how can I achieve this in MongoDB: select * from Table1 where id in (selct id from table2) I'm trying to aggregate but I just can't understand how JSON works: db.Collection1....
user avatar
  • 7,104
0 votes
1 answer
351 views

Mongodb index keeps growing in size eventhough the collection has a TTL index

I work on a mongodb sharded cluster (3.0.2 i know it's very outdated, not my call), on which i have a sharded db and a sharded collection on which i have multiple indexes. One of the indexes is a TTL ...
user avatar
  • 101
0 votes
0 answers
84 views

MongoDB works only on user is assigned to admin database

I am using mongo db with authentication and it is working as expected when I map the user to the admin database like below, use admin; db.getUsers(); { "_id" : "admin.test1", ...
user avatar
  • 71
0 votes
1 answer
709 views

How to use mongoexport command with ssl?

I am trying to export collection data from (SSL MongoDB 4.x), for this I am running below command on linux terminal. Earlier I used mongoexport command in Linux terminal without SSL which works ...
user avatar
  • 101
0 votes
1 answer
337 views

Mixing sharding and Replica in MongoDB cluster

We know there are two ways to create a mongoDB cluster :- 1.) Sharding 2.) Replication My question is can we combine both sharding & replication like we have in elastic cluster?
user avatar
  • 101
-1 votes
1 answer
469 views

Database are not visible to users who has access in MongoDB

We are using Robo 3t tool to interact with Mongodb. We could see the user has read access on 2 databases but when the user is connected to MongoInstance that databases are not visible to the users. ...
user avatar
0 votes
1 answer
73 views

Mongo DB Upgrade 3.0 to 3.2 Verification of Upgrade

We have a few environments with MongoDB 3.0, these are standalone servers. These servers are already using WiredTiger Storage engine. I am trying to upgrade them to 4.2. As per the upgrade ...
user avatar
  • 101
0 votes
0 answers
503 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 ...
user avatar
  • 33
2 votes
3 answers
8k 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" : "...
user avatar
  • 71
2 votes
1 answer
3k 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 ...
user avatar
2 votes
1 answer
139 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 ...
user avatar
0 votes
1 answer
412 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 ...
user avatar
1 vote
2 answers
3k 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: ...
user avatar
2 votes
1 answer
981 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 ...
user avatar
  • 43
1 vote
1 answer
530 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 -...
user avatar
  • 43
0 votes
1 answer
128 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 | ...
user avatar
2 votes
2 answers
14k 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 ...
user avatar
  • 155
2 votes
1 answer
5k 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 ...
user avatar
2 votes
1 answer
530 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 ...
user avatar
  • 511
1 vote
2 answers
432 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 ...
user avatar
0 votes
1 answer
631 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 ...
user avatar
4 votes
1 answer
758 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 ...
user avatar
1 vote
0 answers
279 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 ...
user avatar
  • 111
2 votes
1 answer
716 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 ...
user avatar
  • 359
6 votes
3 answers
8k 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 ...
user avatar
  • 207
7 votes
2 answers
8k 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 adding mmapv1: smallFiles: true to the storage options. I now get the ...
user avatar
0 votes
1 answer
3k 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 ...
user avatar
  • 15
1 vote
0 answers
448 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....
user avatar
4 votes
2 answers
14k 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 ...
user avatar
1 vote
1 answer
1k 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 ...
user avatar
3 votes
2 answers
24k 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() { ...
user avatar
  • 35
1 vote
1 answer
55 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....
user avatar
  • 123
0 votes
1 answer
1k 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 ...
user avatar
1 vote
1 answer
1k 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 ...
user avatar
-1 votes
1 answer
819 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 ...
user avatar
1 vote
0 answers
957 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: ...
user avatar
  • 11
1 vote
1 answer
2k 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: ...
user avatar
0 votes
1 answer
371 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/...
user avatar
0 votes
1 answer
2k 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:...
user avatar
-1 votes
1 answer
34 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 ...
user avatar
4 votes
0 answers
334 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 ...
user avatar
  • 1,177
1 vote
1 answer
48 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('...
user avatar
  • 11
0 votes
1 answer
54 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', ...
user avatar
2 votes
0 answers
59 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... ...
user avatar
1 vote
0 answers
395 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 ...
user avatar
  • 133
3 votes
1 answer
640 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 ...
user avatar
  • 2,188
1 vote
1 answer
230 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 (...
user avatar
1 vote
1 answer
2k 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":"...
user avatar
0 votes
1 answer
255 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 ...
user avatar
  • 101