mongodb停止遇到shutdownServer failed: unauthorized: this command must run from localhost when running db without auth解决方法
停止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解决方法的更多相关文章
- 使用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 ...
- mysql57重新安装后无法再次启动mysql57服务“本地计算机上的MySQL服务启动后停止。某些服务在未由其他服务或程序使用时将自动。”--解决方法
本地计算机上的MySQL服务启动后停止.某些服务在未由其他服务或程序使用时将自动. (win10,mysql5.7+) 解决方法: 第一步:查看MySQL57安装路径 只要在programData路径 ...
- 在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 ...
- Python报错 ImportError: DLL load failed while importing win32api: %1 不是有效的 Win32 应用程序 的解决方法
今天在用jupyter notebook 的时候发生了kernel error,点开之后提示了以下报错信息 Traceback (most recent call last): File " ...
- Tomcat报failed to parse the expression [${xxx}]异常(javax.el.ELException)的解决方法
Tomcat 7 'javax.el.ELException' 的解决方式tomcat 7对EL表达式的语法要求比较严格,例如"${owner.new}"因包含关键字new就会导致 ...
- VS2010提示error TRK0002: Failed to execute command解决方法
昨天windows8自动更新Microsoft .NET Framework 3.5和4.5.1安全更新程序,今天用VS2010编译时提示如下错误信息 TRACKER : error TRK0002: ...
- 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 ...
- Command "python setup.py egg_info" failed with error code 1一种问题的解决方法
问题描述:无论是你在pycharm中直接使用import and install命令,还是pip的时候出现了Command "python setup.py egg_info" f ...
- FileZilla出现Failed to convert command to 8 bit charset
FileZilla这款FTP客户端软件,自从华哥使用以来,采用其默认的设置,一直用得很顺畅,没有出现过什么问题.但是今天碰到了一个问题.如图. 错误信息为:Failed to convert comm ...
随机推荐
- 基于UDP的套接字、粘包问题
一.基于UDP的套接字 UDP服务端 ss = socket() #创建一个服务器的套接字 ss.bind() #绑定服务器套接字 inf_loop: #服务器无限循环 cs = ss.recvfro ...
- javascript把RGB指定颜色转换成十六进制颜色(Converting R,G,B values to HTML hex notation)
Prologue 看见一篇非常好的外国文章,Making annoying rainbows in javascript,事实上我当时非常想把它翻译下来的,可是对于一个连六级都没过的人确实有点难度,一 ...
- 浅谈HTML文档模式
不知道爱多想的你有没有在编写HTML代码时思考过 <!DOCTYPE html> 或是这一长串看都看不懂的 <!DOCTYPE HTML PUBLIC "-//W3C//D ...
- 关于source insight、添加.s和.S文件,显示全部路径、加入项目后闪屏幕
1.source insight使用也有一年多时间了,今天出现建工程后添加文件“no files found” 百思不得姐: 后面发现是原工程命名时出现非法字符.重新命名就ok了. 切记切记 2.实用 ...
- Angular 学习笔记 :初识 $digest , $watch , $apply,浅析用法 。
传统的浏览器事件循环 :浏览器本身一直在等待事件,并作出响应.如果你点击一个button或者在input 中输入字符,我们在 JS 中 监听这些事件并设定了回调函数,那么这些事件被触发以后,回调函数就 ...
- Python之字符编码(Day10)
1. python解释器执行py文件的原理 ,例如python test.py 第一阶段:python解释器启动,此时就相当于启动了一个文本编辑器 第二阶段:python解释器相当于文本编辑器, ...
- 转:MVC遇上bootstrap后的ajax表单验证
使用bootstrap后他由他自带的样式has-error,想要使用它就会比较麻烦,往常使用jqueyr.validate的话只有使用他自己的样式了,而且有模型在使用模型验证更方便点.怎么解决呢? 当 ...
- HDOJ 1159 Common Subsequence【DP】
HDOJ 1159 Common Subsequence[DP] Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K ...
- 通过FFmpeg将多媒体文件解码后保存成Bmp图像(YUV420 RGB32)
/* g++ -o test test.cpp -lavformat -lavcodec -lavutil -lz -lm -lpthread -lswscale */ #include <st ...
- Python3.x:判断字符串是否为全数字、英文、大写、小写、空白字符
Python3.x:判断字符串是否为全数字.英文.大写.小写.空白字符 判断接字符串是否为数字: str = raw_input("please input the number:" ...