Open GoogleCodeExporter opened 9 years ago
My above correction on my Linux box was Ok with rockmongo 1.1.2 with php driver
1.3.6 and Mongo 2.4.1.
I upgraded to rockmongo 1.1.5, and now it is not working again, with another
error:
Failed to connect to: 127.0.0.1:27017: Authentication failed on database 'admin' with username 'xxxxx': auth fails
If I can trust the mongodb log file, the authentication with the non admin user
is Ok, then it tries to find something in the admin db, which is not
authorized...
Changing back to rockmongo 1.1.2 let it work again...
Well...
Original comment by acord...@tftlabs.com
on 4 Apr 2013 at 3:59
Attachments:
the same thing happened to me. rockmongo1.1.5
Original comment by hk.y...@gmail.com
on 9 Apr 2013 at 9:26
app/controllers/server.php
修改 class ServerController doIndex方法:
$db = $this->_mongo->selectDB("admin");
为
$selectedDB = "admin";
if(isset($_SESSION["login"]) && isset($_SESSION["login"]["db"]) &&
trim($_SESSION["login"]["db"]) != ""){
$selectedDB = trim($_SESSION["login"]["db"]);
}
$db = $this->_mongo->selectDB($selectedDB);
app/lib/mongo/RMongo.php
修改 class RMongo listDBs方法
return $this->_mongo->listDBs();
为
try{
$dbs = $this->_mongo->listDBs();
}catch(Exception $e){
$dbs = array("ok"=>0,"databases"=>array(),"totalSize"=>-1);
}
return $dbs;
Original comment by hk.y...@gmail.com
on 9 Apr 2013 at 12:49
[deleted comment]
Great! Your suggestion seems to work.
Thanks
Original comment by acord...@tftlabs.com
on 15 Apr 2013 at 4:43
Hi,
After inserting the suggestion above the authentication issue was resolved. The
only problem is that now I can't perform any action on the collections and it
keeps returning a "Criteria must be a valid JSON object" error (see attached
file).
It even occurs when submitting an empty query...
Original comment by y...@wibbitz.com
on 23 Apr 2013 at 9:20
Attachments:
Can you show details about that?
The only appearence of "Criteria must be a valid JSON object" is line 209 in
app/controllers/collection.php,when eval fails.
$this->message = "Criteria must be a valid " . (($format == "json") ? "JSON
object" : "array");
Original comment by hk.y...@gmail.com
on 23 Apr 2013 at 4:15
I narrow it down a little bit:
When I switch to Query[Array] everything seems to be working.
I guess that the problem is with the _runJson() method in
app/classes/VarEval.php
which calls the execute() method.,
Original comment by yonil...@gmail.com
on 24 Apr 2013 at 7:52
I got the same problem.
rockmongo-on-windows-v0.0.4
Operation System (Windows 7 )
MongoDB version (2.4.3)
app/controllers/server.php would be fixed as above
app/lib/mongo/RMongo.php i can't find listDBs() Function!
after sign in with a normal user name i got always the exception!
Execute failed:unauthorized
function (){ return db.getCollectionNames(); }
Can someone help me?
Thanks!
Original comment by wan...@schaeffler.com
on 24 Jun 2013 at 6:43
I got the same problem as above.
rockmongo-on-windows-v0.0.4
Operation System (Windows 7 )
Execute failed:unauthorized
function (){ return db.getCollectionNames(); }
hlp plz.
Original comment by krisho...@gmail.com
on 28 Jul 2013 at 11:02
[deleted comment]
Problem solved: Add clusterAdmin role to the user you login as in the admin
database. Restart mongo.
I also have in place the snipit of code from message #3 above and this works
but I don't know at this point if that snipit of code was necessary.
Even though you do not have clusters this role is needed for listDatabases to
work. This command is also the basis of the mongo shell command show dbs. You
can test if you have mongo setup right by using this command in the shell.
Remember to change the role. Restart mongo. Get back into the mongo shell. use
admin. db.auth(), then test with show dbs.
Original comment by develope...@gmail.com
on 1 Aug 2013 at 7:56
rockmongo-on-windows-v0.0.4
Operation System (Windows 7 )
MongoDB version (2.4.3)
Is it possible to solve the problem in windows?
Original comment by wan...@schaeffler.com
on 8 Apr 2014 at 1:32
rockmongo-on-windows-v0.0.4
Operation System (Windows 7 )
MongoDB version (2.4.3)
Is it possible to solve the problem in windows?
I ask again.
The rockMongo is very useful tool. I can't find the other admin ui to replace
it.
But only this auth problem.
How can i solve the problem during correcting the php codes?
Please help me!
Original comment by wan...@schaeffler.com
on 9 Apr 2014 at 1:35
Original issue reported on code.google.com by
acord...@tftlabs.com
on 4 Apr 2013 at 1:44Attachments: