mongo连接不上Timed out after 30000
2024-09-07 21:57:54
本地连接mongo报错,错误代码为:
Caused by: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches WritableServerSelector.
Client view of cluster state is {type=UNKNOWN, servers= ...............................
系统:
centos7, 64位
mongo,mongodb-linux-x86_64-rhel70-4.0.10
解压,进入bin,启动
./mongod --dbpath=/data/db/ --config=./mongodb.conf &
报错了
为什么呢?
用linux本地连接mongo测试 --》 是ok的,证明服务没有问题
那是什么呢?--》防火墙
[root@localhost data]# systemctl stop firewalld.service #停止firewall
[root@localhost data]# systemctl disable firewalld.service #禁止firewall开机启动
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@localhost data]#
搞定ok!!!!
最新文章
- 使用tornado,我们可以做什么?
- espcms会员二次开发文件说明——会员,时间格式
- Brew Command Not Found
- ASP.NET MVC学习之视图篇(2)
- Technical notes fornight
- wap版和pc版的旋转js
- VMware 虚拟机安装 Mac OS X Mountain Lion 苹果系统
- oracle创建数据库表空间
- struts2 里escape=";false";的问题?
- jquery datatable测试部分代码(仅自用)
- OPENQUERY (Transact-SQL)
- python中函数与函数式编程(二)
- MongoDB\BSON\UTCDateTime::toDateTime
- tomcat 虚拟目录
- [朴孝敏][Sketch]
- 树状数组+二分答案查询第k大的数 (团体程序设计天梯赛 L3-002. 堆栈)
- TP5报错variable type error: array
- selenium+Java,xpath定位方法详解(搬运留存)
- curl 命令返回json结构human readable
- [Training Video - 6] [File Reading] [Java] Read Properties file
热门文章
- BZOJ练习记
- C++面向对象程序设计学习笔记(5)
- 【oracle】ORA-12638 : 身份证明检索失败
- Regular Forestation CodeForces - 1252F(树同构)
- nwjs-打包
- Codeforces Round #549 (Div. 2) E 倍增处理按排列顺序的上一个位置
- 数据库多行数据合并一行(sqlserver、Oracle、Mysql)
- SpringBoot第十三篇:日志处理
- JAVA PTA 7-1 作品评分 (10 分)
- Java8 新特性 Stream() 创建流