[SERVER-3919] db.printShardingStatus() refuses work with "not a shard db!" message Created: 21/Sep/11  Updated: 06/Dec/22  Resolved: 31/May/19

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.0.0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Rosco Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12 21:17:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux


Assigned Teams:
Sharding
Operating System: Linux
Participants:

 Description   

mongos> use admin
switched to db admin
mongos> db.runCommand(

{ enablesharding : "catalog_ru" }

);

{ "ok" : 0, "errmsg" : "already enabled" }

mongos> db.printShardingStatus();
printShardingStatus: not a shard db!

mongos> use config
switched to db config
mongos> db.databases.find();

{ "_id" : "catalog_ru", "partitioned" : true, "primary" : "shard0000" }

mongos> db.locks.find();

{ "_id" : "balancer", "process" : "u2dev-mongo-03:27017:1316615709:1804289383", "state" : 0, "ts" : ObjectId("4e79ffe070639be433e17f71"), "when" : ISODate("2011-09-21T15:16:48.839Z"), "who" : "u2dev-mongo-03:27017:1316615709:1804289383:Balancer:846930886", "why" : "doing balance round" }

mongos> db.shards.find();

{ "_id" : "shard0000", "host" : "192.168.9.213:27018" } { "_id" : "shard0001", "host" : "192.168.9.214:27018" } { "_id" : "shard0002", "host" : "192.168.9.215:27018" } { "_id" : "shard0003", "host" : "192.168.9.216:27018" } { "_id" : "shard0004", "host" : "192.168.9.217:27018" }

mongos> db.collections.find();
{ "_id" : "catalog_ru.catalog_search_index", "lastmod" : ISODate("1970-01-16T05:43:38.084Z"), "dropped" : false, "key" :

{ "catalog_node_id" : 1 }

, "unique" : false }



 Comments   
Comment by Scott Hernandez (Inactive) [ 16/Sep/12 ]

Sam, what version are you using?

You can manually delete collections in the config db but it is not something you should do.

Comment by Sam Darwin [ 16/Sep/12 ]

I just reproduced this issue.

mongos> use config
switched to db config
mongos> show collections
chunks
collections
databases
lockpings
locks
mongos
shards
system.indexes
mongos>

>>>On the config db, seems to not have a version collection. Was it deleted?

The config db itself was manually deleted. suppose that's not permitted...

Comment by Greg Studer [ 07/Mar/12 ]

Weird - tried to reconfirm with official 2.0.2 release - worked fine this time. Can't repro anymore...

Comment by Greg Studer [ 27/Jan/12 ]

Just created a fresh cluster on 2.0.2 - seems like the version collection isn't created for some reason.

1) Start single config server
2) Start mongos
3) No version collection?

Comment by Rosco [ 26/Sep/11 ]

Rebuilding cluster solved this problem.
Thank you.

Comment by Eliot Horowitz (Inactive) [ 25/Sep/11 ]

On the config db, seems to not have a version collection.
Was it deleted?
Have you tried bouncing mongos?

Comment by Eliot Horowitz (Inactive) [ 22/Sep/11 ]

Can you run "show tables"

Generated at Thu Feb 08 03:04:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.