๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

MSA2

[MSA / Spring Cloud] Spring Cloud MSA ํ”„๋กœ์ ํŠธ์—์„œ CORS ์„ค์ •์— ๋Œ€ํ•ด (feat. 403 error) ๋ถ€ํŠธ์บ ํ”„ ํ”„๋กœ์ ํŠธ์˜ "๋™์ƒ์ด๋†"์—์„œ Spring Cloud ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ์ด์šฉํ•˜์—ฌ MSA ํ”„๋กœ์ ํŠธ ์„ธํŒ…์„ ๋งก์•˜๋Š”๋ฐ์š”์ œ๊ฐ€ MSA ์„ธํŒ…์„ ํ•˜๋ฉฐ CORS ์„ค์ •์— ๋Œ€ํ•ด ๋†“์ณค๋˜ ๋ถ€๋ถ„๊ณผ ์ƒˆ๋กญ๊ฒŒ ์•Œ๊ฒŒ๋œ ๊ฒƒ์— ๋Œ€ํ•ด ํฌ์ŠคํŒ…ํ•ด๋ณด๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ๋™์ƒ์ด๋†์˜ MSA ์•„ํ‚คํ…์ฒ˜๋™์ƒ์ด๋† ํ”„๋กœ์ ํŠธ๋Š” ์•„๋ž˜์™€ ๊ฐ™์€ MSA ๊ตฌ์กฐ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.8081 ํฌํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š” vue ํ”„๋กœ์ ํŠธ๊ฐ€ 8080 ํฌํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š” API Gateway์—๊ฒŒ ์š”์ฒญ์„ ๋ณด๋‚ด๋ฉดAPI Gateway๋Š” ์„œ๋น„์Šค ๋””์Šค์ปค๋ฒ„๋ฆฌ ์—ญํ• ์„ ํ•˜๋Š” Eureka ์„œ๋ฒ„๋ฅผ ํ†ตํ•ด ๊ฐ ๋ชจ๋“ˆ์˜ IP, Port ์ •๋ณด๋ฅผ ์•Œ์•„๋‚ด๊ณ  ์ ์ ˆํ•œ ๊ณณ์œผ๋กœ ๋ผ์šฐํŒ…ํ•˜๋Š” ๊ฒƒ์ด์ฃ .(API gateway์™€ Eureka๋ฅผ ์ œ์™ธํ•œ ์„œ๋ฒ„๋“ค์€ ์œ ๋™ํฌํŠธ๋ฅผ ์“ฐ๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์—, Eureka๋ฅผ ํ†ตํ•ด IP, Port๋ฅผ ์•Œ์•„๋‚ด๋Š” .. 2024. 10. 3.
[Spring Cloud] MSA ๊ตฌ์กฐ์—์„œ ์š”์ฒญ์ด ์ฒ˜๋ฆฌ๋˜์ง€ ์•Š๋Š” ๋ฌธ์ œ (Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException) ๋™์ƒ์ด๋† ํ”„๋ก ํŠธ ๊ฐœ๋ฐœ์ด ์‹œ์ž‘๋์Šต๋‹ˆ๋‹ค. ์ œ๊ฐ€ axios ์ธํ„ฐ์…‰ํ„ฐ ์„ธํŒ…์„ ๋งก์•˜๋Š”๋ฐ์š”.์ธํ„ฐ์…‰ํ„ฐ ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ , ์ œ๋Œ€๋กœ ๋™์ž‘ํ•˜๋Š”์ง€ ๋ณด๊ธฐ ์œ„ํ•ด์„œ ์•„๋ž˜์™€ ๊ฐ™์ด ์„œ๋ฒ„์— ๊ฐ„๋‹จํ•œ ์š”์ฒญ์„ ๋ณด๋ƒˆ๋Š”๋ฐ ์‘๋‹ต์ด ์˜ค์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค..  API Gateway์˜ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•ด๋ณด๋‹ˆ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์—๋Ÿฌ๋ฉ”์‹œ์ง€๊ฐ€ ์ฐํ˜€์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. 2024-09-28T12:02:38.403+09:00 ERROR 80418 --- [api-gateway] [ctor-http-nio-2] a.w.r.e.AbstractErrorWebExceptionHandler : [d48b9c9b-243] 500 Server Error for HTTP GET "/member-service/member/healthcheck"io.netty.channel.ConnectTimeoutE.. 2024. 9. 28.