Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

챕터 12.4 Mongod 연결 실패 #797

Open
lear1091 opened this issue Jan 10, 2024 · 4 comments
Open

챕터 12.4 Mongod 연결 실패 #797

lear1091 opened this issue Jan 10, 2024 · 4 comments

Comments

@lear1091
Copy link

Node.js 교과서와 제로코님의 코드를 통해서 gif 채팅방을 시키려고 교과서 8장에서 Mongod 설치하고 Windows Powershell 창을 띄워서 제로코님의 코드에서 12.4로 루트경로도 맞춰서 콘솔창에 npm start를 치니깐 에러코드가 반복적으로 계속 뜹니다 왜 그런걸까요..? 혹시나 제가 알려드리지 못한게 있다면 알려주시면 감사하겠습니다.
[에러코드]
몽고디비 연결이 끊겼습니다. 연결을 재시도합니다.
몽고디비 연결 에러 MongoServerError: Authentication failed.
at Connection.onMessage (C:\Users\clear\OneDrive\바탕 화면\Test Python\nodejs-book-master\ch12\12.4\gif-chat\node_modules\mongodb\lib\cmap\connection.js:227:30)
at MessageStream. (C:\Users\clear\OneDrive\바탕 화면\Test Python\nodejs-book-master\ch12\12.4\gif-chat\node_modules\mongodb\lib\cmap\connection.js:60:60)
at MessageStream.emit (node:events:519:28)
at processIncomingData (C:\Users\clear\OneDrive\바탕 화면\Test Python\nodejs-book-master\ch12\12.4\gif-chat\node_modules\mongodb\lib\cmap\message_stream.js:125:16)
at MessageStream._write (C:\Users\clear\OneDrive\바탕 화면\Test Python\nodejs-book-master\ch12\12.4\gif-chat\node_modules\mongodb\lib\cmap\message_stream.js:33:9)
at writeOrBuffer (node:internal/streams/writable:564:12)
at _write (node:internal/streams/writable:493:10)
at Writable.write (node:internal/streams/writable:502:10)
at Socket.ondata (node:internal/streams/readable:1007:22)
at Socket.emit (node:events:519:28) {
ok: 0,
code: 18,
codeName: 'AuthenticationFailed',
connectionGeneration: 0,
[Symbol(errorLabels)]: Set(2) { 'HandshakeError', 'ResetPool' }
}

@ZeroCho
Copy link
Owner

ZeroCho commented Jan 10, 2024

#236
이 방법 한 번 해보세요

@lear1091
Copy link
Author

lear1091 commented Jan 10, 2024

혹시 12.4 전에 챕터들 과정을 건너뛰고 하는거라면 다른 모듈을 설치할게 있나요? 아님 설정이라던가..

@ZeroCho
Copy link
Owner

ZeroCho commented Jan 10, 2024

코드만 바꾸시면 됩니다. 책이랑 버전이 달라서 문제가 발생하는 것일거고요.

@lear1091
Copy link
Author

혹시 어떤파일에 useCreateIndex: true가 있는지 알 수 있을까요?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants