반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- npm
- 영화추천
- 퇴사후공무원
- 성북구맛집
- JavaScript
- 꼴뚜기회
- gradle
- 공무원
- 뚝섬역맛집
- 성신여대편백집
- ubuntu자바설치
- 통영여행
- 통영에어비앤비
- 방이편백육분삼십
- 방이편백육분삼십성신여대
- 성신여대맛집
- 자바스크립트에러처리
- tomcat7
- 서울숲누룽지통닭구이
- react
- 한성대맛집
- 파이썬
- ELK
- 통영
- springboot
- 국가직
- 돈암동맛집
- 스페인여행
- 통영예쁜카페
- 한남동맛집
Archives
- Today
- Total
코린이의 기록
[MongoDB]MongoNetworkError: failed to connect to server 본문
반응형
$ node startup.js
[2020-02-25T05:39:08.785Z] ERROR : {"name":"MongoNetworkError","errorLabels":["TransientTransactionError"]}
(node:14508) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [10.20.1.252:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 10.20.1.252:27017]
at Pool.<anonymous> (/root/devel/monitoring/dashboard-backend/node_modules/mongodb/lib/core/topologies/server.js:433:11)
at Pool.emit (events.js:198:13)
at createConnection (/root/devel/monitoring/dashboard-backend/node_modules/mongodb/lib/core/connection/pool.js:562:14)
at connect (/root/devel/monitoring/dashboard-backend/node_modules/mongodb/lib/core/connection/pool.js:985:11)
at makeConnection (/root/devel/monitoring/dashboard-backend/node_modules/mongodb/lib/core/connection/connect.js:40:11)
at callback (/root/devel/monitoring/dashboard-backend/node_modules/mongodb/lib/core/connection/connect.js:262:5)
at Socket.err (/root/devel/monitoring/dashboard-backend/node_modules/mongodb/lib/core/connection/connect.js:287:7)
at Object.onceWrapper (events.js:286:20)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
(node:14508) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:14508) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
^HMongoNetworkError^H10.20.1.252:27017mo
mongoDB 가 실행되지 않았음
$ sudo service mongod start
Redirecting to /bin/systemctl start mongod.service
정상 동작
node startup.js
[2020-02-25T05:43:54.399Z] DEBUG : DB Uri: mongodb://10.20.1.252:27017/monitoring
(node:15065) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
[2020-02-25T05:43:54.712Z] INFO : API server listening on 0.0.0.0:8080, in development
[2020-02-25T05:43:54.741Z] INFO : Database connected.
반응형
Comments