MongoDB exception:connection failed
根据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的更多相关文章
- 使用SpringBoot + JavaMailSender 发送邮件报错 Mail server connection failed;Could not connect to SMTP host
说明: 出于安全考虑,阿里云默认封禁 TCP 25 端口出方向的访问流量,无法在阿里云上的云服务器通过 TCP 25 端口连接外部地址. [官方提示]:如果您需要使用阿里云上的云服务器对外部发送邮件, ...
- 如何在android studio 1.0 启动时设置代理【解决WARN - ateSettings.impl.UpdateChecker - Connection failed.】
今天第一次用android studio,下了个比较新的1.0.1 linux版本,结果启动时老是出现以下错误: [ 6987] WARN - ateSettings.impl.UpdateCheck ...
- 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 ...
- [RabbitMQ] Connection failed
RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachabl ...
- 安装好的虚拟机,外部通过ssh工具连接,报connection failed
今天,新装了一台ubuntu虚拟机,安装成功以后,准备利用Xshell从外部访问linux,以减少切换,但是,在连接时,总是会报:connection failed. 于是,写下这篇随笔,以增加记忆且 ...
- 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 ...
- 使用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. ...
- Android studio Connection failed (dl.google.com)
公司的网,莫名其妙的不能更新了,却可以下载compile文件... 于是乎FQ,hosts,修改studio.exe.vmoptions文件 然并卵,都特么不行 搞了一天还是不行 这种问题或许可以找到 ...
- 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 ...
随机推荐
- Bicoloring 二分图+染色
https://vjudge.net/contest/281085?tdsourcetag=s_pcqq_aiomsg#problem/B #include<stdio.h> #inclu ...
- 【C语言编程练习】5.11 猴子吃桃子问题
1. 问题描述 有一只猴子,第一天摘下若干个桃子,当即吃掉了一半,又多吃了一个,第二天又将剩下的桃子吃掉了一半,又多吃了一个,按照这样的吃法,每天都吃前一天吃下的桃子的一半又一个.到第十天,就剩下了一 ...
- Rewrite JSON with Fetch
1.重写json请求部分:HTML文件代码如下:<html>......<script> var myList = document.querySelector(‘ul‘); ...
- go语言的for循环
for循环是一个循环控制结构,可以执行指定次数的循环. 三种循环方式 第一种,常见的 for 循环,支持初始化语句 for init; condition; post { } init: 一般为赋值表 ...
- codeforces_A. Salem and Sticks_数组/暴力
A. Salem and Sticks time limit per test 1 second memory limit per test 256 megabytes input standard ...
- python 用正则处理日志实例
前提: 了解正则基本语法 import re with open('top10_xiaozhuang_net.log','r') as f1: #读取日志文件 subject=f1.rea ...
- For each...in / For...in / For...of 的解释与例子
1.For each...in for each...in 语句在对象属性的所有值上迭代指定的变量.对于每个不同的属性,执行一个指定的语句. 语法: for each (variable in obj ...
- unity网络----简单基础
网络 TCP:与打电话类似,通知服务到位 UDP:与发短信类似,消息发出即可 IP和端口号是网络两大重要成员 端口号(Port)分为知名端口号[0-1024,不开放)和动态端口号[1024,10000 ...
- request.getRequestDispatcher跳转jsp页面失败
我在JS里面写了个Ajax,传值给控制器,然后利用request.getRequestDispatcher(),打算跳转至另外一个页面.但是没有跳转成功,运行之后没反应. 在网上搜了资料发现,利用aj ...
- Echarts 几个常用图
最近公司业务上的 需求,要求做一些图表,我们技术框架上选择方便使用的Echarts. 下面是效果图: 下面是具体代码: <!DOCTYPE html> <html> <h ...