Re: CANT find collection .sys.inprog

From: Wan Bachtiar <wan.bachtiar@xxxxxxxxxxx>
To: mongodb-user <mongodb-user@xxxxxxxxxxxxxxxx>
Date: Thu, 5 May 2016 17:38:41 -0700 (PDT)
Why ads?


com.mongodb.MongoQueryException: Query failed with error code 73 and error 
message ‘Invalid collection name: admin.$cmd.sys.inprog’ on server ****
.com:27017

Hi Majeed, 

The find() 
<https://docs.mongodb.com/manual/reference/command/find/#dbcmd.find
command introduced in MongoDB v3.2 
<https://docs.mongodb.com/manual/release-notes/3.2/>, that is used by MongoDB 
Java Driver v3.2.x <http://mongodb.github.io/mongo-java-driver/3.2/> does 
not allow querying on the system collection. You could also observe this 
behaviour via mongo shell <https://docs.mongodb.com/manual/mongo/> by 
executing db.$cmd.sys.inprog.find() in v3.2:

db.$cmd.sys.inprog.find()2016-05-06T10:01:47.893+1000 I NETWORK  [thread1] DBClientCursor::init call() failed
Error: error doing query: failed

Please use currentOp() 
<https://docs.mongodb.com/manual/reference/method/db.currentOp/> command 
instead, as you have noticed: 

mongoClient.getDatabase("admin").runCommand(new Document("currentOp", Boolean.TRUE));

See MongoDB Java Driver: running a command 
<http://mongodb.github.io/mongo-java-driver/3.2/driver/getting-started/quick-tour-admin/#running-a-command
for more info.

Kind Regards, 

Wan. 


-- 
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
--- 
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/57084611-575b-4c30-a90e-5724f8b43fd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?