报错详情:
2023-05-26 14:38:43.246 INFO 1 --- [ main] c.c.s.SocialNetworkApplication : Started SocialNetworkApplication in 9.634 seconds (JVM running for 10.807)
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000000000401e, pid=1, tid=0x00007f82460e5b10
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b04) (build 1.8.0_212-b04)
# Java VM: OpenJDK 64-Bit Server VM (25.212-b04 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 3.12.0
# Distribution: Custom build (Sat May 4 17:33:35 UTC 2019)
# Problematic frame:
# C 0x000000000000401e
#
# Core dump written. Default location: //core or core.1
#
# An error report file with more information is saved as:
# //hs_err_pid1.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# https://icedtea.classpath.org/bugzilla
#
原因1:
同时引入重复的依赖(引入不同版本的包)
<dependency>
<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar-client</artifactId>
<version>2.6.4</version>
</dependency>
<dependency>
<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar-client</artifactId>
<version>2.7.4</version>
</dependency>
原因2:
JDK版本不支持引入的Pulsar依赖版本
原因3:
DockerFile中配置的基础镜像:
# 镜像大小526MB,在未删除重复依赖的情况下使用,依然可以部署成功。
FROM openjdk:8
# 镜像大小105MB,在未删除重复依赖的情况下使用,会部署失败。
FROM openjdk:8-jdk-alpine