I met a problem:local authentication can be successful but remote authentication failed,
my mongo version is 4.2.2 ,
the mongodb is single shard and it has run more than 3 months without any problem until today I connect from another machine using mongo shell such as :
mongo --host x.x.x.x --port 27017 -u "myuser" --authenticationDatabase "mydb" -p
and it output following error:
MongoDB shell version v4.2.2
connecting to: mongodb://x.x.x.x:27017/admin?authSource=admin&compressors=disabled&gssapiServiceName=mongodb
2020-02-16T14:05:50.384+0800 E QUERY [js] Error: Authentication failed. :
connect@src/mongo/shell/mongo.js:341:17
@(connect):2:6
2020-02-16T14:05:50.386+0800 F - [main] exception: connect failed
2020-02-16T14:05:50.386+0800 E - [main] exiting with code 1
and the maxsize datafile of the collection is 180GB(only one file is 180G):
[root@mongo mongo]# ls -lh collection-11-6825888606219797635.wt
-rw-------. 1 mongod mongod 180G 2月 15 18:19 collection-11-6825888606219797635.wt
all the other factors is not changed,such as firewall is disabled,bindip is 0.0.0.0 the password is absolutely right,and even plus --authenticationMechanism also considered
the unique changed factor is the data is increased day by day ,so I guess it is related to the huge file size but I am not sure.please help me many thanks.