mongodb端口改了還連27017

mongodb端口改了,但莫名的還是報錯,數據可以存到mongodb裏面,但出現這錯誤直接系統退掉,爲了趕進度,只能把端口改爲27017,有時間在研究,感覺有個mongodb的對nodejs驅動有個監聽線程再跑的時候,沒有拿到我傳的端口

> [email protected] start /opt/gitsource/armstrong-admin

> node ./bin/www

 

(node:10885) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.

node_modules/mongodb/lib/utils.js:725

          throw error;

          ^

 

MongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017

    at Timeout.waitQueueMember.timer.setTimeout [as _onTimeout] (/node_modules/mongodb/lib/core/sdam/topology.js:430:30)

    at ontimeout (timers.js:436:11)

    at tryOnTimeout (timers.js:300:5)

    at listOnTimeout (timers.js:263:5)

    at Timer.processTimers (timers.js:223:10)

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! [email protected] start: `node ./bin/www`

npm ERR! Exit status 1

npm ERR! 

npm ERR! Failed at the [email protected] start script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

 

npm ERR! A complete log of this run can be found in:

npm ERR!     /root/.npm/_logs/2020-04-22T17_17_48_843Z-debug.log

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章