티스토리 뷰

반응형

상황

Flink 를 직접 빌드하려고 했는데, 다음과 같은 오류가 나면서 빌드에 실패했다.

데스크탑에서 하면 문제가 없어서 좀 삽질했는데, jdk8 버전을 사용하여 빌드한다면 버전을 확인해 보자.

$ mvn clean package -DskipTests
...생략...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  24:50 min
[INFO] Finished at: 2022-08-30T15:54:37+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project flink-avro-confluent-registry: Could not resolve dependencies for project org.apache.flink:flink-avro-confluent-registry:jar:1.15.0: Failed to collect dependencies at io.confluent:kafka-schema-registry-client:jar:6.2.2: Failed to read artifact descriptor for io.confluent:kafka-schema-registry-client:jar:6.2.2: Could not transfer artifact io.confluent:kafka-schema-registry-client:pom:6.2.2 from/to confluent (https://packages.confluent.io/maven/): transfer failed for https://packages.confluent.io/maven/io/confluent/kafka-schema-registry-client/6.2.2/kafka-schema-registry-client-6.2.2.pom: Received close_notify during handshake -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :flink-avro-confluent-registry

원인과 해결

Centos + jdk 1.8.0_202 미만의 버전을 사용할때 TLS 1.2 버전의 elliptic curve algorithm 사용이 제한되어 문제가 있다는 말이 있다. 이 내용은 스택오버플로우의 댓글에 있으니 참고하자. 참고로, TLS 는 https , ssl 과 연계되는데, 아마도 https://packages.confluent.io/maven 에 접근할때 영향을 문제가 되서 의존성있는 라이브러리를 못받아온 케이스로 보인다. 

 

해결방법은 1.8.0_202 이상의 버전으로 변경해서 사용하면 해결이 된다. 

https://github.com/ojdkbuild/contrib_jdk8u-ci/releases

 

이걸 다운로드 받아서, JAVA_HOME 과 PATH 환경변수를 변경하고 다시 빌드하면 성공한다.

정리하면? 다음과 같다.

# 문제가 되는 버전 (업데이트 필요)
$ java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)

# 해결된 버전 (java 1.8.0_202 이상버전)
$ java -version
openjdk version "1.8.0_322"
OpenJDK Runtime Environment (build 1.8.0_322-06)
OpenJDK 64-Bit Server VM (build 25.322-b06, mixed mode)

종종 이런 마이너 버전도 이런 동작에 영향을 주므로 버전확인을 잘해보자

반응형
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함