-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.7.2, 2.7.3
-
Component/s: None
-
Environment:Windows 7 64bit, Java 6
When I try to shutdown mongodb using this java code:
final MongoURI uri = new MongoURI( "mongodb://localhost:16162" ); final Mongo m = new Mongo( uri ); final DB db = m.getDB( "admin" ); final CommandResult command = db.command( new BasicDBObject( "shutdown", 1 ) ); System.out.println( command );
Last command prints:
{ "serverUsed" : "localhost:16162" , "errmsg" : "unauthorized: this command must run from localhost when running db without auth" , "ok" : 0.0}
But as you can see I'm running it from localhost.
- duplicates
-
JAVA-249 Java Driver cannot connect to 'localhost' when mongod is listening only on 127.0.0.1 (or "localhost")
- Closed