addShutdownHook이 제대로 작동하지 않는것 같습니다
IntelliJ에서 ConsumerWakeup파일을 실행하고 종료 시,
logger.info("main program starts to exit by calling wakeup");
이 콘솔에 출력되지 않고 아래와 같은 오류가 출력됩니다.
> Task :consumers:ConsumerWakeup.main() FAILED
2 actionable tasks: 1 executed, 1 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':consumers:ConsumerWakeup.main()'.
> Build cancelled while executing task ':consumers:ConsumerWakeup.main()'
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 11s
오후 4:02:44: 실행이 완료되었습니다 ':consumers:ConsumerWakeup.main()'.
만약, 커버리지 모드로 구동을 할 경우 아래와 같이 정상적으로 로그가 출력됩니다.
[Thread-2] INFO com.example.kafka.ConsumerWakeup - main program starts to exit by calling wakeup
[main] ERROR com.example.kafka.ConsumerWakeup - wakeup exception has been called
[main] INFO com.example.kafka.ConsumerWakeup - finally consumer is closing
Class transformation time: 0.1235649s for 1928 classes or 6.408967842323652E-5s per class
VirtualBox 세팅 문제로 별개의 Bare-Metal 리눅스 서버를 구성하여 사용중입니다.
Java 버전, Gradle버전, implementation환경 등은 강의와 같은 상태인데 혹시 어떤게 문제일까요?
답변 1
0
안녕하십니까,
음, VM 문제는 아닌것 같고, IntelliJ Build의 문제인것 같습니다만,
아래 URL과 같이 Gradle을 IntelliJ IDEA 로 변경해 보시겠습니까?
https://spongeb0b.tistory.com/208
감사합니다.
mtputty.com 사용하실 때 주의하세요(질문X/공유)
0
33
2
VirtualBox가 아닌 VMware를 사용해도 되나요
0
30
2
virtual box 설치 문제
0
127
2
카프카 서버 구축 관련 문의
0
110
2
카프카 토픽 Key 타입 변경에 관한 질문
0
100
2
Zookeeper에서 KRaft
0
106
1
카프카 학습과 관련하여 질문 드립니다
0
134
2
파티션 증가시 비용 증가 고려
0
114
2
Kafka 초기 Partition 개수 설정 관련 질문
0
123
2
VM 과 도커의 차이
0
191
2
vm 어댑터설정 문의
0
119
2
Cooperative Sticky Rebalancing 질문
0
93
2
consumer 설정 질문
0
104
2
consumer.poll 질문입니다.
1
98
2
mainThread.join() 관련 질문
0
86
2
문의
0
187
2
멀티 브로커 설정 중 포트 충돌 발생
0
150
2
Consumer Group 강의 Lag 질문있습니다!
0
142
2
강의 설명 및 코드 정리
0
220
2
실습 코드는 어디서 받나요.. 아무리 찾아도 엄네요..
0
175
1
java.nio.BufferUnderflowException 에러 발생합니다..
0
204
3
KafkaTimeoutError:
0
182
2
acks 1 이면 비동기가 아니지 않나요?!
0
222
2
Producer의 메시지 비동기화 전송 구현 강좌 내용 중 질문
0
130
2





