dfsfd 发表于 2017-10-26 16:04:50

mongo启动报错

show collections;
uncaught exception:error{"$err": "not master and slaveok=false","code":13435}

进一步查看mongo日志:

unauthorized: not authorized on admin to execute command { replsetgetstatus: 1.0,for shell: 1.0}

通过日志查看了mongo的conf参数文件的配置:
取消了replset,keyFile的参数,恢复正常。

备注:因为异常中断导致重启生成子进程报错,通常情况都是在db_data目录中存在了一个mongo加锁的文件,后缀名为lock,直接remove。


页: [1]
查看完整版本: mongo启动报错