Mongo startup error report
Show collections
Uncaught exception: error {"$err": "not master and slaveok=false", "code": 13435}
Take a closer look at the mongo log:
Unauthorized: not authorized on admin to execute command {replsetgetstatus: 1.0,for shell: 1.0}
The configuration of the conf parameter file of mongo is viewed through the log:
Cancel the parameters of replset,keyFile and return to normal.
In secondary mode, read and write operations are not allowed (error prompt: not master and slave false), temporary handling: rs.slave.OK ()
Note: due to the abnormal interrupt, the child process is restarted to report an error. Usually, there is a mongo locked file in the db_data directory, which is suffixed with lock and directly remove.