推荐工具
RoboMongo
推荐书目
50 Tips and Tricks for MongoDB Developers
Related Blogs
Snail in a Turtleneck
lixia625
V2EX  ›  MongoDB

mongo Connection refused

  •  
  •   lixia625 · Oct 25, 2015 · 5206 views
    This topic created in 3879 days ago, the information mentioned may be changed or developed.

    MAC OS

    $ mongo
    MongoDB shell version: 3.0.7
    connecting to: test
    2015-10-25T14:32:57.535+0800 W NETWORK  Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused
    2015-10-25T14:32:57.537+0800 E QUERY    Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
        at connect (src/mongo/shell/mongo.js:179:14)
        at (connect):1:6 at src/mongo/shell/mongo.js:179
    exception: connect failed
    

    之前一直都可以,自从升级了 captain 后...
    搜索一圈后无果,不知道是什么原因,特来求助。

    2 replies    2015-10-25 20:41:08 +08:00
    armnotstrong
        1
    armnotstrong  
       Oct 25, 2015
    第一步不应该先 nc -zv localhost 27017 看看端口开了么?服务起来了么?
    yimity
        2
    yimity  
       Oct 25, 2015 via iPhone
    对啊,你不确定下服务起来了没?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5465 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 08:16 · PVG 16:16 · LAX 01:16 · JFK 04:16
    ♥ Do have faith in what you're doing.