Command error codes 67 and 86

937 views
Skip to first unread message

ben brockway

unread,
Aug 6, 2014, 7:02:35 PM8/6/14
to mongod...@googlegroups.com
Hey. Trying to find the meaning of these codes but am struggling. Could somebody explain them to me?

I am under the impression that 67 is caused by trying to create an index with a name that already exists with different spec. However I also got code 86, stating what appeared to be the same thing. Could I get some clarity?

Is there a good place to look to find a list of codes?

Thanks

Asya Kamsky

unread,
Aug 10, 2014, 6:24:53 PM8/10/14
to mongodb-user
Ben,

Can you provide some context - i.e. the complete error messages you are getting (as well as versions of everything you are running)?

Asya



--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/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...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/42b9a5bc-acd6-4394-ad4f-a9c50975aca1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stephen Steneker

unread,
Aug 11, 2014, 10:39:54 AM8/11/14
to mongod...@googlegroups.com
Hi Ben,

You can find a list of these error codes in:

The errors you mentioned are:
  error_code("CannotCreateIndex", 67 )
  error_code("IndexKeySpecsConflict", 86 )

To figure out when these are used may take a bit of grubbing in the code, but the accompanying log message should provide more context.

Error code 67 is a general code used when an index cannot be created (12 references, mostly in db/catalog/index_catalog.cpp). For example:
  - "cannot create indexes on the system.indexes collection"
-"cannot create indexes on the oplog"
-"the index spec needs a 'ns' field'"
  - "add index fails, too many indexes"
...

Error code 86 is very specific (only used once). In this case you are trying to create an index with the same name but different key spec from the existing spec.

Regards,
Stephen
Reply all
Reply to author
Forward
0 new messages