Light Blue Pointer
๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Developing/Trouble shooting

Exception authenticating MongoCredential{mechanism=SCRAM-SHA-256, userName='root', source='admin', password=<hidden>, mechanismProperties=<hidden>}] with root cause

by Greedy 2024. 5. 9.

๐Ÿšฉ๋ฌธ์ œ : MongoDB ์—ฐ๊ฒฐ์ด ๋˜์ง€ ์•Š๊ณ  ์—๋Ÿฌ ๋ฐœ์ƒ

2024-05-09T20:16:58.672+09:00 ERROR 23172 --- [core] [nio-8081-exec-3] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.data.mongodb.UncategorizedMongoDbException: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-256, userName='root', source='admin', password=<hidden>, mechanismProperties=<hidden>}] with root cause

com.mongodb.MongoCommandException: Command failed with error 18 (AuthenticationFailed): 'Authentication failed.' on server localhost:27018. The full response is {"ok": 0.0, "errmsg": "Authentication failed.", "code": 18, "codeName": "AuthenticationFailed"}
at com.mongodb.internal.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:205) ~[mongodb-driver-core-4.11.1.jar:na]

 

โ›ณํ•ด๊ฒฐ : ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ๋ณต์žกํ•˜๊ฒŒ ๋ฐ”๊ฟจ๋‹ค

๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ๋„ˆ๋ฌด ์งง์•„์„œ ์•ˆ ๋œ ๊ฑฐ์˜€๋‹ค

58155815

testpassword1234๋กœ ๋ณ€๊ฒฝํ•˜๋‹ˆ๊นŒ

์ž˜ ๋Œ์•„๊ฐ”๋‹ค

 

admin์— root๊ฐ€ ์—†๋Š”์ง€ ๊ฒ€์ฆํ•˜๋Š๋ผ ์—„์ฒญ ์‹œ๊ฐ„์„ ์ผ๋Š”๋ฐ ๊ทธ๊ฒŒ ์•„๋‹ˆ์—ˆ๋‹ค๊ณ  ํ•œ๋‹ค