zoukankan      html  css  js  c++  java
  • mongo连接不上Timed out after 30000

    本地连接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!!!!

  • 相关阅读:
    jsf web.xml配置
    JSF中Filter的实现
    转码
    facelates标签
    jsf学习笔记注解
    date工具类
    js秒读功能
    w3c document 与 dom4j document转化工具类
    jsf学习笔记ui
    jsf学习笔记拦截器
  • 原文地址:https://www.cnblogs.com/renfanzi/p/10998844.html
Copyright © 2011-2022 走看看