停止mongodb 
use admin 
db.shutdownServer();

mongos> db.shutdownServer(); 
assert failed : unexpected error: "shutdownServer failed: unauthorized: this command must run from localhost when running db without auth" 
Error: Printing Stack Trace 
    at printStackTrace (src/mongo/shell/utils.js:37:15) 
    at doassert (src/mongo/shell/assert.js:6:5) 
    at assert (src/mongo/shell/assert.js:14:5) 
    at DB.shutdownServer (src/mongo/shell/db.js:346:9) 
    at (shell):1:4 
Tue Sep 23 16:46:51.328 assert failed : unexpected error: "shutdownServer failed: unauthorized: this command must run from localhost when running db without auth" at src/mongo/shell/assert.js:7

mongo localhost:27021/admin 登录进去 
mongos> use admin 
switched to db admin 
mongos> db.shutdownServer(); 
Tue Sep 23 16:47:51.595 DBClientCursor::init call() failed 
server should be down... 
Tue Sep 23 16:47:51.599 trying reconnect to localhost:27021 
Tue Sep 23 16:47:51.599 reconnect localhost:27021 failed couldn't connect to server localhost:27021

直接:

./bin/mongo localhost:21000/admin --eval "db.shutdownServer({force:true})"

mongodb停止遇到shutdownServer failed: unauthorized: this command must run from localhost when running db without auth解决方法的更多相关文章

  1. 使用vue-cli创建工程的时候提示vue-cli Failed to download repo vuejs-templates/webpack-simple:self signed certificate in certificate chain的解决方法

    最近在使用 vue-cli 脚手架创建项目的时候,遇到 webpack-simple 模板下载不成功的情况,提示 vue-cli Failed to download repo vuejs-templ ...

  2. mysql57重新安装后无法再次启动mysql57服务“本地计算机上的MySQL服务启动后停止。某些服务在未由其他服务或程序使用时将自动。”--解决方法

    本地计算机上的MySQL服务启动后停止.某些服务在未由其他服务或程序使用时将自动. (win10,mysql5.7+) 解决方法: 第一步:查看MySQL57安装路径 只要在programData路径 ...

  3. 在Ubuntu中启动./jmeter-server报错Server failed to start: java.rmi.RemoteException: Cannot start. ranxf is a loopback address.解决方法

      执行失败错误信息: root@ranxf:/home/ranxf/apache-jmeter-3.1/bin# ./jmeter-server Writing log file to: /home ...

  4. Python报错 ImportError: DLL load failed while importing win32api: %1 不是有效的 Win32 应用程序 的解决方法

    今天在用jupyter notebook 的时候发生了kernel error,点开之后提示了以下报错信息 Traceback (most recent call last): File " ...

  5. Tomcat报failed to parse the expression [${xxx}]异常(javax.el.ELException)的解决方法

    Tomcat 7 'javax.el.ELException' 的解决方式tomcat 7对EL表达式的语法要求比较严格,例如"${owner.new}"因包含关键字new就会导致 ...

  6. VS2010提示error TRK0002: Failed to execute command解决方法

    昨天windows8自动更新Microsoft .NET Framework 3.5和4.5.1安全更新程序,今天用VS2010编译时提示如下错误信息 TRACKER : error TRK0002: ...

  7. Failed to execute command: ""C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ResGen.exe" 的一个解决办法

    最近在做wpf项目,期间下了一些源码参考,但是在build时经常遇到下面这种bug: Error 2 Failed to execute command: ""C:\Program ...

  8. Command "python setup.py egg_info" failed with error code 1一种问题的解决方法

    问题描述:无论是你在pycharm中直接使用import and install命令,还是pip的时候出现了Command "python setup.py egg_info" f ...

  9. FileZilla出现Failed to convert command to 8 bit charset 

    FileZilla这款FTP客户端软件,自从华哥使用以来,采用其默认的设置,一直用得很顺畅,没有出现过什么问题.但是今天碰到了一个问题.如图. 错误信息为:Failed to convert comm ...

随机推荐

  1. NHibernate应用开发

    第一章:NHibernate入门       第一讲:NHibernate架构剖析       第二讲:搭建第一个NHibernate应用程序       第三讲:nhibernate.cfg.xml ...

  2. 发送邮件——stamplib

    配置文email.ini件信息: [email]sender=xxxxxxxxxxxpwd=xxxxxxxxxxxxreciver=xxxxxxxxxxxxxpython 3.x代码如下: impor ...

  3. Chrome浏览器快捷键

    Chrome窗口和标签页快捷键:Ctrl+N 打开新窗口 Ctrl+T 打开新标签页 Ctrl+Shift+N 在隐身模式下打开新窗口 Ctrl+O,然后选择文件 在谷歌浏览器中打开计算机上的文件 按 ...

  4. Android Camera 通过V4L2与kernel driver的完整交互过程

    http://blog.chinaunix.net/uid-26215986-id-3552456.html 原文地址:Android Camera 通过V4L2与kernel driver的完整交互 ...

  5. 优秀 H5 案例收集 vol.3(不定期更新)

    上期浏览:Vol.1   Vol.2 爱的不同定义,五笔连成爱http://news.163.com/special/fdh5_valentines/ 世界华语悬疑文学大赛—下一位悬疑大师,就是你!h ...

  6. CSS 边距和填充

    margin and padding are the two most commonly used properties for spacing-out elements. A margin is t ...

  7. 20145229吴姗珊逆向BOF实践

    20145229吴姗珊逆向BOF实践 实践 实践目标 本次实践的对象是一个名为pwn1的linux可执行文件 该程序正常执行流程是:main调用foo函数,foo函数会简单回显任何用户输入的字符串. ...

  8. 20162326 齐力锋 2016-2017-2 《程序设计与数据结构》 MySort.java 实验博客

    实验代码学习编程中的问题及解决方法 代码运行成功截图 首次代码运行出现的问题截图 问题1:无法从静态上下文中引用非静态方法 问题1解决方法及思考: split方法是非静态方法,需要借助对象来调用.我查 ...

  9. UIScrollView监听静止的数种情况

    1.直接通过block -(void)testInBlock { //通过block监听 [UIView animateWithDuration:1.0 animations:^{ self.scro ...

  10. 使用buildroot创建自己的交叉编译工具链【转】

    本文转载自:https://blog.csdn.net/linczone/article/details/45894181 使用buildroot创建自己的交叉编译工具链 关键字:buildroot ...