Spring

[Spring][Redis] RedisConnectionException : NOAUTH Authentication required ์—๋Ÿฌ

DAHLIA CHOI 2023. 2. 10. 15:40

redis๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ec2์— ๋ฐฐํฌ๋ฅผ ํ•˜๋Š”๋ฐ

io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required.์ด๋Ÿฐ ์—๋Ÿฌ๊ฐ€ ๋–ด๋‹ค

 

์ฐพ์•„๋ณด๋‹ˆ๊นŒ redis.conf ์ˆ˜์ •ํ•  ๋•Œ ์„ค์ •ํ–ˆ๋˜ ๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ํ•„์š”ํ•˜๋‹ค๋Š” ๋ง!

requirepass์— ์ ์—ˆ๋˜ ๋น„๋ฒˆ์„ spring ํ”„๋กœ์ ํŠธ application.yml์— ์ถ”๊ฐ€์‹œํ‚ค๋ฉด ๋œ๋‹ค!

(local๋กœ ํ•  ๋•Œ๋Š” ๋น„๋ฒˆ์ด ํ•„์š”์—†์ง€๋งŒ ec2๋ฅผ ํ†ตํ•ด ์™ธ๋ถ€์—์„œ ์ ‘์†ํ•  ๊ฒฝ์šฐ์—๋Š” ๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ์žˆ์–ด์•ผ ์ ‘์†์ด ๊ฐ€๋Šฅ)

 

  redis:
    port: 6379
    host: 
    password:

์œ„ password์— ์„ค์ •ํ•œ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•˜๊ณ  ์ ‘์†ํ•˜๋ฉด ๋!