Sharded cluster instance(Node) getting authentication error

Hi @Nino_I ,
as mentioned from documentation:

Sharded Clusters

compact only applies to mongod instances. In a sharded environment, run compact on each shard separately as a maintenance operation.

You cannot issue compact against a mongos instance.

So you need to create the correct user on each shard and than you can apply that operation.

BR

1 Like