Before SERVER-7160 was fixed, doing a restore on a server with auth enabled with the correct username and password for a single DB other than the admin db will trigger this assertion. This is caused by the restore code trying to print out the "need to login" error message but because of this bug in the logging code, this assertion came out instead.
Offending code @ restore.cpp, createIndex():
if ( ! ( err["err"].isNull() ) ) { if (err["err"].String() == "norepl" && _w > 1) {
condition should probably be
if (err.hasField("err")) { ... } else if (err.hasField("errmsg")) {
and
if (err["err"].str() == "norepl" ...
- is related to
-
SERVER-7160 Mongorestore doesn't auth against admin DB when using username and password arguments
- Closed