-
Type:
Bug
-
Resolution: Done
-
Priority:
Critical - P2
-
Affects Version/s: 2.0.2, 2.0.3
-
None
-
Environment:osx or linux, server must be set up on a different ip than localhost (preferably a separate machine). This is not a ruby driver issue, I used ruby to ensure it was not a node.js driver issue.
https://github.com/christkv/node-mongodb-native/issues/497
-
Fully Compatible
-
ALL
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
Setup for reproducing the issue
---------------------------------------- app to use
require 'sinatra' require 'mongo' require 'json' @@conn= Mongo::Connection.new('192.168.0.192', 27017); @@db1= @@conn.db('tweet') @@db1.authenticate('admin', 'admin') get '/' do puts @@db1 @coll= @@db1.collection('tweets') @cursor= @coll.find({}, :fields => ['_id']).limit(2) @results= @cursor.to_a(); JSON.dump(@results) end
------------------------------------------ Data population script from console
use tweet db.tweets.drop(); for(var i=0;i<200;i++){ print(i) db.tweets.insert({account_id:new ObjectId(), avg_ctr:Math.random(), published:new Date() }) }
------------------------------------------ Steps to reproduce
1. Boot up mongod in auth mode
2. Run the console script to set up a database with some test data
3. Set up the user for the 'tweet' db using
use tweet
db.addUser('admin', 'admin')
4. start the application
ruby server.rb (or where you stored the file)
5. Hit the url with your browser or curl a couple of times
6. Go to the mongo console and do
db.serverStatus()['cursors']
You will see the number of open cursor increase and hang around until they time out. This does not seem to happen if you run against the server on localhost or without auth.
- is duplicated by
-
SERVER-4600 No auth for killCursors command
-
- Closed
-
-
SERVER-626 killcursors should do some authentication checks when auth is enabled
-
- Closed
-