Failed global initialization:FileNotOpen: Failed to open "C:\MongoDB\data\log\mongo.log" 安装MongoDB时卡死
在安装MongoDB的时候,下载了3.6版本,安装过程中发现到一半就卡死了,后面换了一个较低版本的才安装成功
这里是所有MongoDB版本的下载地址:
https://www.mongodb.org/dl/win32/x86_64-2008plus-ssl?_ga=2.115265476.272239361.1515997841-1827559456.1515997841
下载后安装,一路next安装完成,next、custom,改变安装位置。
把MongoDB安装在C盘目录下,安装完成后,创建数据库文件(自己创建data和db文件夹)的存放位置,比如
C:\MongoDB\data\db
然后打开终端,来到bin目录下,输入
mongod --dbpath C:\MongoDB\data\db
打开 http://127.0.0.1:27017/ ,发现如下提示:
It looks like you are trying to access MongoDB over HTTP on the native driver port.
将MongoDB服务器作为Windows服务运行
重新打开一个cmd终端(一定要管理员身份C:\Windows\System32\cmd.exe,右键以管理员身份运行,这个超级重要),继续来到并目录下,输入
- mongod --dbpath "C:\MongoDB\data\db" --logpath "C:\MongoDB\data\log\mongo.log" --install --serviceName "MongoDB"
输入上述命令之后出现了一些错误
Failed global initialization:FileNotOpen: Failed to open "C:\MongoDB\data\log\mongo.log"
研究后发现是没有创建这些文件,手动创建这些文件后重新打开cmd命令行,进入到bin里面,继续输入上面命令即可。
开启服务
接下来用命令net start mongodb 用来开启服务
打开任务管理器,服务,找到MongoDB,发现MongoDB正在运行。
好了,填坑就到这里,下面继续学习吧。
Failed global initialization:FileNotOpen: Failed to open "C:\MongoDB\data\log\mongo.log" 安装MongoDB时卡死的更多相关文章
- org.springframework.beans.factory.BeanCreationException,Invocation of init method failed,Context initialization failed
G:\javaanzhuang\apache-tomcat-\bin\catalina.bat run [-- ::,] Artifact ssm_qingmu02_web:war exploded: ...
- 单点登录(十)-----遇到问题-----cas启用mongodb验证方式报错com.mongodb.CommandFailureException---Authentication failed
cas启用mongodb验证方式报错com.mongodb.CommandFailureException---Authentication failed. 完整报错信息: 二月 08, 2017 5 ...
- log4j:ERROR Failed to rename [/log/xxx.log] to [/log/xxx.log.2016-11-23.log]
Log4j报错: log4j:ERROR Failed to rename [/log/xxx.log] to [/log/xxx.log.2016-11-23.log] google了一下发现是个b ...
- Maven-008-Nexus 私服部署发布报错 Failed to deploy artifacts: Failed to transfer file: ... Return code is: 4XX, ReasonPhrase: ... 解决方案
我在部署构件至 maven nexus 私服时,有时会出现 Failed to deploy artifacts: Failed to transfer file: ... Return code i ...
- postman Installation has failed: There was an error while installing the application. Check the setup log for more information and contact the author
Error msg: Installation has failed: There was an error while installing the application. Check the s ...
- FTP:500 OOPS: failed to open vsftpd log file:/var/log/vsftpd.log
如下:从10.12.8.165 FTP 到 10.1.3.34,报failed to open vsftpd log[a4_csbdc@localhost ~]$ ftp 10.1.3.34Conn ...
- centos 7 系统启动不了 出现报错dependency failed for /mnt , dependency failed for local file systems
阿里云一台Ecs重启后启动不了,出现报错 dependency failed for /mnt , dependency failed for local file systems , 报错的原因 ...
- 运行Virtualbox去安装系统时出错:Failed to open a session for the virtual machine,Unable to load R3 module xxxx/VBoxDD.DLL(VBoxDD)
貌似看到不少人(1,2,3),在使用Virtualbox去安装系统时,都遇到这个错误: 比如这里遇到的: 截图: 和另外这里的截图: 加文字描述: Failed to open a session f ...
- maven打包出错: Failed to clean project: Failed to delete
maven打包出错: Failed to clean project: Failed to delete 出现这种错误,通常是由于您已启动了另一个tomcat 进程,导致报错,关闭tomcat进程即可 ...
随机推荐
- [UOJ422][集训队作业2018]小Z的礼物——轮廓线DP+min-max容斥
题目链接: [集训队作业2018]小Z的礼物 题目要求的就是最后一个喜欢的物品的期望得到时间. 根据$min-max$容斥可以知道$E(max(S))=\sum\limits_{T\subseteq ...
- 记录一次Oracle注入绕waf
这个注入挺特殊的,是ip头注入.我们进行简单的探测: 首先正常发起一次请求,我们发现content-type是76 探测注入我习惯性的一个单引号: 一个单引号我发现长度还是76 我开始尝试单引号,双引 ...
- JS学习笔记Day14
一.正则表达式 (一)正则的概念 1.正则表达式是一种特殊的字符串模式,用于匹配一组字符串,就好比用模具做产品,而正则就是这个模具,定义一种规则去匹配符合规则的字符 (二)创建正则的方式 1.字面量的 ...
- 分布式监控系统开发【day38】:报警策略队列处理(五)
一.目录结构 二.报警策略队列处理 1.入口MonitorServer import os import sys if __name__ == "__main__": os.env ...
- vim与程序员
所有的 Unix Like 系统都会内建 vi 文书编辑器,其他的文书编辑器则不一定会存在. 但是目前我们使用比较多的是 vim 编辑器. vim 具有程序编辑的能力,可以主动的以字体颜色辨别语法的正 ...
- css样式关键字(initial,inherit,unset,revert,all)
关键字 在CSS中,有4个关键字理论上可以应用于任何的CSS属性,它们是initial(初始).inherit(继承).unset(未设置).revert(还原).而all的取值只能是以上这4个关键字 ...
- React Router v4 页面传值的三种方法
传值方法 1.props.params 使用React router定义路由时,我们可以给指定一个path,然后指定通配符可以携带参数到指定的path: <Route path='/user/: ...
- 忘记mysql的登陆密码该怎么办?
1.如果忘记了其他用户的密码,可以使用root账户进入mysql,修改mysql.user表中的用户密码 2.如果忘记了root的mysql密码,可以使用如下方式: 确认服务器处于安全的状态,也就是没 ...
- TIME_WAIT 太多的解决办法
TIME_WAIT 客户端与服务器端建立TCP/IP连接后关闭SOCKET后,服务器端连接的端口状态为TIME_WAIT.主动关闭的一方在发送最后一个 ack 后 就会进入 TIME_WAIT 状态 ...
- 002_soa_zk处理经验总结
一. 遇到这种情况直接把当前目录下的acceptedEpoch和currentEpoch挪走,重启publisher即可. cat /data/zookeeper/data/version-2/acc ...