[Gradle] Unable to start the daemon process

Tae Woo Kim·2024년 7월 25일
0

Java

목록 보기
5/6

문제

해당 에러가 나면서 실행, 테스트, Gradle Reload 등이 안되었다.

Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.For more details on the daemon, please refer to https://docs.gradle.org/8.8/userguide/gradle_daemon.html in the Gradle documentation.
Process command line: C:\Users\taewo\.jdks\corretto-17.0.11\bin\java.exe --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country=KR -Duser.language=ko -Duser.variant -cp C:\Users\taewo\.gradle\wrapper\dists\gradle-8.8-bin\dl7vupf4psengwqhwktix4v1\gradle-8.8\lib\gradle-launcher-8.8.jar -javaagent:C:\Users\taewo\.gradle\wrapper\dists\gradle-8.8-bin\dl7vupf4psengwqhwktix4v1\gradle-8.8\lib\agents\gradle-instrumentation-agent-8.8.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.8
Please read the following process output to find out more:
-----------------------
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ILLEGAL_INSTRUCTION (0xc000001d) at pc=0x00007ffbf3cc80e0, pid=31192, tid=31400
#
# JRE version: OpenJDK Runtime Environment Corretto-17.0.11.9.1 (17.0.11+9) (build 17.0.11+9-LTS)
# Java VM: OpenJDK 64-Bit Server VM Corretto-17.0.11.9.1 (17.0.11+9-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# V  [jvm.dll+0xb80e0]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\taewo\.gradle\daemon\8.8\hs_err_pid31192.log
[thread 24524 also had an error]
[thread 26728 also had an error]
#
# Compiler replay data is saved as:
# C:\Users\taewo\.gradle\daemon\8.8\replay_pid31192.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/corretto/corretto-17/issues/
#

문제파악

  1. Daemon을 시작하지 못한다. Daemon의 설정이 잘못되어 있을 수 있다.
  2. C:\Users\taewo\.gradle\daemon\8.8\replay_pid31192.log 에 로그가 있다고한다 열어보자:

    곤란하다
  3. 구글링해서 비슷한 사례가 있는지 보자.

해결

1. 일단 SDK 버전을 쓰는 버전인 17로 맞춰주고

2. 재부팅.

인프런 질문 포스트에서는 PC 재부팅 후 인텔리제이에서 Build and run using과 Run tests using을 Intellij IDEA로 바꿔서 확인해주세요 라고 하신다

결과

그런데 재부팅 후 정상적으로 작동되어서 Build and run using Gradle은 바꾸지 않았다.

별개로

Build and run using Gradle vs IntelliJ가 정확히 어떤 차이인지 궁금해진다.

Run tests using IntelliJ는 테스트 환경에서 왼쪽에 체크박스 생기는 게 좋아서 고른것이다.

Run tests using Gradle

  • 왼쪽에 체크 박스가 없고 실패한 테스트만 보여주는 모습이다.
  • 테스트 로고가 Gradle 코끼리인 점

Run tests using Intellij IDEA

  • 왼쪽에 체크박스가 있고 각 테스트 당 걸린 시간을 확인할 수 있다는 점
  • 테스트 로고가 JUnit인 점

다음 포스트에 Gradle vs Intellij의 각 장단점을 파악해보는 것도 좋겠다.
또 Daemon이 뭔지 짚고 넘어가면 좋겠다.

0개의 댓글