iwind/rockmongo

Execute failed: not master

Opened this issue · 1 comments

Is it possible to connect to a hidden node in a replica set? I've tried several configurations but neither has worked so far.

I've also tried

$MONGO["servers"][$i]["mongo_options"] = array("replicaSet" => "repl set name")

but no luck so far.

here's my configuration

$MONGO["servers"][$i]["mongo_name"] = "qacmn0a1";
$MONGO["servers"][$i]["mongo_host"] = "qacmn0a1";
$MONGO["servers"][$i]["mongo_port"] = "27017";
$MONGO["servers"][$i]["mongo_auth"] = true;//enable mongo authentication?

rockmongo v1.1.5
Web server Apache/2.2.17
PHP version PHP 5.3.5-1ubuntu7.11
PHP extension mongo/1.3.2
Ubuntu 11.04
Mongo 2.2.2

Thanks
Robert

you have to set read preferences http://php.net/manual/en/mongo.readpreferences.php

$m = new MongoClient(...);
$m->setReadPreference(MongoClient::RP_SECONDARY);