This happened to me when doing a "--reindexAndRemoveOk --indexIdentifier now" in production.
Validating number of shards...Number of shards is incorrect and cannot be changed without a rebuild. You can solve this
problem by running this program again with either --startOver or --reindexAndRemoveOk. Make
sure you understand the consequences of either choice.. This script will now continue to
validate everything else.
Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=62727