I’ve got mongodb running in following configuration: 1 config server, 2 mongos, 8 shards (4 per mongos). I’ve got a problem using rockmongo administration tool:
if I connect to mongos router and try to list databases, I receive the following error:
Fatal error: Uncaught exception 'MongoCursorException' with message 'no primary!' in /home/vissi/var/www/rockmongo/app/models/MDb.php:5 ...
This problem exists only in one mongos, connecting to other mongos gives correct listing. Running db.serverStatus() in mongo console shows ... ok => 1 in both mongos.
if I connect to mongod running with shardsvr option, I see only config and local databases.
How should I connect to see all my databases correctly? phpmoadmin (and mongo console) runs show dbs ok.
If you have more than 1500 reputation, please, add rockmongo tag to this question.
The problem was resolved updating
mongosat one of the machines from 1.6.5 to 1.7.3.