11.4 깃허브파일부터 몽고디비 연결이 안됩니다.

미해결질문
사탕순대 프로필

11.3까진 잘돌리면서 따라왔는데 

11.4파일부터 몽고디비 세팅부터 열심히 따라 했는데 연결에러가 계속 뜹니다.

몽고디비 연결이 끊겼습니다. 연결을 재시도합니다.

몽고디비 연결 에러 MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoError: Authentication failed.

    at Function._getError (/Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/auth/scram.js:125:14)

    at /Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/auth/scram.js:175:31

    at _callback (/Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/connection/connect.js:320:5)

    at Connection.messageHandler (/Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/connection/connect.js:349:5)

    at Connection.emit (events.js:210:5)

    at processMessage (/Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/connection/connection.js:368:10)

    at Socket.<anonymous> (/Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/connection/connection.js:537:15)

    at Socket.emit (events.js:210:5)

    at addChunk (_stream_readable.js:326:12)

    at readableAddChunk (_stream_readable.js:301:11)

    at Socket.Readable.push (_stream_readable.js:235:10)

    at TCP.onStreamRead (internal/stream_base_commons.js:182:23) {

  name: 'MongoError',

  [Symbol(mongoErrorContextSymbol)]: {}

}]

    at Pool.<anonymous> (/Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/topologies/server.js:433:11)

    at Pool.emit (events.js:210:5)

    at /Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/connection/pool.js:562:14

    at /Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/connection/pool.js:985:11

    at callback (/Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/connection/connect.js:110:5)

    at /Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/connection/connect.js:367:21

    at /Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/auth/auth_provider.js:66:11

    at /Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/auth/scram.js:177:16

    at _callback (/Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/connection/connect.js:320:5)

    at Connection.messageHandler (/Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/connection/connect.js:349:5)

    at Connection.emit (events.js:210:5)

    at processMessage (/Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/connection/connection.js:368:10)

    at Socket.<anonymous> (/Users/parks/Desktop/nodejs-book-master/ch11/11.6/gif-chat/node_modules/mongodb/lib/core/connection/connection.js:537:15)

    at Socket.emit (events.js:210:5)

    at addChunk (_stream_readable.js:326:12)

    at readableAddChunk (_stream_readable.js:301:11) {

  name: 'MongoNetworkError',

  errorLabels: [ 'TransientTransactionError' ],

  [Symbol(mongoErrorContextSymbol)]: {}

세팅은 그대로 따라갔는데 무슨문제인지 모르겠네요 

조현영 프로필
조현영 2019.11.28

몽고디비를 실행하셨나요? 맥이나 리눅스이신 것 같은데 직접 실행해주셔야 합니다.

지식공유자 되기
많은 사람들에게 배움의 기회를 주고,
경제적 보상을 받아보세요.
지식공유참여
기업 교육을 위한 인프런
“인프런 비즈니스” 를 통해 모든 팀원이 인프런의 강의들을
자유롭게 학습하는 환경을 제공하세요.
인프런 비즈니스