Questions tagged [replicaset]

This tag is used mostly for a MongoDB replica set (a group of "mongod" processes that maintain the same data set) and rarely for a Kubernetes ReplicaSet (the next-generation Replication Controller with set-based selector support).

583 questions
0
votes
1 answer

get openshift public key

I am currently trying to set up mongodb replica set using two digital ocean droplets and one openshift gear. When I try to obtain the openshift gear public key under .ssh directory I got "permission denied". Does any of you guys know if it is…
Chao Lu
  • 3
  • 1
0
votes
1 answer

Unable to configure grails mongo replicaset host URLs from external properties file

I am unable to configure grails mongo replicaset host URLs from external properties file. My config is: grails version 2.4.3 config.groovy grails { mongo { replicaSet = ["test.mongo1.co:27017", "test.mongo2.co:27017", …
0
votes
2 answers

MongoDB: shutdownServer failed: not authorized on admin to execute command db.grantRolesToUser db.createUser

I would like to Convert a Standalone to a Replica Set. First step of the procedure mentions to Shut down the standalone mongod instance. Actually the db.shutdownServer() command throws following error: shutdownServer failed: not authorized on admin…
Senju
  • 435
  • 2
  • 5
  • 20
0
votes
1 answer

How to specify which node is being queried in Mongo ReplicaSet?

connection: client = MongoClient( 'localhost:27017', replicaSet='foo', readPreference='secondaryPreferred') so, how to specify whether slave or master is used ? thanks~
Leo
  • 629
  • 1
  • 9
  • 25
0
votes
1 answer

Can't connect to secondary members in a replica Set

I've created a mongodb replica set with 3 members. They are synchronized, but if I try to connect to secondary members via Robomongo and via webapp it does not work. I get the error for the slaveOK is set to false, but I've just set rs.slaveOk() to…
0
votes
3 answers

MongoDB secondary replica does not have collections as in primary

I have set up a mongodb replica set on my local machine, and created couple of collections in a database named "adaptive-db". From the mongo shell, when i connect to the primary and run show dbs, i can see and query my database "adaptive-db". I…
aazeem
  • 844
  • 1
  • 12
  • 23
0
votes
1 answer

Mongodb created replica set string showing exception

I have got this issue while working on replica sets. Server is successfully turning on but after executing rs.initiate() and rs.status I am getting errors. "info2" : "no configuration explicitly specified -- making one", "errmsg" : "exception: bad…
0
votes
1 answer

Mongodb replica set questions

I have a mongodb replica set configuration of one primary machine, one secondary machine and one arbiter machine. The primary and secondary machines have 2 collections (each in its own database) I need to delete a few Gb from one collection and…
user2175783
  • 1,291
  • 1
  • 12
  • 28
0
votes
1 answer

Mongodb replicaset with PHP client, avoid connections between nodes

We have a Mongodb replicaset with 2 nodes, each of them located in a distinct CPD, in different countries. The latency between both nodes is measurable. This is not a problem when writing data, as this is done once a day using an offline…
gontrollez
  • 6,372
  • 2
  • 28
  • 36
0
votes
1 answer

Get the actual node being used when connecting to a MongoDB replicaSet

I'm querying data from a mongoDB replica-set. The queries take quite a long time and I'd like to be sure that the data is not being read from the wrong node. Is it possible to get the actual node being used for a given query? I'm using the PHP…
gontrollez
  • 6,372
  • 2
  • 28
  • 36
0
votes
0 answers

Can we set multiple write concerns for a replica set in MongoDB?

Say, I have set write concern for a replica set with 3 members as w = "majority". If a member of the replica set goes down, would it be possible that the write concern could change for such a scenario? I read MongoDB: The definitive guide as well…
user2278764
  • 55
  • 1
  • 7
0
votes
1 answer

Add Shard not reducing secondary disk size in MongoDB

My company is using mongoDB as a database. Currently we are writing script for adding shard, once the disk value increase more than 70%. It is working fine and adding one extra shard after threshold of 70% reaches. The problem is that when we add…
0
votes
1 answer

MongoDB Replicaset Connection string using C# Driver

I have My Mongo DB set with a replica set of 3. One Primary and Two secondaries. var connectionString = ConfigurationManager.AppSettings["MongoDBWriteCS"]; var client = new MongoClient(connectionString); _MongoWriteServer = client.GetServer(); …
HaBo
  • 13,999
  • 36
  • 114
  • 206
0
votes
1 answer

Can't connect to MongoDB database with NodeJS native driver

I have a NodeJS app in which I need to connect to to MongoDB databases - one a single server set up, and the second from a replica set. I connect to the next one just fine, but when connecting to the second one - I get the following…
byteSlayer
  • 1,806
  • 5
  • 18
  • 36
0
votes
1 answer

What is recommended configurations of MongoDb replicaset (2 DCs) for automatic primary selection upon DC failure

I need to distribute mongo nodes over 2 data centers. I am bit confused by the fault-tolerance table : Number of Members = 4 Majority Required to Elect a New Primary = 3 Does the number 4 mean I need total 5 voting members or can I have 3 voting…
kaniska Mandal
  • 189
  • 1
  • 12