Looking at this topic in the general forum Rolling restart of cluster I found a problem with corrupt vBuckets stopping Rebalances
Here is the C# code to fix it:
public static void rebalanceFix(bool create = true, string suffix = "")
{
string[] bucks = { "buck1", "buck2", "buck3", "default" };
foreach (string buckname in bucks)
{
using (var bucket = CMDMSvc.CouchbaseManager.cluster.OpenBucket(buckname))
{
for (int i = 1; i < 3080; i++)
{
var key = "rebalance::" + i.ToString() + (!string.IsNullOrWhiteSpace(suffix) ? "::" + suffix : "");
if (create)
{
Couchbase.Document<string> doc = new Couchbase.Document<string>();
doc.Id = key;//"rebalance::" + i.ToString();
//doc.Expiry = 10 * 60 * 3 * 3 * 1000;// Note I don't use this because I could not figure the time to do a rebalance. So I call this routine again to remove the keys after rebalance
doc.Content = "test" + i.ToString();
var result = bucket.Upsert<string>(doc);
Console.WriteLine(doc.Id + result.Message + result.Success.ToString());
}
else
{
var resultdel = bucket.Remove(key);
Console.WriteLine(key + resultdel.Message + resultdel.Success.ToString());
}
}
}
}
}