inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

173만명의 커뮤니티!! 함께 토론해봐요.

깃허브에서 똑같이 user-service security

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

클래스 두개 그대로 복붙하는데 "로그인만 안됩니다" 오류내용은 { "timestamp": "2024-12-11T18:03:34.879+00:00", "status": 404, "error": "Not Found", "trace": "org.springframework.web.servlet.resource.NoResourceFoundException: No static resource .\n\tat org.springframework.web.servlet.resource.ResourceHttpRequestHandler.handleRequest(ResourceHttpRequestHandler.java:585)\n\tat org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:52)\n\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1088)\n\tat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:978)\n\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)\n\tat org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)\n\tat jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564)\n\tat org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)\n\tat jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)\n\tat org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)\n\tat org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)\n\tat org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:365)\n\tat org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:101)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126)\n\tat org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:131)\n\tat org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:85)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:179)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227)\n\tat org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107)\n\tat org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n\tat org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:82)\n\tat org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:69)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233)\n\tat org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191)\n\tat org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)\n\tat org.springframework.web.servlet.handler.HandlerMappingIntrospector.lambda$createCacheFilter$3(HandlerMappingIntrospector.java:243)\n\tat org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)\n\tat org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)\n\tat org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebMvcSecurityConfiguration.java:238)\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:362)\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:278)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)\n\tat org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)\n\tat org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)\n\tat org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)\n\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)\n\tat org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:397)\n\tat org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)\n\tat org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)\n\tat org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)\n\tat org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)\n\tat org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\n", "message": "No static resource .", "path": "/" } 포스트맨에서 이렇게뜨고 로그인말고는 다됩니다 로그인할때 post요청보낼때 저렇게뜹니다 코드는 git에서 복붙한거라 다른게없스니다

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
임다정 댓글 2 좋아요 0 조회수 269

자료 다운받고 굿노트에

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

옮기려는데 자꾸 암호를 적으라고해서요..;;

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
임다정 댓글 2 좋아요 1 조회수 241

user service에서는 토큰 검증을 하지 않나요?

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

제가 작성한 user-service SecurityConfig 입니다 강의 내용과 최대한 유사하게 작성한거 같은데 GET /users에서 403이 발생하여 문의드립니다. gateway service에서 토큰 검증을 하여도 user service에서는 검증된 토큰인지 알 수 없으니 403이 발생하는게 맞는거 같은데 강의에서는 api가 제대로 동작하여 왜 그런지 궁금합니다 @RequiredArgsConstructor @Configuration public class SecurityConfig { //AuthenticationManager가 인자로 받을 AuthenticationConfiguraion 객체 생성자 주입 private final AuthenticationConfiguration authenticationConfiguration; private final JwtProvider jwtProvider; private static final String[] WHITE_LIST = {"/login", "/h2-console/**", "/health-check", "/welcome", "/join"}; @Bean public SecurityFilterChain config(HttpSecurity http) throws Exception { AuthenticationManager authenticationManager = authenticationManager(authenticationConfiguration); AuthenticationFilter authenticationFilter = new AuthenticationFilter( authenticationManager, jwtProvider); http.csrf(csrf -> csrf.disable()) //CSRF 보호를 비활성화. REST API 환경만 비활성화. Web Form 기반에서는 필요. .formLogin((auth) -> auth.disable()) // .httpBasic((auth) -> auth.disable()) .headers(header -> header.frameOptions( frameOptionsConfig -> frameOptionsConfig.disable()) ) //h2 console iframe을 사용하기 때문에 X-Frame-Options 헤더를 비활성화 .authorizeHttpRequests(auth -> auth.requestMatchers(WHITE_LIST).permitAll() .anyRequest() .authenticated() ) .authenticationManager(authenticationManager) .addFilterAt(authenticationFilter, UsernamePasswordAuthenticationFilter.class) .sessionManagement((session) -> session .sessionCreationPolicy(SessionCreationPolicy.STATELESS)); return http.build(); } //AuthenticationManager Bean 등록 @Bean public AuthenticationManager authenticationManager(AuthenticationConfiguration configuration) throws Exception { return configuration.getAuthenticationManager(); } @Bean public BCryptPasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } }

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
댓글 2 좋아요 1 조회수 282

Slf4j log cannot find symbol 오류 해결방법

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

intelliJ 에서 Slf4j 추가한 상태에서 log.info (header); 부분에서 나는 오류 해결방법 java: cannot find symbol symbol: variable log

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
이세진 댓글 2 좋아요 0 조회수 1136

actuator 적용이 아닌 따로 `/heath_check` 를 생성한 이유가 있을까요?

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

actuator 적용이 아닌 따로 /heath_check 를 생성한 이유가 있을까요? 좋은 강의 감사합니다. 좋은 하루 보내세요 : )

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
mkp0131 댓글 2 좋아요 0 조회수 211

Gateway `_(언더바)` Internal Server Error

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

안녕하세요. 강의 잘 보고 있습니다. Gateway의 uri를 lb://MY_FIRST_SERVICE 로 수정했을 때 500 Internal Server Error가 났습니다. 처음에 Spring boot 버전에서 문제인가 싶어서 Spring boot 버전을 3.3.5 -> 3.2.0 으로 수정도 해보고 load-balancer도 추가해보고 했습니다. 결과적으로 lb://MY_FIRST_SERVICE 의 _(언더바)를 -하이픈으로 수정하니 정상 작동하는 것을 알았습니다. 그런데 여기서 이유를 GPT에게 물어본 결과 라는 답변을 받았습니다. 이러한 결과가 사실이 맞는지 궁금합니다. 구글링 해봤을 때 관련한 자료는 없어서 여쭤봅니다

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
bbgiloo98 댓글 2 좋아요 0 조회수 238

spring cloud gateway mvc 모델에서 route별 timeout 설정

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

안녕하세요 선생님. 질문이 있어 남깁니다. spring cloud gateway mvc모델에서 route별 httpclient의 readtimeout, connectiontimeout을 설정하는 방법이 있나요? reactive한 모델에서는 metadata를 이용하여 설정하는 것 같은데, documents를 아무리 뒤져도 mvc모델에서 전역적으로 타임아웃 설정하는 법만 있고, route별 설정하는 법이 없네요.. 어떻게 설정해야할까요?

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
전동혁 댓글 1 좋아요 0 조회수 348

강의자료를 얻고 싶습니다.

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

강의 자료를 받아 보고 싶습니다. 필요한 것을 찾을 때 강의를 재생하면서 내용 중에 찾기가 힘들어요

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
neobns.jwlee 댓글 2 좋아요 0 조회수 356

Actuator busrefresh 관련 질문

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

해결 했습니다. 강의 감사합니다

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
박민준 댓글 2 좋아요 0 조회수 150

디버깅모드 에러

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

ErrorDecoder를 이용한 예외 처리 강의 15:00 에 order_service: url: http://ORDER-SERVICE/order-service/%s/orders exception: order_is_emptyda: User's order is emptyimda2 이렇게 설정하고 http://127.0.0.1:8000/user-service/users/[userid] 돌리니까 디버깅모드에서 getProperty가 Invalid expression : ) 로 표시됩니다 resume 하면 제대로 postman에 적용되긴합니다. 거의 똑같이 썻는데 왜 저는 저렇게 디버그 모드에서 invalid expression이라고 떠서 확인을 못하게 뜰까요 스프링부트3.3 jdk 17입니다 intellij

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
도오커 댓글 2 좋아요 0 조회수 231

Database "mem:testdb" not found 에러 해결 방법

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

가장 최신 버전으로 H2와 Spring Boot를 활용하신다면 spring-boot-starter-jdbc 추가하시면 바로 연결 가능합니다. <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jdbc --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> <version>3.3.5</version> </dependency> 추가적인 작업(JPA 유도 등)을 하지 않아도 바로 접속이 가능합니다~!

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
나이스에요 댓글 2 좋아요 5 조회수 417

First service gateway service 연동 관련 문의

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

강의를 따라서 실행하던 도중 security 관련 의존성을 추가한 적이 없는데 l ocalhost:8000/first-service/welcome으로 접속을 하면 위 사진과 같은 경로로 리다이렉트 되면서 에러가 발생합니ㄷㅏ.어떤 이유에서 이 경로로 리다이렉트가 되는걸까요? 아래는 설정 파일들을 사진으로 First-service는 정상적으로 잘 작동됩니다

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
박민준 댓글 2 좋아요 0 조회수 310

혹시 강의에서 오토스케일링은 배울수있을까요?

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

모든강의를 구매할 예정입니다. 스프링 강의를 제외하고 구매하고싶습니다만 현재 까지 강의를 들었을때 제가 스프링 서버를 두개를 뛰운다음에 유레카로 로드밸런싱하는것 같은데 필요에따라서(서비스요청이 많아지면)자동적이게 설정한대로 확장하게 만들수 있나요? 이건 젠키스 강의로봐야하나요? - 오토스케일링 여부 또한 하나의 ec2 에 모든 로직을 넣어서 확장하는게 아니라 여려 ec2 에서 스케일링 하는 강의가있나요? 스프링 배포까지 공부해야할까요? -ec2 분산 여부

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
djsdjdyd123 댓글 2 좋아요 0 조회수 277

학습방법 질문드립니다.

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

3.x 버전 업데이트 해서 구매했습니다. 그럼 실습 부분은 아래에있는 3.x 버전만 보면되나요? 위의 2.x 는 생략해도되나요?

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
djsdjdyd123 댓글 1 좋아요 0 조회수 276

토큰의 id값 검증

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

해결했습니다.

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
댓글 1 좋아요 2 조회수 139

Kafka 통신 클라이언트 응답 질문

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

서비스 로직이 실행될때 Kafka 통해 이벤트를 발행하는 순간 클라이언트 응답이 성공으로 나가는데 만약 이 이벤트를 처리하는 컨슈머쪽에서 실패한다고하면 클라이언트 응답은 이미 성공으로 보내졌는데 실패했다는걸 어떻게 알리나요? 보상트랜잭션을 발행해서 데이터를 되돌리는건 이해가 되지만 클라이언트 응답에 대해서는 어떻게 해야될지 궁굼합니다 Ex) 주문후 재고감소 이벤트를 발행하는 순간 클라이언트 응답은 성공으로감 하지만 재고감소하는 서비스에서 실패를 한다고하면?

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
leesln1 댓글 2 좋아요 0 조회수 190

안녕하세요 Eureka 관련 질문 있습니다.

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

AWS ECS를 통해 MSA 프로젝트를 배포하려고 노력중입니다. Eureka, Api Gateway, 그리고 나머지 서비스를 배포하려고 하는데, 유레카가 ECS 환경에서 잘 검색하고 있지 못한 것 같습니다. 왜 이런지 도저히 감이 안잡혀서 질문 올립니다. 그림에 있는 것과 마찬가지로 모두 같은 ip 주소를 가져오고 있습니다. AWS ECS (Fargate) 환경이고, ALB 사용중입니다. 제 추측으로는 저 공통된 ip 주소가 ALB의 ip 주소이지 않을까 해서 다양한 방법을 시도해봤지만 private ip를 유레카가 가지고 있게 하는 것을 실패했습니다.

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
thsghdud13 댓글 2 좋아요 0 조회수 231

kafka connector 등록 후 조회 시 에러

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

강의에서 알려주신대로 my-source-connect라는 connector를 등록한 후 http://localhost:8083/connectors 로 GET 조회시 아래와 같이 connector가 잘 뜨는 것을 확인하고 http://localhost:8083/connectors/my-source-connect/status 로 GET 조회시 아래와 같은 오류 메시지가 응답됐습니다. { "name": "my-source-connect", "connector": { "state": "FAILED", "worker_id": "127.0.0.1:8083", "trace": "java.lang.NoSuchMethodError: 'boolean org.apache.kafka.common.utils.Utils.isBlank(java.lang.String)'\n\tat io.confluent.connect.jdbc.util.StringUtils.isNotBlank(StringUtils.java:79)\n\tat io.confluent.connect.jdbc.dialect.GenericDatabaseDialect.getJdbcCredentialsProvider(GenericDatabaseDialect.java:2010)\n\tat io.confluent.connect.jdbc.dialect.GenericDatabaseDialect.<init>(GenericDatabaseDialect.java:192)\n\tat io.confluent.connect.jdbc.dialect.MySqlDatabaseDialect.<init>(MySqlDatabaseDialect.java:67)\n\tat io.confluent.connect.jdbc.dialect.MySqlDatabaseDialect$Provider.create(MySqlDatabaseDialect.java:57)\n\tat io.confluent.connect.jdbc.dialect.DatabaseDialects.findBestFor(DatabaseDialects.java:134)\n\tat io.confluent.connect.jdbc.JdbcSourceConnector.start(JdbcSourceConnector.java:87)\n\tat org.apache.kafka.connect.runtime.WorkerConnector.doStart(WorkerConnector.java:185)\n\tat org.apache.kafka.connect.runtime.WorkerConnector.start(WorkerConnector.java:210)\n\tat org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(WorkerConnector.java:349)\n\tat org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(WorkerConnector.java:332)\n\tat org.apache.kafka.connect.runtime.WorkerConnector.doRun(WorkerConnector.java:140)\n\tat org.apache.kafka.connect.runtime.WorkerConnector.run(WorkerConnector.java:117)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)\n\tat java.base/java.lang.Thread.run(Thread.java:840)\n" }, "tasks": [], "type": "source" } kafka connect 터미널 로그에는 다음과 같이 찍혀있었습니다. [2024-10-13 23:15:36,747] ERROR WorkerConnector{id=my-source-connect} Error while starting connector (org.apache.kafka.connect.runtime.WorkerConnector:193) java.lang.NoSuchMethodError: 'boolean org.apache.kafka.common.utils.Utils.isBlank(java.lang.String)' at io.confluent.connect.jdbc.util.StringUtils.isNotBlank(StringUtils.java:79) at io.confluent.connect.jdbc.dialect.GenericDatabaseDialect.getJdbcCredentialsProvider(GenericDatabaseDialect.java:2010) at io.confluent.connect.jdbc.dialect.GenericDatabaseDialect.<init>(GenericDatabaseDialect.java:192) at io.confluent.connect.jdbc.dialect.MySqlDatabaseDialect.<init>(MySqlDatabaseDialect.java:67) at io.confluent.connect.jdbc.dialect.MySqlDatabaseDialect$Provider.create(MySqlDatabaseDialect.java:57) at io.confluent.connect.jdbc.dialect.DatabaseDialects.findBestFor(DatabaseDialects.java:134) at io.confluent.connect.jdbc.JdbcSourceConnector.start(JdbcSourceConnector.java:87) at org.apache.kafka.connect.runtime.WorkerConnector.doStart(WorkerConnector.java:185) at org.apache.kafka.connect.runtime.WorkerConnector.start(WorkerConnector.java:210) at org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(WorkerConnector.java:349) at org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(WorkerConnector.java:332) at org.apache.kafka.connect.runtime.WorkerConnector.doRun(WorkerConnector.java:140) at org.apache.kafka.connect.runtime.WorkerConnector.run(WorkerConnector.java:117) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840) [2024-10-13 23:15:36,747] ERROR [Worker clientId=connect-1, groupId=connect-cluster] Failed to start connector 'my-source-connect' (org.apache.kafka.connect.runtime.distributed.DistributedHerder:1339) org.apache.kafka.connect.errors.ConnectException: Failed to start connector: my-source-connect at org.apache.kafka.connect.runtime.distributed.DistributedHerder.lambda$startConnector$5(DistributedHerder.java:1305) at org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(WorkerConnector.java:335) at org.apache.kafka.connect.runtime.WorkerConnector.doRun(WorkerConnector.java:140) at org.apache.kafka.connect.runtime.WorkerConnector.run(WorkerConnector.java:117) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840) 다음은 제가 시도해본 해결방법 3가지 입니다. 테이블 이름 수정 https://www.inflearn.com/community/questions/618181/source-connector-%EC%98%A4%EB%A5%98?srsltid=AfmBOooaiA_jLl3ijo0mPjPhnhjM4FQeCSDVdXjgXAAHMsN7sojnFkIR users 테이블은 예약어라고 해서 user1으로 수정해서 POST 요청을 보냈을 때는 아래와 같이 응답이 잘 왔습니다. mariadb-java-client.jar 파일 올바른 폴더에 넣기 https://www.inflearn.com/community/questions/970970/kafka-connectors-%EC%97%90%EB%9F%AC?srsltid=AfmBOoopKwFbCFMIgaLAKg5-4urO7Fzzxwl2ChzmqH8evzNEc4H1ECsD 다음 글을 참고해서 mariadb-java-client.jar 파일을 아래와 같이 kafka 폴더에 옮겨 놓았습니다 플러그인 확인 https://www.inflearn.com/community/questions/245034/localhost-8083-connectors-%ED%98%B8%EC%B6%9C%EC%8B%9C-%EC%97%90%EB%9F%AC%EA%B0%80-%EB%B0%9C%EC%83%9D%ED%95%A9%EB%8B%88%EB%8B%A4?srsltid=AfmBOophiRaXpfFVHkArBbyirgaPdUfbGUP2W8o5Px-k_ZZDJ2b7wgmf 다음 글을 참고해서 http://localhost:8083/connector-plugins [ { "class": "io.confluent.connect.jdbc.JdbcSinkConnector", "type": "sink", "version": "10.8.0" }, { "class": "io.confluent.connect.jdbc.JdbcSourceConnector", "type": "source", "version": "10.8.0" }, { "class": "org.apache.kafka.connect.file.FileStreamSinkConnector", "type": "sink", "version": "6.1.0-ccs" }, { "class": "org.apache.kafka.connect.file.FileStreamSourceConnector", "type": "source", "version": "6.1.0-ccs" }, { "class": "org.apache.kafka.connect.mirror.MirrorCheckpointConnector", "type": "source", "version": "1" }, { "class": "org.apache.kafka.connect.mirror.MirrorHeartbeatConnector", "type": "source", "version": "1" }, { "class": "org.apache.kafka.connect.mirror.MirrorSourceConnector", "type": "source", "version": "1" } ] 다음과 같이 응답이 왔습니다. jdbc connector는 잘 등록된 것 같습니다.. 뭐가 문제일까요?

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
Strongkmh 댓글 2 좋아요 1 조회수 384

apigateway 프로젝트 생성하고 실행시 Timout이출력 됩니다.

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

안녕하세요 강사님, 강의 영상 잘 보고 있습니다. first-service, second-service 둘다 실행 후에 apigateway-service 실행했습니다. 그런데 apigateway 쪽에서 연결 거부 당했다는 로그가 지속적으로 올라오네요 이유를 모르겠습니다. apigateway 의 application yml파일 여기서 궁금한게 defaultZone 설정 해서, discoveryservice 프로젝트도 구동 시켜줬는데, 같은 에러로그가 지속 적으로 올라오네요.. server: port: 8000 eureka: client: register-with-eureka: false fetch-registry: false service-url: defaultZone: http://localhost:8761/eureka spring: application: name: apigateway-service cloud: gateway: routes: - id: first-service uri: localhost:8081/first-service predicates: # ??? Path ??? first-service?? ?? uri? ?? - Path=/first-service/** - id: second-service uri: localhost:8082/second-service predicates: # ??? Path ??? second-service?? ?? uri? ?? - Path=/second-service/** 콘솔 내용 2024-10-07 20:39:53.214 WARN 2024 --- [OvbxrBtUd7XQ-87] o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: no further information 2024-10-07 20:39:53.214 INFO 2024 --- [OvbxrBtUd7XQ-87] o.s.a.r.l.SimpleMessageListenerContainer : Restarting Consumer@4dca89d2: tags=[[]], channel=null, acknowledgeMode=AUTO local queue size=0 2024-10-07 20:39:53.215 INFO 2024 --- [OvbxrBtUd7XQ-88] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672] 추가 예외 2024-10-07 20:51:37.290 INFO 18012 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888 2024-10-07 20:51:37.304 INFO 18012 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Connect Timeout Exception on Url - http://localhost:8888. Will be trying the next url if available 2024-10-07 20:51:37.304 WARN 18012 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/apigateway-service/default": Connection refused: no further information; nested exception is java.net.ConnectException: Connection refused: no further information

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
Agrev 댓글 2 좋아요 0 조회수 247

깃 업데이트 요청드립니다

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

Spring Boot 3.2 + Spring Cloud 2023.0.0 업데이트 예정 (2024-01) 위 깃 업데이트 언제 될까요?

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
sonseonjin 댓글 2 좋아요 0 조회수 326

인기 태그

인프런 TOP Writers

주간 인기글