mongodb - Bagaimana untuk menyelesaikan ralat mongo ini?
巴扎黑
巴扎黑 2017-05-17 10:02:10
0
2
838
events.js:163
      throw er; // Unhandled 'error' event
      ^
MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
    at Pool.<anonymous> (D:\projects\myblog\node_modules\mongodb-core\lib\topologies\server.js:328:35)
    at emitOne (events.js:96:13)
    at Pool.emit (events.js:191:7)
    at Connection.<anonymous> (D:\projects\myblog\node_modules\mongodb-core\lib\connection\pool.js:274:12)
    at Object.onceWrapper (events.js:293:19)
    at emitTwo (events.js:106:13)
    at Connection.emit (events.js:194:7)
    at Socket.<anonymous> (D:\projects\myblog\node_modules\mongodb-core\lib\connection\connection.js:177:49)
巴扎黑
巴扎黑

membalas semua(2)
过去多啦不再A梦

Saya rasa anda telah menemui sebabnya.

Kerana MongoDB tidak dimulakan. Mulakan MongoDB pada sistem pengendalian Windows!

Untuk rujukan.

Suka MongoDB! Berseronoklah!

PHPzhong
D:\projects\myblog>mongo
MongoDB shell version v3.4.4
connecting to: mongodb://127.0.0.1:27017
2017-05-14T23:17:25.098+0800 W NETWORK  [thread1] Failed to connect to 127.0.0.1:27017 after 5000ms milliseconds, giving up.
2017-05-14T23:17:25.099+0800 E QUERY    [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:237:13
@(connect):1:6
exception: connect failed
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan