根据http://www.runoob.com/mongodb/mongodb-window-install.html的教程配置了MongoDB,Mongod.exe配置为

--port 指令表明mongo指向的端口,配置完启用服务后,提示异常

connect@src/mongo/shell/mongo.js:237:13

@(connect):1:6

exception: connect failed

异常显示连接到端口27017失败,此端口为默认MongoDB默认端口,并非在mongod中配置端口,这表明运行的mongo服务未启用指定的端口。

解决此异常的方法是,指定mongod配置文件

config的配置为:

systemLog:
    destination: file
    path: c:\data\dblog\mongodb.log
    logAppend: true
storage:
    journal:
        enabled: true
    dbPath: c:\data\db
net:
    port: 你指定的端口

然后重新配置mongod.exe,启动服务,这时再运行mongo --port 你指定的端口,运行结果为:

这时表明MongoDB配置成功。

MongoDB exception:connection failed的更多相关文章

  1. 使用SpringBoot + JavaMailSender 发送邮件报错 Mail server connection failed;Could not connect to SMTP host

    说明: 出于安全考虑,阿里云默认封禁 TCP 25 端口出方向的访问流量,无法在阿里云上的云服务器通过 TCP 25 端口连接外部地址. [官方提示]:如果您需要使用阿里云上的云服务器对外部发送邮件, ...

  2. 如何在android studio 1.0 启动时设置代理【解决WARN - ateSettings.impl.UpdateChecker - Connection failed.】

    今天第一次用android studio,下了个比较新的1.0.1 linux版本,结果启动时老是出现以下错误: [ 6987] WARN - ateSettings.impl.UpdateCheck ...

  3. ssh启动报错:org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect

    ssh项目启动报错: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection t ...

  4. [RabbitMQ] Connection failed

    RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachabl ...

  5. 安装好的虚拟机,外部通过ssh工具连接,报connection failed

    今天,新装了一台ubuntu虚拟机,安装成功以后,准备利用Xshell从外部访问linux,以减少切换,但是,在连接时,总是会报:connection failed. 于是,写下这篇随笔,以增加记忆且 ...

  6. Xshell 链接 Could not connect to '192.168.80.129' (port 22): Connection failed

    在使用Xshell链接虚拟机VM里面的Linux的时候.链接失败,报 Could not connect to ): Connection failed 解决步骤: 1.重启VM.Linux.Xshe ...

  7. 使用PHPMailer 中的报错解决 "Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:"

    PHPMailer项目地址:https://github.com/PHPMailer/PHPMailer 项目中用到PHPMailer,使用过程中报错:"Connection failed. ...

  8. Android studio Connection failed (dl.google.com)

    公司的网,莫名其妙的不能更新了,却可以下载compile文件... 于是乎FQ,hosts,修改studio.exe.vmoptions文件 然并卵,都特么不行 搞了一天还是不行 这种问题或许可以找到 ...

  9. phoenix连接hbase数据库,创建二级索引报错:Error: org.apache.phoenix.exception.PhoenixIOException: Failed after attempts=36, exceptions: Tue Mar 06 10:32:02 CST 2018, null, java.net.SocketTimeoutException: callTimeou

    v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VM ...

随机推荐

  1. redis的两种安装方法

    原:https://www.cnblogs.com/caokai520/p/4409712.html C# Redis   概念 Redis是一个开源的使用ANSI C语言编写.支持网络.可基于内存亦 ...

  2. Eclipse 那些小技巧(值得收藏)

    1.菜单命令系列 Edit→content Assist→add Alt+/ 代码关联 Windows→Next Editor→add Ctrl+Tab 切换窗口 Run→Debug Toggle L ...

  3. 【ABP.Net】1.创建项目&介绍框架结构

    既然已经打开这个页面了,我就不介绍什么是ABP了.哈哈哈,如果想知道,请移驾.反正我是不说. 1.首先打开https://aspnetboilerplate.com/Templates 下载所需要的A ...

  4. SpringBoot使用prometheus监控

    本文介绍SpringBoot如何使用Prometheus配合Grafana监控. 1.关于Prometheus Prometheus是一个根据应用的metrics来进行监控的开源工具.相信很多工程都在 ...

  5. [AGC017D]Game on Tree

    [AGC017D]Game on Tree 题目大意: 一棵\(n(n\le10^5)\)个结点的树.A和B轮流进行游戏,A先手.每次删掉一棵子树,根结点不能删.最先不能操作的人输,问最后谁赢. 思路 ...

  6. 常用jq代码

    1. 只允许输入数字,且禁止输入法 <html> <head> <script type='text/javascript' src='../../js/jquery.m ...

  7. C#语言struct结构体适用场景和注意事项

    在C#语言中struct结构体和class之间的区别主要是值类型和引用类型的区别,但实际上如果使用不当是非常要命的.从Win32时代过来的人对于struct一点不感觉陌生,但是却反而忽略了一些基本问题 ...

  8. 搭建 RTMP 服务器

    主要步骤 具体步骤 FAQ docker 搭建版 参考 主要步骤 下载 nginx 的 rtmp 模块 编译nginx,带 hls,rtmp 配置 nginx.conf,设置 rtmp 的推流文件路径 ...

  9. 初学spring boot 一

    建立maven项目,在prom.xml中导入依赖 <parent> <groupId>org.springframework.boot</groupId> < ...

  10. Redis的7个应用场景

    一:缓存——热数据 热点数据(经常会被查询,但是不经常被修改或者删除的数据),首选是使用redis缓存,毕竟强大到冒泡的QPS和极强的稳定性不是所有类似工具都有的,而且相比于memcached还提供了 ...