bad auth Authentication failed 에러 질문이요ㅠ
5832
작성한 질문수 13
{ MongooseServerSelectionError: bad auth Authentication failed.
[0] at new MongooseServerSelectionError (C:\Users\jaekyu\Desktop\boilerplate-mern-stack-master\node_modules\mongoose\lib\error\serverSelection.js:22:11)
[0] at NativeConnection.Connection.openUri (C:\Users\jaekyu\Desktop\boilerplate-mern-stack-master\node_modules\mongoose\lib\connection.js:823:32)
[0] at Mongoose.connect (C:\Users\jaekyu\Desktop\boilerplate-mern-stack-master\node_modules\mongoose\lib\index.js:333:15)
[0] at Object.
[0] at Module._compile (internal/modules/cjs/loader.js:776:30)
[0] at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
[0] at Module.load (internal/modules/cjs/loader.js:653:32)
[0] at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
[0] at Function.Module._load (internal/modules/cjs/loader.js:585:3)
[0] at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
[0] at startup (internal/bootstrap/node.js:283:19)
[0] at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
[0] message: 'bad auth Authentication failed.',
[0] name: 'MongooseServerSelectionError',
[0] reason:
[0] TopologyDescription {
[0] type: 'ReplicaSetNoPrimary',
[0] setName: null,
[0] maxSetVersion: null,
[0] maxElectionId: null,
[0] servers:
[0] Map {
[0] 'cluster0-shard-00-02.ujwdv.mongodb.net:27017' => [ServerDescription],
[0] 'cluster0-shard-00-01.ujwdv.mongodb.net:27017' => [ServerDescription],
[0] 'cluster0-shard-00-00.ujwdv.mongodb.net:27017' => [ServerDescription] },
[0] stale: false,
[0] compatible: true,
[0] compatibilityError: null,
[0] logicalSessionTimeoutMinutes: null,
[0] heartbeatFrequencyMS: 10000,
[0] localThresholdMS: 15,
[0] commonWireVersion: null },
[0] [Symbol(mongoErrorContextSymbol)]: {} }
이런 에러가 뜹니다 ㅠㅠ ㅠ
localhost:3000 으로 들어가보면
뜨긴뜨는데 로그인버튼 없이 로그아웃으로 떠버리네요ㅠ
몽고디비 접속이 제대로 안된걸까요?ㅠ
답변 4
1
네 ㅠ server/config/dev.js 에다가
mongodb+srv://hyeri:<password>@cluster0.ujwdv.mongodb.net/<dbname>?retryWrites=true&w=majority
password는 제가 입력한 비밀번호로 바꿔서 넣는거 맞죠?~
뒤에 dbname은 Cluster0 으로 바꿨는데도 안돼요ㅠ
0
아 이경우는 몽고디비가 제대로 연결이 안된 상황입니다 ~
그 몽고디비
module.exports ={
mongoURI:'mongodb+srv://account:password@waves-z0mtr.mongodb.net/test?retryWrites=true&w=majority'
}
이런식으로 dev.js 에 잘 넣어주셨나요 ~ ?
npm i하면 바로, 라이브러리 오류없이 받아지고, 구동되는 소스는 없나요?
0
52
1
ERROR in ./node_modules/antd/es/version/index.js 2:15-22
0
221
1
자료 없음
0
322
1
이미지 깨짐
0
336
1
npm run dev 동작 에러
0
304
1
npm run dev 동작 에러
0
295
1
npm run dev 동작에러납니다...
0
661
1
npm run dev 실행 오류
0
653
1
비디오 업로드, 로그인, 회원가입 504 error
0
1057
1
시작부터 오류생기시는 분들 해결법입니다.
1
467
1
오류 해결 공유
0
459
1
npm install 에러 질문드립니다.
0
1121
2
아예 몽고DB에 연결한다고만 하고 연결이 안되고 있습니다.
0
550
1
해당 오류 해결 방법 좀 알려주세요 ㅠㅠ
0
516
1
로컬스토리지에 대한 질문입니다!!
0
515
0
video가 안 나타나는 문제
0
894
1
ffmpeg 설치 후 cannot read property 'format' of undefined 500 에러 해결
0
470
0
typeError or 콘솔 500 뜨는분..
0
336
0
npm run dev 관련 오류
0
578
1
답글이 달리지않고 디비에도 저장되지않으며 새로고침이 됩니다.
0
246
0
useState 자동 생성
0
347
1
TypeError: Cannot read properties of undefined (reading 'format')
0
1246
2
userData undefined / state에 user.userData가 없습니다.
0
248
0
antd Input background color 변경
0
242
0





