Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Removing a Replica Set node
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Damon C  
View profile  
 More options Dec 14 2011, 6:54 pm
From: Damon C <d.lifehac...@gmail.com>
Date: Wed, 14 Dec 2011 15:54:29 -0800 (PST)
Local: Wed, Dec 14 2011 6:54 pm
Subject: Removing a Replica Set node

Hi all,

I just wanted to get a little bit of clarity around removing a replica set
primary node given some behavior I saw when I tried to do so recently. Here
are the steps I took on mongo 1.8.x:

1. Request primary step down: db.adminCommand( { replSetStepDown : 60 } )
2. Wait for secondary to assume primary role
3. Remove old primary node from replica set: db.remove("hostname:27018")

Now at this point, I started getting "WriteBackListener exception : socket
exception" exceptions in my mongos log. I assume this is from attempting to
connect to the old host, which is now down. Eventually, those stopped. So I
fired everything back up and it was going fine until I tried to do a
slave_ok read. Attempting to do that read, whether from the ruby driver or
direct from a mongo shell, I would receive a "not master or secondary,
can't read" error. I tried flushing the router config, but that didn't
appear to help. At this point, I reconfigured all clients *not* to use
slave_ok and point to the primary and all operations worked perfectly fine.

After coming back to the problem several hours later, I was suddenly able
to do slave_ok queries without a problem.

Can somebody explain what's happening here? We process real-time data and
being unable to use slave_ok queries for some indeterminate period of time
after removing a replica set node is a little unsettling.

Thanks,

Damon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Kreuter  
View profile  
 More options Dec 14 2011, 8:05 pm
From: Richard Kreuter <rich...@10gen.com>
Date: Wed, 14 Dec 2011 17:05:20 -0800 (PST)
Local: Wed, Dec 14 2011 8:05 pm
Subject: Re: Removing a Replica Set node
Did you leave the old primary online for a while after removing it
from the set?

On Dec 14, 6:54 pm, Damon C <d.lifehac...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Damon C  
View profile  
 More options Dec 14 2011, 8:47 pm
From: Damon C <d.lifehac...@gmail.com>
Date: Wed, 14 Dec 2011 17:47:00 -0800 (PST)
Subject: Re: Removing a Replica Set node

It looks like that may have been what happened.

rs.remove shut the database down:
Tue Dec 13 22:23:49 dbexit: removed from replica set
Tue Dec 13 22:23:49 [rs Manager] shutdown: going to close listening
sockets...

But it looks like it actually started back up shortly after that and that's
where the assertions were coming from:
Tue Dec 13 22:53:47 [conn9] assertion 13436 not master or secondary, can't
read ns:db_name.collection_name query:{ _id: "xxx" }
Tue Dec 13 22:53:47 [conn9]  ntoskip:0 ntoreturn:-1

That makes a little more sense, but still odd that mongos would be sending
queries to that system...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nat  
View profile  
 More options Dec 14 2011, 8:57 pm
From: "Nat" <nat.lu...@gmail.com>
Date: Thu, 15 Dec 2011 01:57:34 +0000
Local: Wed, Dec 14 2011 8:57 pm
Subject: Re: [mongodb-user] Re: Removing a Replica Set node

Did you update your mongos config to remove that node from the replicaset seed? You should update both at the replicaset and at the shard level.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Damon C  
View profile  
 More options Dec 15 2011, 1:55 pm
From: Damon C <d.lifehac...@gmail.com>
Date: Thu, 15 Dec 2011 10:55:06 -0800 (PST)
Local: Thurs, Dec 15 2011 1:55 pm
Subject: Re: [mongodb-user] Re: Removing a Replica Set node

I did not, but I looked around for some official documentation on if that
was necessary and how to do it and didn't have much luck.

Nothing in the mongo documentation indicates that this is a necessary step.
:\


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Kreuter  
View profile  
 More options Dec 15 2011, 2:27 pm
From: Richard Kreuter <rich...@10gen.com>
Date: Thu, 15 Dec 2011 11:27:57 -0800 (PST)
Local: Thurs, Dec 15 2011 2:27 pm
Subject: Re: Removing a Replica Set node
Damon,

We're going to make a change that should prevent the "not master or
slave" error from being possible via the mongos.  See:

https://jira.mongodb.org/browse/SERVER-4501

Regards,
Richard

On Dec 15, 1:55 pm, Damon C <d.lifehac...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »