[SERVER-15377] Mongo.getDatabaseNames() occasionally throws CommandFailureException - "exception: can't open database in a read lock." Created: 24/Sep/14 Updated: 10/Dec/14 Resolved: 24/Sep/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Adam B | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | We see this periodically in our unit tests, where we have code that looks like: foreach (String dbName in mongo.getDatabaseNames()){ |
||||||||
| Participants: | |||||||||
| Description |
|
We have been having some problems where our mongo connection fails to allow us to get the database names from the DB. We call the method: com.mongodb.Mongo.getDatabaseNames() Caused by: com.mongodb.CommandFailureException: { "serverUsed" : "localhost:27017" , "errmsg" : "exception: can't open database in a read lock. if db was just closed, consider retrying the query. might otherwise indicate an internal error" , "code" : 15927 , "ok" : 0.0} at com.mongodb.CommandResult.getException(CommandResult.java:76) public List<String> getDatabaseNames(){ BasicDBObject cmd = new BasicDBObject(); >>CommandResult res = getDB(ADMIN_DATABASE_NAME).command(cmd, getOptions()); Has anyone else had this problem? reposted from StackOverflow: |
| Comments |
| Comment by Adam B [ 24/Sep/14 ] |
|
Thanks |
| Comment by J Rassi [ 24/Sep/14 ] |
|
Hi, I'm resolving this ticket as a dup of ~ Jason Rassi |
| Comment by Adam B [ 24/Sep/14 ] |
|
The suggestion over there was to file a ticket. At any rate, filed... and I'll update over there accordingly. |