Mongo error update does not contain _id or shard key for pattern

Mongo DB recommends all update() operations for a sharded collection that specify the signle document update only ‘multi:false’ option (which is by default) must include the shard key in the query condition so the query will hit only a specific shard cluster. If no shard key found and ‘multi:false’, it returns this error (See http://docs.mongodb.org/manual/core/sharded-cluster-query-router/)

In version 2.4, the error message is ‘for non-multi updates must have _id or full shard key’

Mongo error update does not contain _id or shard key for pattern

Mongo shell cannot use commands write mode, degrading to compatibility mode

You are using a new mongo (>= 2.6) shell to connect a older version mongod (2.4). The new mongo shell now integrates the write concern directly into the method (insert, update) rather than with a separate getLastError command, which is not supported by older mongod. The new shell then decide to downgrade to be compatible.

Solution: You can simply ignore this warning or try to use the correct mongo shell version.

Mongo shell cannot use commands write mode, degrading to compatibility mode