apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.33k stars 8.78k forks source link

Support building Seata Server Docker Image on OpenJDK23 #6965

Closed linghengqian closed 2 days ago

linghengqian commented 1 week ago

Why you need it?

Is your feature request related to a problem? Please describe in details

sdk install java 23-open
sdk use java 23-open
git clone git@github.com:apache/incubator-seata.git
cd ./incubator-seata/
./mvnw -T 4C clean package -Dimage.name=eclipse-temurin:21.0.4_7-jdk       -Pimage,release-image-based-on-java21      -DskipTests -e -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
Click me to view Error Log🐲🐲🐲🐲🐲🐲🐲🐲🐲

```shell
[INFO] --- jib-maven-plugin:3.2.0:build (default) @ seata-server ---
[INFO]
[INFO] Containerizing application to apache/seata-server, apache/seata-server:2.3.0-SNAPSHOT.jdk21...
[WARNING] Base image 'eclipse-temurin:21.0.4_7-jdk' does not use a specific image digest - build may not be reproducible
[INFO] The base image requires auth. Trying again for eclipse-temurin:21.0.4_7-jdk...
[INFO] Executing tasks:
[INFO] [========                      ] 27.1% complete
[INFO] > building dependencies layer
[INFO] > pushing blob sha256:3be4e7bd7375b6968ea66b3a6...
[INFO] > pushing blob sha256:e3f298bb901f843e3175dafd9...
[INFO] > pushing blob sha256:1844467c33888736966ff5d1f...
[INFO] > pushing blob sha256:c3614710620337fd3125c0d7d...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Seata Parent POM 2.3.0-SNAPSHOT 2.3.0-SNAPSHOT:
[INFO]
[INFO] Seata Build 2.3.0-SNAPSHOT ......................... SUCCESS [  0.974 s]
[INFO] Seata Parent POM 2.3.0-SNAPSHOT .................... SUCCESS [  1.608 s]
[INFO] seata-common 2.3.0-SNAPSHOT ........................ SUCCESS [  4.187 s]
[INFO] seata-config 2.3.0-SNAPSHOT ........................ SUCCESS [  0.243 s]
[INFO] seata-config-core 2.3.0-SNAPSHOT ................... SUCCESS [  2.161 s]
[INFO] seata-config-custom 2.3.0-SNAPSHOT ................. SUCCESS [  3.387 s]
[INFO] seata-config-apollo 2.3.0-SNAPSHOT ................. SUCCESS [  4.038 s]
[INFO] seata-config-nacos 2.3.0-SNAPSHOT .................. SUCCESS [  4.635 s]
[INFO] seata-config-zk 2.3.0-SNAPSHOT ..................... SUCCESS [  4.335 s]
[INFO] seata-config-consul 2.3.0-SNAPSHOT ................. SUCCESS [  3.376 s]
[INFO] seata-config-etcd3 2.3.0-SNAPSHOT .................. SUCCESS [  3.984 s]
[INFO] seata-config-spring-cloud 2.3.0-SNAPSHOT ........... SUCCESS [  3.092 s]
[INFO] seata-discovery 2.3.0-SNAPSHOT ..................... SUCCESS [  0.241 s]
[INFO] seata-discovery-core 2.3.0-SNAPSHOT ................ SUCCESS [  3.459 s]
[INFO] seata-core 2.3.0-SNAPSHOT .......................... SUCCESS [  5.769 s]
[INFO] seata-discovery-custom 2.3.0-SNAPSHOT .............. SUCCESS [  4.001 s]
[INFO] seata-discovery-consul 2.3.0-SNAPSHOT .............. SUCCESS [  3.795 s]
[INFO] seata-discovery-eureka 2.3.0-SNAPSHOT .............. SUCCESS [  4.723 s]
[INFO] seata-discovery-nacos 2.3.0-SNAPSHOT ............... SUCCESS [  4.009 s]
[INFO] seata-discovery-redis 2.3.0-SNAPSHOT ............... SUCCESS [  3.188 s]
[INFO] seata-discovery-sofa 2.3.0-SNAPSHOT ................ SUCCESS [  4.806 s]
[INFO] seata-discovery-raft 2.3.0-SNAPSHOT ................ SUCCESS [  2.956 s]
[INFO] seata-discovery-zk 2.3.0-SNAPSHOT .................. SUCCESS [  4.608 s]
[INFO] seata-discovery-etcd3 2.3.0-SNAPSHOT ............... SUCCESS [  4.653 s]
[INFO] seata-discovery-namingserver 2.3.0-SNAPSHOT ........ SUCCESS [  3.735 s]
[INFO] seata-tm 2.3.0-SNAPSHOT ............................ SUCCESS [  3.700 s]
[INFO] seata-rpc-core 2.3.0-SNAPSHOT ...................... SUCCESS [  2.274 s]
[INFO] seata-brpc 2.3.0-SNAPSHOT .......................... SUCCESS [  1.276 s]
[INFO] seata-http 2.3.0-SNAPSHOT .......................... SUCCESS [  4.391 s]
[INFO] seata-http-jakarta 2.3.0-SNAPSHOT .................. SUCCESS [  2.259 s]
[INFO] seata-dubbo-alibaba 2.3.0-SNAPSHOT ................. SUCCESS [  2.768 s]
[INFO] seata-sofa-rpc 2.3.0-SNAPSHOT ...................... SUCCESS [  3.246 s]
[INFO] seata-motan 2.3.0-SNAPSHOT ......................... SUCCESS [  2.845 s]
[INFO] seata-rm 2.3.0-SNAPSHOT ............................ SUCCESS [  3.849 s]
[INFO] seata-sqlparser 2.3.0-SNAPSHOT ..................... SUCCESS [  0.231 s]
[INFO] seata-sqlparser-core 2.3.0-SNAPSHOT ................ SUCCESS [  2.059 s]
[INFO] seata-compressor 2.3.0-SNAPSHOT .................... SUCCESS [  0.239 s]
[INFO] seata-compressor-gzip 2.3.0-SNAPSHOT ............... SUCCESS [  4.182 s]
[INFO] seata-compressor-bzip2 2.3.0-SNAPSHOT .............. SUCCESS [  4.133 s]
[INFO] seata-compressor-zip 2.3.0-SNAPSHOT ................ SUCCESS [  3.308 s]
[INFO] seata-compressor-lz4 2.3.0-SNAPSHOT ................ SUCCESS [  4.000 s]
[INFO] seata-compressor-deflater 2.3.0-SNAPSHOT ........... SUCCESS [  3.382 s]
[INFO] seata-compressor-zstd 2.3.0-SNAPSHOT ............... SUCCESS [  3.399 s]
[INFO] seata-compressor-all 2.3.0-SNAPSHOT ................ SUCCESS [  2.432 s]
[INFO] seata-sqlparser-druid 2.3.0-SNAPSHOT ............... SUCCESS [ 43.424 s]
[INFO] seata-rm-datasource 2.3.0-SNAPSHOT ................. SUCCESS [  1.616 s]
[INFO] seata-serializer 2.3.0-SNAPSHOT .................... SUCCESS [  0.208 s]
[INFO] seata-serializer-seata 2.3.0-SNAPSHOT .............. SUCCESS [  4.411 s]
[INFO] seata-serializer-protobuf 2.3.0-SNAPSHOT ........... SUCCESS [  6.163 s]
[INFO] seata-serializer-kryo 2.3.0-SNAPSHOT ............... SUCCESS [  4.180 s]
[INFO] seata-serializer-hessian 2.3.0-SNAPSHOT ............ SUCCESS [  4.383 s]
[INFO] seata-serializer-fastjson2 2.3.0-SNAPSHOT .......... SUCCESS [  4.281 s]
[INFO] seata-serializer-all 2.3.0-SNAPSHOT ................ SUCCESS [  0.949 s]
[INFO] seata-integration-tx-api 2.3.0-SNAPSHOT ............ SUCCESS [  0.591 s]
[INFO] seata-tcc 2.3.0-SNAPSHOT ........................... SUCCESS [  0.537 s]
[INFO] seata-rocketmq 2.3.0-SNAPSHOT ...................... SUCCESS [  0.639 s]
[INFO] seata-sqlparser-antlr 2.3.0-SNAPSHOT ............... SUCCESS [  8.422 s]
[INFO] seata-spring 2.3.0-SNAPSHOT ........................ SUCCESS [  4.897 s]
[INFO] seata-grpc 2.3.0-SNAPSHOT .......................... SUCCESS [  3.263 s]
[INFO] seata-hsf 2.3.0-SNAPSHOT ........................... SUCCESS [  2.273 s]
[INFO] seata-saga 2.3.0-SNAPSHOT .......................... SUCCESS [  1.343 s]
[INFO] seata-saga-processctrl 2.3.0-SNAPSHOT .............. SUCCESS [  2.487 s]
[INFO] seata-saga-statelang 2.3.0-SNAPSHOT ................ SUCCESS [  2.538 s]
[INFO] seata-saga-engine-store 2.3.0-SNAPSHOT ............. SUCCESS [  2.887 s]
[INFO] seata-saga-engine 2.3.0-SNAPSHOT ................... SUCCESS [  2.924 s]
[INFO] seata-saga-rm 2.3.0-SNAPSHOT ....................... SUCCESS [  0.738 s]
[INFO] seata-saga-spring 2.3.0-SNAPSHOT ................... SUCCESS [  0.764 s]
[INFO] seata-metrics 2.3.0-SNAPSHOT ....................... SUCCESS [  0.212 s]
[INFO] seata-metrics-api 2.3.0-SNAPSHOT ................... SUCCESS [  2.128 s]
[INFO] seata-all 2.3.0-SNAPSHOT ........................... SUCCESS [  1.000 s]
[INFO] Seata All-in-one 2.3.0-SNAPSHOT .................... SUCCESS [  1.956 s]
[INFO] Seata bom 2.3.0-SNAPSHOT ........................... SUCCESS [  0.139 s]
[INFO] seata-config-all 2.3.0-SNAPSHOT .................... SUCCESS [  3.329 s]
[INFO] seata-console 2.3.0-SNAPSHOT ....................... SUCCESS [ 35.889 s]
[INFO] Seata dependencies 2.3.0-SNAPSHOT .................. SUCCESS [  0.085 s]
[INFO] seata-discovery-all 2.3.0-SNAPSHOT ................. SUCCESS [  0.925 s]
[INFO] seata-distribution 2.3.0-SNAPSHOT .................. SUCCESS [  0.210 s]
[INFO] seata-dubbo 2.3.0-SNAPSHOT ......................... SUCCESS [  0.286 s]
[INFO] seata-spring-autoconfigure 2.3.0-SNAPSHOT .......... SUCCESS [  0.267 s]
[INFO] seata-spring-autoconfigure-core 2.3.0-SNAPSHOT ..... SUCCESS [  1.081 s]
[INFO] seata-spring-autoconfigure-server 2.3.0-SNAPSHOT ... SUCCESS [  0.587 s]
[INFO] seata-metrics-core 2.3.0-SNAPSHOT .................. SUCCESS [  4.278 s]
[INFO] seata-metrics-registry-compact 2.3.0-SNAPSHOT ...... SUCCESS [  1.988 s]
[INFO] seata-metrics-exporter-prometheus 2.3.0-SNAPSHOT ... SUCCESS [  4.291 s]
[INFO] seata-metrics-all 2.3.0-SNAPSHOT ................... SUCCESS [  2.113 s]
[INFO] seata-server 2.3.0-SNAPSHOT ........................ FAILURE [  5.936 s]
[INFO] seata-mock-server 2.3.0-SNAPSHOT ................... SKIPPED
[INFO] seata-test 2.3.0-SNAPSHOT .......................... SKIPPED
[INFO] seata-test-old-version ............................. SKIPPED
[INFO] seata-spring-autoconfigure-client 2.3.0-SNAPSHOT ... SUCCESS [  0.592 s]
[INFO] seata-spring-boot-starter 2.3.0-SNAPSHOT ........... SUCCESS [  0.957 s]
[INFO] apm-seata-skywalking-plugin 2.3.0-SNAPSHOT ......... SKIPPED
[INFO] seata-namingserver 2.3.0-SNAPSHOT .................. SUCCESS [  3.627 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:12 min (Wall Clock)
[INFO] Finished at: 2024-10-31T17:25:56+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.2.0:build (default) on project seata-server: Unknown mediaType: application/vnd.oci.image.index.v1+json -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.2.0:build (default) on project seata-server: Unknown mediaType: application/vnd.oci.image.index.v1+json
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:200)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196)
    at java.util.concurrent.FutureTask.run (FutureTask.java:317)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
    at java.util.concurrent.FutureTask.run (FutureTask.java:317)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
    at java.lang.Thread.run (Thread.java:1575)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unknown mediaType: application/vnd.oci.image.index.v1+json
    at com.google.cloud.tools.jib.maven.BuildImageMojo.execute (BuildImageMojo.java:181)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:200)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196)
    at java.util.concurrent.FutureTask.run (FutureTask.java:317)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
    at java.util.concurrent.FutureTask.run (FutureTask.java:317)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
    at java.lang.Thread.run (Thread.java:1575)
Caused by: com.google.cloud.tools.jib.image.json.UnknownManifestFormatException: Unknown mediaType: application/vnd.oci.image.index.v1+json
    at com.google.cloud.tools.jib.registry.AbstractManifestPuller.getManifestTemplateFromJson (AbstractManifestPuller.java:177)
    at com.google.cloud.tools.jib.registry.AbstractManifestPuller.handleResponse (AbstractManifestPuller.java:98)
    at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.call (RegistryEndpointCaller.java:140)
    at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.call (RegistryEndpointCaller.java:114)
    at com.google.cloud.tools.jib.registry.RegistryClient.callRegistryEndpoint (RegistryClient.java:623)
    at com.google.cloud.tools.jib.registry.RegistryClient.pullManifest (RegistryClient.java:434)
    at com.google.cloud.tools.jib.registry.RegistryClient.pullManifest (RegistryClient.java:439)
    at com.google.cloud.tools.jib.builder.steps.PullBaseImageStep.pullBaseImages (PullBaseImageStep.java:292)
    at com.google.cloud.tools.jib.builder.steps.PullBaseImageStep.call (PullBaseImageStep.java:179)
    at com.google.cloud.tools.jib.builder.steps.PullBaseImageStep.call (PullBaseImageStep.java:69)
    at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly (TrustedListenableFutureTask.java:131)
    at com.google.common.util.concurrent.InterruptibleTask.run (InterruptibleTask.java:74)
    at com.google.common.util.concurrent.TrustedListenableFutureTask.run (TrustedListenableFutureTask.java:82)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
    at java.lang.Thread.run (Thread.java:1575)
[ERROR]
[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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn  -rf :seata-server
```

How it could be?

A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it.

Other related information

Add any other context or screenshots about the feature request here.

Server: Docker Engine - Community Engine: Version: 27.2.0 API version: 1.47 (minimum version 1.24) Go version: go1.21.13 Git commit: 3ab5c7d Built: Tue Aug 27 14:15:13 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.21 GitCommit: 472731909fa34bd7bc9c087e4c27943f9835f111 runc: Version: 1.1.13 GitCommit: v1.1.13-0-g58aa920 docker-init: Version: 0.19.0 GitCommit: de40ad0

psxjoy commented 6 days ago

Hi, this issue was raised during discussions in the project’s bi-weekly meeting, and I think I can fix it. Feel free to assign it to me anytime:) @funky-eyes @xingfudeshi @slievrly

psxjoy commented 4 days ago

Status update: I’ve set everything up and reproduced the issue. I will fix the issue and submit the PR this week.