kevin-xw / rock-php

Automatically exported from code.google.com/p/rock-php
0 stars 0 forks source link

can not display dbs names and data from secondary replica sets #192

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a replica with 2 or three mongod
2.configure config.php with these servers
3.try to connect to a secondary with admin account

What is the expected output? What do you see instead?

you can't display db names. you've got an error probably due to slaveok is not 
set.
Execute failed:not master
function (){ return db.getCollectionNames(); }

RockMongo Version
1.1.0

Operation System:rh5.6 tikanga

PHP Version:5.3.3.5

php_mongo Version (1.0.9, ...)

1.2.9

MongoDB version (1.8.5, ...)

1:2.0.4-1ubuntu2

Please provide any additional information below.

Original issue reported on code.google.com by benoit.m...@gmail.com on 10 May 2012 at 3:13

GoogleCodeExporter commented 9 years ago
Should be fixed 1.1.2, please go and download latest version here: 
http://rockmongo.com/downloads

Original comment by iwind....@gmail.com on 11 May 2012 at 12:48

GoogleCodeExporter commented 9 years ago
hmm. I've already this bug on 1.1.2 

Original comment by benoit.m...@gmail.com on 15 May 2012 at 9:22

GoogleCodeExporter commented 9 years ago
You meant, the bug still exists on 1.1.2?

Original comment by iwind....@gmail.com on 17 May 2012 at 7:50

GoogleCodeExporter commented 9 years ago
yes, it still exists on 1.1.2

Original comment by benoit.m...@gmail.com on 17 May 2012 at 8:40

GoogleCodeExporter commented 9 years ago
the error exists in mongos, too.

Original comment by hk.y...@gmail.com on 5 Jun 2012 at 7:06

GoogleCodeExporter commented 9 years ago
still exists on 1.1.2~~~~

Original comment by tylerloc...@gmail.com on 18 Jun 2012 at 7:45

GoogleCodeExporter commented 9 years ago
I'm using mongos (2+2 sharded cluster) and i get this error aswell. Using 
version 1.1.2

Original comment by clpalexa...@gmail.com on 8 Aug 2012 at 9:14

GoogleCodeExporter commented 9 years ago
I just temporarily fixed this issue by forcing rockmongo to setSlaveOk(false). 
This may be a php mongo driver issue, or a mongos issue..

Just find the file MServer.php on the rockmongo distribution,locate the line 
"$this->_mongo->setSlaveOkay(true);" and set it to 
"$this->_mongo->setSlaveOkay(false);"

This fixed rockmongo for me.

My configuration:
2 Shards (each shard is a replica-set of two nodes - primary and secondary) - I 
only connect to the mongos process.
rockmongo version 1.1.2

Original comment by clpalexa...@gmail.com on 9 Aug 2012 at 6:27